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

[Asset] Add option $strictMode to JsonManifestVersionStrategy#14414

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

Merged
javiereguiluz merged 1 commit intosymfony:5.4fromGromNaN:assets-strict
Dec 13, 2021

Conversation

@GromNaN
Copy link
Member

@GromNaNGromNaN commentedOct 14, 2020
edited
Loading

Documentation forsymfony/symfony#38495

@javiereguiluzjaviereguiluz added the Waiting Code MergeDocs for features pending to be merged labelOct 17, 2020
@GromNaNGromNaN changed the title[Asset] Add option $strict to JsonManifestVersionStrategy[Asset] Add option $strictMoe to JsonManifestVersionStrategyJan 30, 2021
@GromNaNGromNaN changed the title[Asset] Add option $strictMoe to JsonManifestVersionStrategy[Asset] Add option $strictMode to JsonManifestVersionStrategyJan 30, 2021
@GromNaNGromNaNforce-pushed theassets-strict branch 2 times, most recently from973798b to3ab23beCompareFebruary 17, 2021 13:38
@carsonbotcarsonbot added this to thenext milestoneMay 26, 2021
@javiereguiluzjaviereguiluz modified the milestones:next,5.4May 26, 2021
fabpot added a commit to symfony/symfony that referenced this pull requestJul 25, 2021
…missing item (GromNaN)This PR was merged into the 5.4 branch.Discussion----------[Asset] [DX] Option to make asset manifests strict on missing item| Q             | A| ------------- | ---| Branch?       | 5.x| Bug fix?      | no| New feature?  | yes| Deprecations? | no| Tickets       | -| License       | MIT| Doc PR        |symfony/symfony-docs#14414In all the projects I use a JSON manifest, when an asset is not listed in manifest.json, the asset file is not generated. The current behavior is permissive as it returns the unmodified path of the asset. Which ends with a 404 when the browser tries to load the asset.With the option `strict_mode: true`, an exception is thrown when we try to use an asset that is not listed in `manifest.json`. Thereby we don't have to check that asset urls are actually working in tests (manual or automated).**Usage:**The option `strict_mode` is optional for backward compatibility. Using the `%kernel.debug%` value is safe to flush bugs on dev or test mode but keep the application working on production.```yaml# config/packages/assets.yamlframework:    assets:        packages:            app:                # Uses a JSON manifest (can be a local path or an url remote file)                json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'                # Throws an exception when an expected entry is missing in the manifest                strict_mode: '%kernel.debug%'```Todo:- [x] Documentationsymfony/symfony-docs#14414- [x] Demosymfony/demo#1168- [x] ~Update recipe ?~Commits-------4cdb921 Option to make asset manifests strict on missing item
@javiereguiluz
Copy link
Member

This been pending for too long. Apart from the rebase, is there anything else to be done to make this mergeable? Thanks!

@GromNaN
Copy link
MemberAuthor

I rebased an updated the doc according to the version it was merged.

@javiereguiluzjaviereguiluz removed the Waiting Code MergeDocs for features pending to be merged labelDec 13, 2021
@javiereguiluzjaviereguiluz merged commitdd89fe0 intosymfony:5.4Dec 13, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@OskarStarkOskarStarkOskarStark left review comments

+1 more reviewer

@maxheliasmaxheliasmaxhelias approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@GromNaN@javiereguiluz@OskarStark@maxhelias@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp