Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[DI] allow loading and dumping tags with an attribute named "name"#36586

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromnicolas-grekas:di-name-tag-attr
May 3, 2020

Conversation

nicolas-grekas
Copy link
Member

QA
Branch?master
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
Doc PR-

This is a minor feature added for consistency: using PHP, we can already define tags with an attribute named"name". But then, we cannot dump such definitions in YAML nor XML since we don't have a syntax to declare such tags in these formats.

I spotted this while looking at a dumped container: we already use an attribute named"name" on two tags:cache.pool andworkflow.definition. Currently, the dumped XML is wrong because of this.

This PR enables the following new syntaxes (the current style still works as usual):

  • in YAML, consistently with the new syntax for method calls:
    tags:  -cache.pool:{ name: my_cache_pool }
  • in XML:
    <tagname="my_cache_pool">cache.pool</tag>

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

@fabpotfabpot merged commitd6aa205 intosymfony:masterMay 3, 2020
@nicolas-grekasnicolas-grekas deleted the di-name-tag-attr branchMay 4, 2020 08:04
@nicolas-grekasnicolas-grekas modified the milestones:next,5.1May 4, 2020
@fabpotfabpot mentioned this pull requestMay 5, 2020
nicolas-grekas added a commit that referenced this pull requestApr 21, 2023
…when it does not define their name (MatTheCat)This PR was squashed before being merged into the 6.2 branch.Discussion----------[DependencyInjection] Do not ignore tags `name` attribute when it does not define their name| Q             | A| ------------- | ---| Branch?       | 6.2| Bug fix?      | yes| New feature?  | no| Deprecations? | no| Tickets       |Fix#50081| License       | MIT| Doc PR        | N/ATags `name` attribute is ignored using XML if the tag name is its node content. That means `<tag name="name_attribute">tag_name</tag>` will return a `tag_name` tag without any attribute.This seems to be a regression from#36586.Commits-------4c9c688 [DependencyInjection] Do not ignore tags `name` attribute when it does not define their name
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@fabpotfabpotfabpot approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
5.1
Development

Successfully merging this pull request may close these issues.

3 participants
@nicolas-grekas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp