You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Endless loop of : [OK] 1 file has been changed by Rector #9661
We can't really tell what's going on, but in some of our projects the CI pipeline started failing after upgrading rector to version 2.3.7. Downgrading the library to 2.3.6 fixes the issue.
Minimal PHP Code Causing Issue
`vendor/bin/rector --debug
[info] Sets loaded based on installed packages:
Same issue, here is an example file which triggers this bug:
<?php
declare(strict_types=1);
namespace Tests\Feature;
use App\Services\ServiceFactory;
use Illuminate\Testing\PendingCommand;
use Mockery;
use Mockery\MockInterface;
use Override;
use RuntimeException;
use Tests\TestCase;
final class CommandTest extends TestCase
{
#[Override]
protected function tearDown(): void
{
Mockery::close();
parent::tearDown();
}
}
FYI, we have the same errors on 2 repositories, both are up-to-date Laravel ones and it both concerns tests (with phpunit 13 + mockery).
On the biggest repository:
[OK] 5 files would have been changed (dry-run) by Rector
and the other one:
[OK] 3 files would have been changed (dry-run) by Rector
And even with debug options, there is no information about the concerned files 🤷♂️
then, the AddOverrideAttributeToOverriddenMethodsRector re-add it so it infinite add/remove it, I will patch on AddOverrideAttributeToOverriddenMethodsRector
Activity
samsonasik commentedon Feb 20, 2026
Could you provide reproducible repo? Thank you.
tc-cristian-radu commentedon Feb 20, 2026
Same issue, here is an example file which triggers this bug:
samsonasik commentedon Feb 20, 2026
@tc-cristian-radu could you provide simple reproducible repo ( 1 file, 1 composer.json, 1 rector.php)? Thank you.
tc-cristian-radu commentedon Feb 20, 2026
composer.json:rector.php
TestCase.php
samsonasik commentedon Feb 20, 2026
@tc-cristian-radu I can't reproduce
Could you share the repository we can clone, install, and run locally? Thank you.
tc-cristian-radu commentedon Feb 20, 2026
@samsonasik You need also the initial file I provided - sorry I can't share the actual repo as it is private
yoannblot commentedon Feb 20, 2026
FYI, we have the same errors on 2 repositories, both are up-to-date Laravel ones and it both concerns tests (with phpunit 13 + mockery).
On the biggest repository:
And even with debug options, there is no information about the concerned files 🤷♂️
samsonasik commentedon Feb 20, 2026
I see, it seems due to removal of
#[Override]ontearDown()on PR:then, the
AddOverrideAttributeToOverriddenMethodsRectorre-add it so it infinite add/remove it, I will patch onAddOverrideAttributeToOverriddenMethodsRectorgithub-actions commentedon Aug 30, 2026
This issue has been automatically locked because it has been closed for 150 days. Please open a new issue if you have a similar problem.