Skip to content

[DependencyInjection][FrameworkBundle] Use php-serialize to dump the container for debug/link 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

Open
wants to merge 1 commit into
base: 7.4
Choose a base branch
from

Conversation

nicolas-grekas
Copy link
Member

@nicolas-grekas nicolas-grekas commented May 30, 2025

Q A
Branch? 7.4
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

To unlock #60568 this uses serialize() to dump the container, next to the XML dump.

@carsonbot carsonbot added this to the 7.4 milestone May 30, 2025
@nicolas-grekas nicolas-grekas changed the title [DependencyInjection][FrameworkBundle] Use php-serialize to dump the … [DependencyInjection][FrameworkBundle] Use php-serialize to dump the container for debug/link commands May 30, 2025
@symfony symfony deleted a comment from carsonbot May 30, 2025
@nicolas-grekas nicolas-grekas force-pushed the dump-container-ser branch 3 times, most recently from 25b4fc6 to 965f23d Compare May 30, 2025 14:26
$container->getCompilerPassConfig()->setBeforeOptimizationPasses([]);
$container->getCompilerPassConfig()->setOptimizationPasses([]);
$container->getCompilerPassConfig()->setBeforeRemovingPasses([]);
if (str_ends_with($file, '.xml') && is_file(substr_replace($file, '.ser', -4))) {
Copy link
Member

Choose a reason for hiding this comment

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

The .ser file name extension seems common in Java. It makes sense to use it for serialized data in PHP too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants