-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Asset] Adding a new version strategy that reads from a manifest JSON file #22046
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
Changes from all commits
e41cf49
1a3d465
6d19549
36fa8b3
0a99143
b2c7d32
9ed9c57
aa32896
99251c3
bebf674
5955f17
14d50e1
ff8869a
ada2471
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -551,6 +551,7 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode) | |
->scalarNode('version_strategy')->defaultNull()->end() | ||
->scalarNode('version')->defaultNull()->end() | ||
->scalarNode('version_format')->defaultValue('%%s?%%s')->end() | ||
->scalarNode('json_manifest_path')->defaultNull()->end() | ||
->scalarNode('base_path')->defaultValue('')->end() | ||
->arrayNode('base_urls') | ||
->requiresAtLeastOneElement() | ||
|
@@ -567,6 +568,18 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode) | |
}) | ||
->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets".') | ||
->end() | ||
->validate() | ||
->ifTrue(function ($v) { | ||
return isset($v['version_strategy']) && isset($v['json_manifest_path']); | ||
}) | ||
->thenInvalid('You cannot use both "version_strategy" and "json_manifest_path" at the same time under "assets".') | ||
->end() | ||
->validate() | ||
->ifTrue(function ($v) { | ||
return isset($v['version']) && isset($v['json_manifest_path']); | ||
}) | ||
->thenInvalid('You cannot use both "version" and "json_manifest_path" at the same time under "assets".') | ||
->end() | ||
->fixXmlConfig('package') | ||
->children() | ||
->arrayNode('packages') | ||
|
@@ -582,6 +595,7 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode) | |
->end() | ||
->end() | ||
->scalarNode('version_format')->defaultNull()->end() | ||
->scalarNode('json_manifest_path')->defaultNull()->end() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just asking: would Same for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a good thought. I don't know! It's a fairly easy thing to deprecate and change in the future anyways, and I can't see any other format in the near future. So let's go with what we like best right now. I changed to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. lgtm as json* |
||
->scalarNode('base_path')->defaultValue('')->end() | ||
->arrayNode('base_urls') | ||
->requiresAtLeastOneElement() | ||
|
@@ -598,6 +612,18 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode) | |
}) | ||
->thenInvalid('You cannot use both "version_strategy" and "version" at the same time under "assets" packages.') | ||
->end() | ||
->validate() | ||
->ifTrue(function ($v) { | ||
return isset($v['version_strategy']) && isset($v['json_manifest_path']); | ||
}) | ||
->thenInvalid('You cannot use both "version_strategy" and "json_manifest_path" at the same time under "assets" packages.') | ||
->end() | ||
->validate() | ||
->ifTrue(function ($v) { | ||
return isset($v['version']) && isset($v['json_manifest_path']); | ||
}) | ||
->thenInvalid('You cannot use both "version" and "json_manifest_path" at the same time under "assets" packages.') | ||
->end() | ||
->end() | ||
->end() | ||
->end() | ||
|
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.
quotes around "json_manifest_path"?