Drupal rector is not working for PHP 8.1 and drupal 9.4.8

Created on 14 November 2022, over 1 year ago
Updated 10 May 2024, about 2 months ago

Current configuration in my local.
Drupal version : 9.4.8
Rector : 0.13.1
PHPStan: 1.9.2

I am facing below issue when I run rector command. Please find attached screenshot.

PHP Fatal error: Uncaught _PHPStan_9a6ded56a\Nette\DI\ServiceCreationException: Service of type PHPStan\PhpDocParser\Parser\PhpDocParser: Unable to pass specified arguments to PhpDocParser::__construct(). in phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Resolver.php:421
Stack trace:
#0 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Resolver.php(170): _PHPStan_9a6ded56a\Nette\DI\Resolver::autowireArguments(Object(ReflectionMethod), Array, Object(Closure))
#1 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Definitions/ServiceDefinition.php(158): _PHPStan_9a6ded56a\Nette\DI\Resolver->completeStatement(Object(_PHPStan_9a6ded56a\Nette\DI\Definitions\Statement))
#2 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Resolver.php(123): _PHPStan_9a6ded56a\Nette\DI\Definitions\ServiceDefinition->complete(Object(_PHPStan_9a6ded56a\Nette\DI\Resolver))
#3 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerBuilder.php(252): _PHPStan_9a6ded56a\Nette\DI\Resolver->completeDefinition(Object(_PHPStan_9a6ded56a\Nette\DI\Definitions\ServiceDefinition))
#4 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Compiler.php(203): _PHPStan_9a6ded56a\Nette\DI\ContainerBuilder->complete()
#5 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/Compiler.php(159): _PHPStan_9a6ded56a\Nette\DI\Compiler->processBeforeCompile()
#6 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerLoader.php(99): _PHPStan_9a6ded56a\Nette\DI\Compiler->compile()
#7 phar:///var/www/html/vendor/rector/rector/vendor/phpstan/phpstan/phpstan.phar/vendor/nette/di/src/DI/ContainerLoader.php(66): _PHPStan_9a6ded56a\Nette\DI\ContainerLoader->generate('Container_e3dd6...', Array)

💬 Support request
Status

Fixed

Component

Code

Created by

🇮🇳India ashetkar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024