-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Dependency-Injection] Preloading file is not generated #34750
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
Comments
…p is in /app (nicolas-grekas) This PR was merged into the 3.4 branch. Discussion ---------- [DI] Fix making the container path-independent when the app is in /app | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #34750, Fix #34611 | License | MIT | Doc PR | - Right now, we mandate the app to be nested in a directory of level 2 minimum. This means apps cannot be made path-independent if they are built in e.g. `/app`. Commits ------- b33b9a6 [DI] Fix making the container path-independent when the app is in /app
so fast! thx ;) |
How to solve? @Plopix |
@khs1994 either wait for the next patch release at the end of the month, or use the dev version. But anyway, given that PHP 7.4.0 is itself broken for preloading, waiting is a sane option, unless you also compile a dev version of PHP. |
PHP 7.4.1 Fixed? |
Well, PHP 7.4.1 is expected to fix the seg faults which happen in 7.4.0 when using the preload file generated by Symfony. And Symfony 4.4.1 and 5.0.1 will include a fix for the case where this file was not generated when running on platform.sh and some other hosting. |
Symfony version(s) affected: 4.4.x and 5.x
The issue was detected on Platform.sh using PHP 7.4 trying to enable the Preloading support.
Description
On Platform.sh the file
var/cache/prod/srcApp_KernelProdContainer.preload.php
is NOT generated when it is working locally.How to reproduce
Just deploy an empty app on Platform.sh.
OR (and the following explanation will explain why)
/
bin/console
Reasons
This is happening for 3 combined reasons:
/app
The return of
getAutoloadFile
is always null is this context.https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L306
And that is even explained in the code:
Traces that explain the bug better
preg_match
: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php#L2055When it works:
here the
preg_match
worksWhen it DOES NOT work (on Platform.sh):
here the
preg_match
DOES NOT workSolutions
That is a bit deep in the stack and I don't know enough to propose something. But if you tell me I could do it ;)
ping @nicolas-grekas
The text was updated successfully, but these errors were encountered: