8000 [Asset] Adding a new version strategy that reads from a manifest JSON file by weaverryan · Pull Request #22046 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[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
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Very minor changes thanks to nicolas-grekas
  • Loading branch information
weaverryan committed Mar 24, 2017
commit ada2471f27e1a9c2c707cc973ea42260f9c68824
2 changes: 1 addition & 1 deletion src/Symfony/Bundle/FrameworkBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ CHANGELOG
-----

* Added a new new version strategy option called json_manifest_path
Copy link
Member

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"?

that allows you to use the JsonManifestVersionStrategy.
that allows you to use the `JsonManifestVersionStrategy`.
* 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`)
* Deprecated the "framework.trusted_proxies" configuration option and the corresponding "kernel.trusted_proxies" parameter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -876,7 +876,6 @@ private function createVersion(ContainerBuilder $container, $version, $format, $
if (null !== $jsonManifestPath) {
$def = new ChildDefinition('assets.json_manifest_version_strategy');
$def->replaceArgument(0, $jsonManifestPath);
$def->setPublic(false);
$container->setDefinition('assets._version_'.$name, $def);

return new Reference('assets._version_'.$name);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<service id="assets.empty_version_strategy" class="Symfony\Component\Asset\VersionStrategy\EmptyVersionStrategy" public="false" />

<service id="assets.json_manifest_version_strategy" class="Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy" abstract="true">
<service id="assets.json_manifest_version_strategy" class="Symfony\Component\Asset\VersionStrategy\JsonManifestVersionStrategy" abstract="true" public="false">
<argument /> <!-- manifest path -->
</service>

Expand Down
2 changes: 1 addition & 1 deletion src/Symfony/Component/Asset/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CHANGELOG

3.3.0
-----
* Added JsonManifestVersionStrategy as a way to read final,
* Added `JsonManifestVersionStrategy` as a way to read final,
versioned paths from a JSON manifest file.

2.7.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,7 @@ public function getVersion($path)

public function applyVersion($path)
{
$manifestPath = $this->getManifestPath($path);

return $manifestPath ?: $path;
return $this->getManifestPath($path) ?: $path;
}

private function getManifestPath($path)
Expand Down
0