Skip to content
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

[FrameworkBundle] Support use of hyphen in assets package name #28128

Closed
wants to merge 2 commits into from

Conversation

damaya
Copy link
Contributor

@damaya damaya commented Aug 3, 2018

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
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)%"

Support for using hyphens on yaml config for packages names, according to issue symfony#28122 (comment)
Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please enhance the commit message, and update the PR description according to the required template (filled in)?
see https://github.com/symfony/symfony/blob/master/.github/PULL_REQUEST_TEMPLATE.md

@@ -631,7 +631,7 @@ private function addAssetsSection(ArrayNodeDefinition $rootNode)
->end()
->fixXmlConfig('package')
->children()
->arrayNode('packages')
->arrayNode('packages')->normalizeKeys(false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be put on a separate line

@fabpot
Copy link
Member

fabpot commented Sep 4, 2018

Some test should be added as well (example from the related issue would work well here).

@damaya
Copy link
Contributor Author

damaya commented Sep 4, 2018

Sure, sorry the delay in my answer, I'll update the PR with required data.

@fabpot
Copy link
Member

fabpot commented Oct 10, 2018

@damaya Will you have time in the coming days/weeks to finish this PR?

| 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 | symfony#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)%"
```
Copy link
Contributor Author

@damaya damaya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Q A
Branch? master
Bug fix? yes
New feature? no
BC breaks? no
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)%"

@damaya
Copy link
Contributor Author

damaya commented Oct 10, 2018

Hi @fabpot, I updated my commit message and use a new line to improve the syntax. I just did manual tests and this patch worked as expected.
Thanks in advance.

@chalasr chalasr changed the title Update Configuration.php [FrameworkBundle] Support use of hyphen in assets package name Oct 10, 2018
@damaya
Copy link
Contributor Author

damaya commented Oct 12, 2018

Hi there, the latest commit is ok? do you have any feedback about this? thanks in advance.

@fabpot
Copy link
Member

fabpot commented Oct 12, 2018

@damaya I still think that we need to add a test to avoid any regressions in the future. Can you do that or do you need help?

@damaya
Copy link
Contributor Author

damaya commented Oct 12, 2018

@damaya I still think that we need to add a test to avoid any regressions in the future. Can you do that or do you need help?

Hi @fabpot I would love to do that, could you please give me a reference for how to implement tests for this according to the standard? thanks so much.

@nicolas-grekas
Copy link
Member

Continued in #30007, thank you @damaya

fabpot added a commit that referenced this pull request Jan 29, 2019
…ame (damaya, XuruDragon)

This PR was merged into the 3.4 branch.

Discussion
----------

[FrameworkBundle] Support use of hyphen in asset package name

This PR is a continuity of #28128

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #29122
| 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.
```yaml
framework:
    assets:
        packages:
            app-client-frontend:
                version: "%env(FRONTEND_VERSION)%"
                version_format: '%%2$s/dist/%%1$s'
                base_urls:
                  - "%env(FRONTEND_URL)%"
```

Commits
-------

5c58b6e Add PackageNameTest to ConfigurationTest also add in the changelog the corresponding entry to this PR
30b6a4f Support use of hyphen in asset package name
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.3 Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants