-
-
Notifications
You must be signed in to change notification settings - Fork 699
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 in Docker autoload issue #5003
Comments
Hi, thanks for the feedback. |
Hi. I think that this is a "feature, not a bug" situation 😄 Can you Share what symfony version does your application use? I am specifically asking if It makes me think, that you just faced version mismatch - rector uses newer version of symfony, than your application requires in composer.json - this is usually solved using prefixed rector, unfortunately docker image does not use prefixed, but "classic" rector dependency, just installed globally. Your workaround works, because if you change workdir to rector, it gets higher priority for autoloading and rector files are autoloaded first and same class but from different directory (your project's vendor) will not get autoloaded anymore, because it is loaded already. Your solution might work for someone and maybe for someone else not - it is unexplored area 😄 |
Hi. This one "feature" not on symfony application... But we have in project some symfony components....
this one You are right about unexplored area )) |
Continue in far developed issue #5593 |
rectorphp/rector-src@cbc632c RenameFunctionRector: prevent repeated isName() calls (#5003)
For those who faced with error
[ERROR] Call to undefined method Symfony\Component\DependencyInjection\ContainerBuilder::autowire()
even doing command like this
docker run --rm -v $(pwd):/project rector/rector:latest list
Try to add
--workdir "/rector"
, so the command will bedocker run --rm -v $(pwd):/project --workdir "/rector" rector/rector:latest list
And for command
process
you should add--autoload-file=/project/vendor/autoload.php
for autoloading your project files.Notice, /project - its a volume inside the docker container, where you mounted your code
The text was updated successfully, but these errors were encountered: