Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable#38063
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
nicolas-grekas commentedSep 4, 2020
Recipe update atsymfony/recipes#817 |
7047a87 to51d8d33CompareUh oh!
There was an error while loading.Please reload this page.
51d8d33 tofaf01b6Comparenicolas-grekas commentedSep 4, 2020
Doc update:symfony/symfony-docs#14176 |
OskarStark left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you Nicolas 🥰😍
faf01b6 to54c965cComparenicolas-grekas commentedSep 7, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Updated to |
fabpot commentedSep 7, 2020
Thank you@nicolas-grekas. |
This PR was merged into the 4.4 branch.Discussion----------Fix path to preload fileAccording tosymfony/symfony#38063Commits-------b830395 Fix path to preload file
deflock commentedSep 7, 2020
@nicolas-grekas sorry, I'm not sure, but will this work on environments with read-only src/? |
alexander-schranz commentedSep 28, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
@nicolas-grekas any way to disable this behaviour? We currently have some issues with the preloading in sulu and this file should not be generated in our case. Also I personally think cache:clear should nothing write in the If the file stays at |
nicolas-grekas commentedSep 28, 2020 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
var/ and config/ don't exist from the pov of the code. The code knows only about a cache-dir, a project-dir and the directory where the Kernel is found (by reflection). But why is generating this file an issue? You didn't explain it. If preloading doesn't work with sulu, just don't use it?
That'd mean hardcoding the env in the path (since the path contains "prod"). Doable, but this would need a reason (the current way has the benefit of being unconditional, thus quite easy to configure by default by hosters). |
nicolas-grekas commentedSep 28, 2020
Please note that if you think this should be discussed seriously, a closed PR is not the place as itwill be forgotten. |
alexander-schranz commentedSep 28, 2020
@nicolas-grekas oh sorry you are correct an own issue would be better created one here:#38334. Mostly the problem is on our side that its misleading devs using sulu that preloading is now possible over this file generated by symfony but its currently not in sulu so we would like to avoid generating of it until preloading is supported. |
…in src/ to make opcache.preload predictable" (nicolas-grekas)This PR was merged into the 4.4 branch.Discussion----------Revert "bug#38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable"| Q | A| ------------- | ---| Branch? | 4.4| Bug fix? | yes| New feature? | no| Deprecations? | no| Tickets |Fix#38334| License | MIT| Doc PR | -As discussed in the linked issue, let's replace this with a recipe:symfony/recipes#825TL;DR, these PRs replace `src/.preload.php` (generated) by `config/preload.php` (committed).Commits-------662fcff Revert "bug#38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable (nicolas-grekas)"
* 4.4: Revert "bug#38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable (nicolas-grekas)" [PhpUnitBridge] Fix class_alias() for PHPUnit\Framework\Error\Error
* 5.1: [FrameworkBundle] Add Mailjet definition Revert "bug#38063 [FrameworkBundle] generate preload.php in src/ to make opcache.preload predictable (nicolas-grekas)" [PhpUnitBridge] Fix class_alias() for PHPUnit\Framework\Error\Error
Uh oh!
There was an error while loading.Please reload this page.
As seen insymfonycorp/cloud-templates#15, having the path of the preload file vary by env+debug makes configuring PHP.ini settings impossible.
This PR dump a new
preload.phpfile insrc/whencache:clearis called.This makes the path predictable.
This is submitted as a bugfix because the current behavior is barely usable without this change.