neos / rector

Neos Rector Recipes for code migrations
6 stars 4 forks source link

TASK: Update Rector #56

Closed mhsdesign closed 3 months ago

mhsdesign commented 4 months ago

currently ci fails after updating phpstan https://github.com/neos/rector/commit/95355d17f5f5258c5c4dc02b22b1fe52c017207a this was reverted again but this revert causes the dev collection not being able to install the newest phpstan https://github.com/neos/rector/commit/8aa311963aef0a7b1715968f6a7b32400cd1c952.

locally i get:

 rector git:(main) ../../../../bin/phpunit tests --stop-on-failure
PHPUnit 9.6.16 by Sebastian Bergmann and contributors.

E

Time: 00:00.245, Memory: 50.50 MB

There was 1 error:

1) Neos\Rector\Tests\ContentRepository90\Rules\ContextGetFirstLevelNodeCacheRector\ContextGetCurrentRenderingModeRectorTest::test with data set #0 ('/Users/marchenryschultz/Code/...hp.inc')
_PHPStan_7961f7ae1\Nette\DI\ServiceCreationException: Service of type PHPStan\PhpDocParser\Parser\TypeParser: Unable to pass specified arguments to TypeParser::__construct().

phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Resolver.php:454
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Resolver.php:174
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Definitions/ServiceDefinition.php:135
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Resolver.php:127
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerBuilder.php:256
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Compiler.php:203
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Compiler.php:159
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerLoader.php:99
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerLoader.php:65
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerLoader.php:34
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/src/DependencyInjection/Configurator.php:56
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/vendor/nette/bootstrap/src/Bootstrap/Configurator.php:177
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/src/DependencyInjection/Configurator.php:68
phar:///Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/phpstan/phpstan/phpstan.phar/src/DependencyInjection/ContainerFactory.php:122
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/packages/NodeTypeResolver/DependencyInjection/PHPStanServicesFactory.php:58
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:915
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:490
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:1023
...
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:490
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:1023
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:976
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:880
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:490
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:1023
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:976
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:880
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:490
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:1023
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:976
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:880
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:490
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:1023
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:976
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:880
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:490
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/vendor/symfony/dependency-injection/ContainerBuilder.php:441
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/packages/Testing/PHPUnit/AbstractTestCase.php:53
/Users/marchenryschultz/Code/core/neos-manufacture-90/Packages/Libraries/rector/rector/packages/Testing/PHPUnit/AbstractRectorTestCase.php:61

ERRORS!
Tests: 1, Assertions: 0, Errors: 1.

Theses issues mention a similar problem and recommend updating rector

https://github.com/rectorphp/rector/issues/7226 https://github.com/rectorphp/rector/issues/7888

Also we dont use phpstan in CI so i removed it.

mhsdesign commented 4 months ago

Also why is it composer run test in ci instead of https://github.com/neos/rector/blob/4843c45f5bd901bd63aad0d1d0367df394e2cd1e/composer.json#L15 tests??? that cant work lol :D

mhsdesign commented 4 months ago

Moving from 0.15.x to 0.19.x is not easy ... while the releases dont declare any big breaking changes nothing works after an update... and then there is already a stable rector v1 out there ready to be used :O

kdambekalns commented 3 months ago

Should this be closed in favor of #59?

mhsdesign commented 3 months ago

yes can be, i already had a lot of local things changed but discarded them when i hit the wall