-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
Conversation
performance.rst
Outdated
$container->parameters()->set('.container.dumper.inline_factories', true); | ||
$container->getParameterBag()->set('.container.dumper.inline_factories', true); |
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.
I think here $container
is a ContainerConfigurator
and not ContainerInterface
If i'm right, we should probably update example like is done in the following sample
symfony-docs/configuration.rst
Lines 375 to 383 in 19ca845
.. code-block:: php | |
// config/services.php | |
namespace Symfony\Component\DependencyInjection\Loader\Configurator; | |
return static function (ContainerConfigurator $container): void { | |
$container->parameters() | |
->set('url_pattern', 'http://symfony.com/?foo=%%s&bar=%%d'); | |
}; |
Friendly ping @gnumoksha |
I've changed the variable name, but I don't know how to verify if the statement was successful. |
@@ -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); |
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.
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);
};
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.
I've done this change while merging. Thanks!
12ca3f2
to
48db6a2
Compare
@gnumoksha thanks and congrats on your first Symfony Docs contribution 🎉 |
there is no
$container->parameters()