-
-
Notifications
You must be signed in to change notification settings - Fork 708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rector-prefixed 0.7 throw '...PhpStormStubsMap' errors #2879
Comments
Could you send Github Action just for this so we have it covered? |
I am not familiar with Github Action. How do I send it? |
Basically copy this file: rector/.github/workflows/test_with_doctrine.yaml Lines 20 to 33 in 36ffd47
and replace |
On additional testing locally, I found that when I install |
I'd love to look at it. Failing CI is needed. |
Well... currently CI is failing but not because of Rector... |
@ondrejmirtes Hi Ondra, the |
I just compared how rector.phar vs. phpstan.phar looks like: Rector:PhpStormStubsMap.php - NOT inside prefixed _HumbugBox namespace PHPStan:PhpStormStubsMap.php - inside prefixed _HumbugBox namespace This PhpStormStubsMap is not whitelisted from prefixing thanks to this line (https://github.com/phpstan/phpstan-src/blob/e18b3b47c8e1b91f1844dd3c91d961e912476d86/compiler/build/scoper.inc.php#L16-L18) so I guess that Rector's PHP-Scoper prefixing process is somehow broken. @TomasVotruba You should be able to debug these issues yourself, if you consider Rector's PHAR file first-class citizen. Of course if the cause is in PHPStan itself, I'm happy to help you. But in this case it doesn't seem PHPStan's fault. |
@shaal I made the CI fail finally: https://github.com/rectorphp/rector-prefixed/runs/470008289 |
@ondrejmirtes Thanks for the check. rector/compiler/build/scoper.inc.php Lines 22 to 30 in 37cd497
Or is there any difference? |
I don't know, try debugging to see why it's happening what's happening... |
How do you debug scoper? I don't use xdebug and I have troubles just using it. Error messages are very random to me |
So according to CI: https://travis-ci.org/rectorphp/rector/builds/655444246?utm_source=github_status&utm_medium=notification The |
I've solved it by adding it as a dependency + renaming stubs as you recommended. Locally it works... but in Travis CI it fails, on missing https://travis-ci.org/rectorphp/rector/builds/655482789#L322 |
rectorphp/rector-src@55227be Removing SmartFileInfo (#2879)
Current Behaviour
Installing Drupal8 and adding rector-prefixed 0.6.13 works as expected
Steps to replicate:
composer create-project drupal/recommended-project drupal8
cd drupal8
composer require rector/rector-prefixed:0.6.13 --dev
vendor/bin/rector process web/core/modules/aggregator/src/Plugin/views/row/Rss.php --set deadcode --dry-run
The output is correct and it display the diff of berfore/after the rector
But upgrading to rector-prefix v0.7 is causing problems:
composer require rector/rector-prefixed:0.7 --dev
vendor/bin/rector process web/core/modules/aggregator/src/Plugin/views/row/Rss.php --set deadcode --dry-run
report from command line with --debug
vendor/bin/rector process web/core/modules/aggregator/src/Plugin/views/row/Rss.php --set deadcode --dry-run --debug
Minimal PHP Code Causing Issue
Expected Behaviour
The text was updated successfully, but these errors were encountered: