Skip to content

Commit

Permalink
Support use of hyphen in asset package name
Browse files Browse the repository at this point in the history
| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no
| Tests pass?   | yes (Manual tests only)
| Fixed tickets | #28122
| License       | MIT
| Doc PR        | n/a

According to issue symfony/symfony-docs#10442, we tested in a demo bundle, for example in src/AppBundle/Resources/config/config.yml a package using hyphens: app-client-frontend, and withouth the patch it fails because the package is not recognized. With the patch, it works as expected.
```
framework:
    assets:
        packages:
            app-client-frontend:
                version: "%env(FRONTEND_VERSION)%"
                version_format: '%%2$s/dist/%%1$s'
                base_urls:
                  - "%env(FRONTEND_URL)%"
```
  • Loading branch information
damaya authored and Anthony MARTIN committed Jan 28, 2019
1 parent 5a8c06e commit 035c434
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -648,6 +648,7 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode)
->fixXmlConfig('package')
->children()
->arrayNode('packages')
->normalizeKeys(false)
->useAttributeAsKey('name')
->prototype('array')
->fixXmlConfig('base_url')
Expand Down

0 comments on commit 035c434

Please sign in to comment.