Skip to content

Conversation

@samsonasik
Copy link
Member

@samsonasik samsonasik commented Jan 26, 2026

Use of failing fixture on rector-phpunit:

Before

There was 1 error:

1) Rector\PHPUnit\Tests\CodeQuality\Rector\CallLike\DirectInstanceOverMockArgRector\DirectInstanceOverMockArgRectorTest::test with data set #3 ('/Users/samsonasik/www/rector-...hp.inc')
Rector\Exception\ShouldNotHappenException: Scope not available on "PhpParser\Node\ArrayItem" node. Fix scope refresh on changed nodes first

/Users/samsonasik/www/rector-phpunit/vendor/rector/rector-src/src/PHPStan/ScopeFetcher.php:26
/Users/samsonasik/www/rector-phpunit/rules/CodeQuality/Rector/CallLike/DirectInstanceOverMockArgRector.php:91

After

➜  rector-phpunit git:(add-failing-fixture-crash) vendor/bin/phpunit rules-tests/CodeQuality/Rector/CallLike/DirectInstanceOverMockArgRector            
PHPUnit 11.5.46 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.16
Configuration: /Users/samsonasik/www/rector-phpunit/phpunit.xml

.....                                                               5 / 5 (100%)

Time: 00:00.619, Memory: 76.50 MB

OK (5 tests, 6 assertions)

@samsonasik
Copy link
Member Author

All green 🎉 , @TomasVotruba let's merge ;)

@samsonasik samsonasik merged commit ea5089e into main Jan 26, 2026
58 of 59 checks passed
@samsonasik samsonasik deleted the fix-array-item branch January 26, 2026 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants