-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors #21600
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
[DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors #21600
Conversation
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.
👍
use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; | ||
use Symfony\Component\DependencyInjection\ServiceLocator; |
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.
All the order changes should be reverted
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.
Why? This is expected, I've updated the PhpDumper to do so (https://github.com/symfony/symfony/pull/21600/files#diff-f7b23d463cba27ac5e4cb677f2be7623R902).
I know it doesn't matter much, but this use directive was added in master, so I thought we could change this order to respect alphabetical one as soon as it's not released.
Thank you @ogizanagi. |
…date descriptors (ogizanagi) This PR was merged into the 3.3-dev branch. Discussion ---------- [DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | N/A | License | MIT | Doc PR | N/A This simply ensures the new feature is properly considered by the different dumpers, and updates the console descriptors to support the new `ServiceLocatorArgument`. I also added the number of elements in an array/iterator/service_locator argument when using the `TextDescriptor` in this PR. (fabbot is complaining about the new yaml tags support) Commits ------- aa9074d [DI][FrameworkBundle] ServiceLocator: Tests dumpers & update descriptors
@@ -435,6 +436,12 @@ private function getArgumentNodes(array $arguments, \DOMDocument $dom) | |||
foreach ($this->getArgumentNodes($argument->getValues(), $dom) as $childArgumentXML) { | |||
$argumentXML->appendChild($childArgumentXML); | |||
} | |||
} elseif ($argument instanceof ServiceLocatorArgument) { | |||
$argumentXML->setAttribute('type', 'service_locator'); |
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.
the XML format uses a dash, not a underscore. So we should do the same for the descriptor
…to use dashes (ogizanagi) This PR was merged into the 3.3-dev branch. Discussion ---------- [DI][FrameworkBundle] ServiceLocator: fix XmlDescriptor to use dashes | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #21600 (comment) | License | MIT | Doc PR | N/A As reported by @stof, I should have used dashes, not underscores. My bad... Commits ------- 1417f11 [DI][FrameworkBundle] ServiceLocator: fix XML descriptor to use dashes
This simply ensures the new feature is properly considered by the different dumpers, and updates the console descriptors to support the new
ServiceLocatorArgument
.I also added the number of elements in an array/iterator/service_locator argument when using the
TextDescriptor
in this PR.(fabbot is complaining about the new yaml tags support)