Description
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 a
different 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 ?