-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[2.7][Asset] Empty version strategy for package #14832
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
Comments
I'm having the same issue. Prior to Symfony 2.7, the above configuration would result into:
Since Symfony 2.7 the query parameter is always appended, even if the value is empty:
|
@XWB are you using |
@stof I'm using the following config:
|
and what is the value of the |
A string: class MyBundle extends Bundle
{
public function build(ContainerBuilder $container)
{
parent::build($container);
$container->setParameter('app_version', '2.3.4');
}
} |
Can you replicate it in a fresh Symfony install? |
@dosten Yes I can. |
@XWB a comment from you which has been removed said it was related to the casting in f74a1f2#diff-5e7347edce37c5886ec67b7ba02f3a9cR81 Does it actually work if you removing the string casting there ? |
@stof I tried, removing the string cast will just set the package version to the default version. So that does not work either. |
I uploaded a fresh Symfony install:
Modified files: https://github.com/XWB/asset/blob/master/app/Resources/views/default/index.html.twig#L6 |
Found it: f74a1f2#diff-0e793081ceb720201745c982a568903fR619 Changing |
PR for this issue - #16509 |
Also #16522 kind of PR for this issue, can help also, but in another way. |
…ages (ewgRa) This PR was merged into the 2.7 branch. Discussion ---------- [2.7][Asset] Ability to set empty version strategy in packages | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no, but not sure, as for me test was wrong | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14832 | License | MIT | Doc PR | Comment about '' thing. As you can see in xml test - we can't for attribute set null value. And for xml version '' empty string considered as null value, that affect all others formats and test is changed. Commits ------- 646fc9c Ability to set empty version strategy in packages
This PR was merged into the 2.7 branch. Discussion ---------- [2.7][Asset] Add defaultNull to version configuration | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #14832, #16511 | License | MIT | Doc PR | In #16511 PR was omitted defaultNull version for one case. Commits ------- 65adb72 add defaultNull to version
This PR was squashed before being merged into the 3.1-dev branch (closes #17532). Discussion ---------- [Asset] Version as service | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | While I working on #14832 I realize that all this problems and hidden magic can be avoided, if we will have ability to set asset version strategy as service. This PR implementation of this idea. Now it is possible to do something like this: ```yaml framework: assets: version_strategy: assets.custom_version_strategy base_urls: http://cdn.example.com packages: foo: base_urls: ["https://example.com"] version_strategy: assets.custom_version_strategy ``` There is can be some conflicts with #16511 when it will be in master Commits ------- 52d116b [Asset] Version as service
Hello! In ~2.6 version was EmptyVersionStrategy for images package. In 2.7 replaced default version from framework.assets
From app/cache/prod/appProdProjectContainer.php
The text was updated successfully, but these errors were encountered: