[e2e] $rectorConfig->skip() should not skip inside different path over config#4882
[e2e] $rectorConfig->skip() should not skip inside different path over config#4882TomasVotruba merged 4 commits intomainfrom
Conversation
|
@TomasVotruba https://getrector.com/demo/5871515d-0885-4df1-bd65-ef36442d5703 |
|
@TomasVotruba it seems bug on |
|
@TomasVotruba @staabm fixed 🎉 , the forgetting service on |
|
All checks have passed 🎉 🎉 🎉 @TomasVotruba I think it is ready 🎉 🎉 🎉 🎉 🎉 |
|
Thank you 😊👍 |
| } | ||
| } | ||
|
|
||
| $hasForgotten = true; |
There was a problem hiding this comment.
is this flag still correct then?
There was a problem hiding this comment.
That seems used on line 727 to run once on phpunit
| foreach ($skippedElements as $skippedClass => $path) { | ||
| // completely forget the Rector rule only when no path specified | ||
| if ($path === null) { | ||
| ContainerMemento::forgetService($container, $skippedClass); |
There was a problem hiding this comment.
could you give me an idea why we need to drop classes from the container when rules are skipped?
There was a problem hiding this comment.
This @TomasVotruba blog post may be the reason https://tomasvotruba.com/blog/removing-service-from-laravel-container-is-not-that-easy
|
thanks for the fix! |
@TomasVotruba @staabm this is e2e test for check the config:
which means, if the path is different, eg:
src/models, it should still run, it currently show:which incorrect.
Directly use
__DIR__ . '/src/controllers'in skip paths() seems completely skip all, not sure if there is different issue, that probably need separate PR.