Skip to content

Update performance.rst to use $container->getParameterBag() #19087

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

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion performance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ container into a single file, which could improve performance when using
// config/services.php

// ...
$container->parameters()->set('.container.dumper.inline_factories', true);
$configurator->parameters()->set('.container.dumper.inline_factories', true);
Copy link
Member

@xabbuh xabbuh Nov 9, 2023

Choose a reason for hiding this comment

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

I guess the whole example needs to look like this:

    .. code-block:: php

        // config/services.php
        namespace Symfony\Component\DependencyInjection\Loader\Configurator;

        return function(ContainerConfigurator $container): void {
            $container->parameters()->set('.container.dumper.inline_factories', true);
        };

Copy link
Member

Choose a reason for hiding this comment

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

I've done this change while merging. Thanks!


.. _performance-use-opcache:

Expand Down