Skip to content

Conversation

@wouterj
Copy link
Member

@wouterj wouterj commented Nov 10, 2013

Currently, when using tags in XML, the options aren't normalized. This means that the following code is wrong:

<tag name="sonata_admin" manager-type="doctrine_phpcr" ... />

It should be manager_name to remove errors, but that's not following the XML rules. The solution is to use the same normalization as the configuration: replacing - with _.

To be BC, both options (with and without normalization) are kept

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Copy link
Contributor

Choose a reason for hiding this comment

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

line break?

Copy link
Member Author

Choose a reason for hiding this comment

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

line break?

Copy link
Contributor

Choose a reason for hiding this comment

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

i guess that piece of logic goes together with the one below

@fabpot
Copy link
Member

fabpot commented Nov 12, 2013

Can you add a unit test?

@wouterj
Copy link
Member Author

wouterj commented Nov 12, 2013

@fabpot done

Copy link
Contributor

Choose a reason for hiding this comment

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

i think indentation needs to be here 4 spaces

fabpot added a commit that referenced this pull request Dec 16, 2013
…terJ)

This PR was submitted for the 2.3-dev branch but it was merged into the 2.3 branch instead (closes #9489).

Discussion
----------

[DependencyInjection] Add normalization to tag options

Currently, when using tags in XML, the options aren't normalized. This means that the following code is wrong:

    <tag name="sonata_admin" manager-type="doctrine_phpcr" ... />

It should be `manager_name` to remove errors, but that's not following the XML rules. The solution is to use the same normalization as the configuration: replacing - with _.

To be BC, both options (with and without normalization) are kept

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Commits
-------

06d64d8 Do normalization on tag options
@fabpot fabpot closed this Dec 16, 2013
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.

4 participants