Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
hason commentedOct 21, 2013
Duplicated#6147 |
sandermarechal commentedNov 8, 2013
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 commentedMar 7, 2014
Any updates on whether this issue or issue#6147 will be merged? |
There was a problem hiding this comment.
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 commentedMar 28, 2014
@sandermarechal Can you rebase on current master? To answer your questions:
|
fabpot commentedApr 2, 2014
Closing in favor of#10619 |
… 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
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.
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:
Symfony\Component\DependencyInjection\SimpleXMLElementstill 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.parseFilemethod still returns a SimpleXMLElement to maintain BC. I have added a new functionparseFileToDOMthat is used by the XmlFileLoader itself. If this is not part of the API we could drop that new function and haveparseFilereturn a\DOMDocumentinstead.