Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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

Closed

Conversation

@GromNaN
Copy link
Member

QA
Branch?6.0
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PRsymfony/symfony-docs#...

assets.strict_mode make it easier to debug when an asset is missing from the manifest. Usingkernel.debug as 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.

->args([
abstract_arg('manifest path'),
service('http_client')->nullOnInvalid(),
false,
Copy link
MemberAuthor

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)

Copy link
Member

@weaverryanweaverryan left a 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
Copy link
MemberAuthor

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
Copy link
Member

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
Copy link
Member

In particular, I don't think that the strict mode should be related tokernel.debug, as it is about whether your manifest is exhaustive or no.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@weaverryanweaverryanweaverryan left review comments

Assignees

No one assigned

Projects

None yet

Milestone

6.0

Development

Successfully merging this pull request may close these issues.

4 participants

@GromNaN@weaverryan@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp