-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
[DependencyInjection][FrameworkBundle] Use php-serialize to dump the container for debug/lint commands #60597
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
Conversation
965f23d
to
013e6ce
Compare
e804022
to
930c4a6
Compare
930c4a6
to
f22faac
Compare
f22faac
to
fca2a84
Compare
…container for debug/lint commands
fca2a84
to
c128f55
Compare
Let's merge this @symfony/mergers ? |
@nicolas-grekas the XML dump has an issue because percent signs are not necessarily escaped and env var placeholders are reset to their Could the new dump format be the occasion to fix this issue? |
Can you double-check this aspect? |
Yes, this is what #34541 tried to solve. |
Opened #61306 |
…inerBuilders (MatTheCat) This PR was merged into the 7.4 branch. Discussion ---------- [FrameworkBundle] Escape parameters when serializing ContainerBuilders | Q | A | ------------- | --- | Branch? | 7.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | N/A | License | MIT Since the `XmlDumper` didn’t escape uncompiled containers’ parameters, there was no way to differentiate a parameter placeholder from its escaped counterpart (e.g. `%%foo%%` and `%foo%` both are dumped as `%foo%`). This could make `lint:container --resolve-env-vars` fail in some cases. This PR doesn’t change the `XmlDumper` to keep BC, but alter the way `ContainerBuilder`s are serialized by #60597 as it didn’t get released yet. Commits ------- 8ad916f [FrameworkBundle] Escape parameters when serializing a ContainerBuilder
To unlock #60568 this uses
serialize()
to dump the container, next to the XML dump.