- Issue created by @alex.skrypnyk
- π¦πΊAustralia alex.skrypnyk Melbourne
Workaround: `composer require --dev rector/rector:0.15.18`
- π«π·France Grimreaper France π«π·
Hi,
I am having the same issue.
Thanks for the bug report.
- πΊπΈUnited States utcwebdev
We are having same issue. Thanks @alex.skrypnyk for the workaround!
- πͺπΈSpain pgrandeg
Downgrade to 0.15.18 was the key in my case
Thank you @alex.skrypnyk! - Status changed to Needs review
over 1 year ago 5:34pm 13 March 2023 - ππΊHungary GΓ‘bor Hojtsy Hungary
Reproduced this problem today. @mglaman suggested to add a conflict to drupal-rector to temporarily make it work. Locally that worked (when the conflict was added to the global composer.json file in the project). So proposing https://github.com/palantirnet/drupal-rector/pull/219
I suggest giving credit to @mglaman too.
- π·π΄Romania claudiu.cristea Arad π·π΄
I've adde the conflict line suggested in #6 to project root composer.json. However, now I'm getting:
"PHPStan\ShouldNotHappenException" thrown in "vendor/mglaman/phpstan-drupal/drupal-autoloader.php" on line 7 while loading bootstrap file vendor/mglaman/phpstan-drupal/drupal-autoloader.php: The autoloader did not receive the container.
Not sure is related
- π¨π¦Canada andrew.wang
In my site, I had to downgrade to 0.15.13 instead of 0.15.18 for some reason.
- πΊπΈUnited States mglaman WI, USA
New PR to build off of GΓ‘bor's work: https://github.com/palantirnet/drupal-rector/pull/220
The issue is:
\Rector\Core\Autoloading\BootstrapFilesIncluder::includeBootstrapFiles used to have BootstrapFilesIncluder in scope. This doesn't. We need to fix the assumptions in drupal-phpunit-bootstrap-file.php.
Change in \Rector\Core\Autoloading\BootstrapFilesIncluder::tryRequireFile moved to static closure, removing scope but adding PHPStan container
(static function (string $bootstrapFile) use ($container): void { require_once $bootstrapFile; })($bootstrapFile);
It now passes in \PHPStan\DependencyInjection\Container as a global value
PR removes dependency on container, luckily passing
__DIR__
to locate Drupal OK. - Status changed to Fixed
over 1 year ago 9:01pm 23 March 2023 - πΊπΈUnited States agentrickard Georgia (US)
This has been fixed in https://github.com/palantirnet/drupal-rector/releases/tag/0.15.1
Automatically closed - issue fixed for 2 weeks with no activity.