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

[DependencyInjection] Use DOM instead of SimpleXML for namespace support#9350

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

Closed

Conversation

@sandermarechal
Copy link
Contributor

QA
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#9345
LicenseMIT
Doc PR

This PR makes the XmlFileLoader use the DOM instead of SimpleXML. This allows full namespace support in XML files. Previously, the Symfony container namespace had to be the default namespace for the document. See also#9345.

Some things to discuss:

I avoided any BC breaks but I do not know if the things I avoided breaking are actually part of the API. There are two places this applies to:

  1. TheSymfony\Component\DependencyInjection\SimpleXMLElement still exists, but it is no longer used, except to maintain BC. It does not appear to be used anywhere else in Symfony itself. Maybe some userland code uses it somewhere. If this is not part of the API it could be removed.
  2. TheparseFile method still returns a SimpleXMLElement to maintain BC. I have added a new functionparseFileToDOM that is used by the XmlFileLoader itself. If this is not part of the API we could drop that new function and haveparseFile return a\DOMDocument instead.

@hason
Copy link
Contributor

Duplicated#6147

@sandermarechal
Copy link
ContributorAuthor

@fabpot Can this, or#6147 be merged?

guilhermeblanco pushed a commit to doctrine/DoctrineBundle that referenced this pull requestJan 27, 2014
This allows tagging a service with an 'doctrine.orm.entity_listener'tag. These tagged services will automatically be registered with theentity listener resolver.Note: The changes to the XML fixture cannot be parsed due to a bug inthe Symfony DependencyInjection component. A PR that fixes this issuecan be found atsymfony/symfony#9350. When thatPR has been merged, all tests in this commit pass.
@sandermarechal
Copy link
ContributorAuthor

Any updates on whether this issue or issue#6147 will be merged?

Copy link
Member

Choose a reason for hiding this comment

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

This method should be private.

@fabpot
Copy link
Member

@sandermarechal Can you rebase on current master?

To answer your questions:

  1. Symfony\Component\DependencyInjection\SimpleXMLElement cannot be removed but it must be marked as deprecated in 2.5 (to be removed in 3.0)

  2. Drop the currentparseFile() method.

@fabpot
Copy link
Member

Closing in favor of#10619

@fabpotfabpot closed thisApr 2, 2014
fabpot added a commit that referenced this pull requestApr 2, 2014
… namespace support (sandermarechal, romainneutron)This PR was merged into the 2.5-dev branch.Discussion----------[DependencyInjection] Use DOM instead of SimpleXML for namespace support| Q             | A| ------------- | ---| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | yes| Tests pass?   | yes| Fixed tickets |#9345| License       | MITThis PR replaces#9350Commits-------a3c60c8 [DependencyInjection] Deprecate SimpleXMLElement33c91f9 [DependencyInjection] Use DOM instead of SimpleXML for namespace support
BonyHanter83 added a commit to BonyHanter83/DoctrineBundle that referenced this pull requestMay 29, 2025
This allows tagging a service with an 'doctrine.orm.entity_listener'tag. These tagged services will automatically be registered with theentity listener resolver.Note: The changes to the XML fixture cannot be parsed due to a bug inthe Symfony DependencyInjection component. A PR that fixes this issuecan be found atsymfony/symfony#9350. When thatPR has been merged, all tests in this commit pass.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@sandermarechal@hason@fabpot

[8]ページ先頭

©2009-2025 Movatter.jp