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
Use absolute path to generate and check / cache #32599
Comments
that's a good start, PR welcome :) |
Yes indeed, Do you think it is necessary to modify the resource upstream before creating How to inject this parameter when you have a lot of |
I think patching |
I try to play with it but unfortunately update ContainerBuilder::fileExists() change anything. |
Thank you for this issue. |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
Hey, I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen! |
Symfony version(s) affected: 3.4
Description
My issue is a complement to this PR : #32579
When one uses Docker in development mode with a different mounting point between CLI & FPM or local & docker in
the cache keeps regenerating because the all ressource
Symfony\Component\Config\Resource\FileResource
,Symfony\Component\Config\Resource\GlobResource
,Symfony\Component\Config\Resource\FileExistenceResource
,Symfony\Component\Config\Resource\DirectoryResource
(and maybe others) class see adifferent path for each SAPI. For example /home/app/app/vendor vs
/var/www/app/vendor.
So if you hit FPM, then the CLI, then FPM, each time a new cache is
generated. So the application is quite slow in dev env. And for people
on MacOSX (with docker) is a big pain! And obvisouly, this never
stabilizes !
How to reproduce
Clear cache localy and show your app via docker (FPM, or CLI). First time is very very slow because cache will be re generated;
Possible Solution
Referenced resources with the absolute path. But for that you have to inject
PROJECT_DIR
in the right place.I'm ready to PR this fix. Can you help me ?
The text was updated successfully, but these errors were encountered: