Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Framework][Assets] Set assets manifest strict by default on debug#43517
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
| ->args([ | ||
| abstract_arg('manifest path'), | ||
| service('http_client')->nullOnInvalid(), | ||
| false, |
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.
This default value was discussed with@weaverryan in#38495 (comment)
weaverryan 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.
Hmm, this may makes sense. However, it's a BC break: on 5.4 if I have a path that isn't included, then on 6.0, I'll suddenly have an error. Also, there may be people who are putting some of their files directlypublic/ and, for those files, they won't be inmanifest.json and that's ok. I think we probably can't make this change
GromNaN commentedOct 17, 2021
That's a good point. People may rely on this fallback behaviour to mix assets listed and not listed in the manifest.json, using a single asset package. Should it be considered as a good practice? This use-case will still be supported, but require the option strict_mode to be set to false explicitly. I could add a deprecation in 5.4? |
weaverryan commentedOct 18, 2021
Hmm, the question is: is strict mode such a better default that it’s worth the pain of deprecating it and forcing people to turn it to true. I’m not convinced that it is. So I’m 👎 for making this the default. |
stof commentedOct 18, 2021
In particular, I don't think that the strict mode should be related to |
assets.strict_modemake it easier to debug when an asset is missing from the manifest. Usingkernel.debugas default value would release developers from configuring this option (symfony/demo#1168).This is consistent with Twig environment that is strict on debug by default.