-
-
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
Closed
Closed
Changes from 1 commit
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
e41cf49
[Asset][FrameworkBundle] Adding a new version strategy that reads fro…
weaverryan 1a3d465
fabbot
weaverryan 6d19549
Removing .json from extension of a file to work around fabbot not lik…
weaverryan 36fa8b3
Fixing a test
weaverryan 0a99143
== => ===
weaverryan b2c7d32
Another attempt at faking out fabbot. Quick fabbot - look over there!
weaverryan 9ed9c57
Line breaks and not being clever with invalid - just ending with .json
weaverryan aa32896
Tweaks thanks to Stof!
weaverryan 99251c3
Reworking feature so that json_manifest_path is the config key, and i…
weaverryan bebf674
Thanks fabbot!
weaverryan 5955f17
Making test compatible with older phpunit versions
weaverryan 14d50e1
Fixing test - the old way is all inside setExpectedException, the new…
weaverryan ff8869a
Tweaks thanks to fabpot
weaverryan ada2471
Very minor changes thanks to nicolas-grekas
weaverryan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Tweaks thanks to fabpot
- Loading branch information
commit ff8869a36f593173c9e8bdfa333f312d3d649530
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ CHANGELOG | |
3.3.0 | ||
----- | ||
|
||
* A new version strategy option called json_manifest_path was added | ||
* Added a new new version strategy option called json_manifest_path | ||
that allows you to use the JsonManifestVersionStrategy. | ||
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. backticks here? |
||
* Added support for the `controller.service_arguments` tag, for injecting services into controllers' actions | ||
* Deprecated `cache:clear` with warmup (always call it with `--no-warmup`) | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,16 +20,15 @@ | |
* "css/styles.css": "css/styles.555abc.css" | ||
* } | ||
* | ||
* You could then as for the version of "main.js" or "css/styles.css". | ||
* You could then ask for the version of "main.js" or "css/styles.css". | ||
*/ | ||
class JsonManifestVersionStrategy implements VersionStrategyInterface | ||
{ | ||
private $manifestPath; | ||
|
||
private $manifestData; | ||
|
||
/** | ||
* @param string $manifestPath Absolute path to the manifest file. | ||
* @param string $manifestPath Absolute path to the manifest file | ||
*/ | ||
public function __construct($manifestPath) | ||
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. please add the phpdoc describing the argument as a string, as we don't have a typehint to tell it |
||
{ | ||
|
@@ -40,10 +39,6 @@ public function __construct($manifestPath) | |
* With a manifest, we don't really know or care about what | ||
* the version is. Instead, this returns the path to the | ||
* versioned file. | ||
* | ||
* @param string $path | ||
* | ||
* @return string | ||
*/ | ||
public function getVersion($path) | ||
{ | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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"?