Skip to content

Commit ca6e4b3

Browse files
committed
minor #19861 [Bundles] [Bundle] Fix Bundle configuration/service key (smnandre)
This PR was merged into the 6.4 branch. Discussion ---------- [Bundles] [Bundle] Fix Bundle configuration/service key I think it should be `acme_social` instead of `acme.social` Commits ------- 778ffdf [Bundle] Fix Bundle configuration root key
2 parents d9a4916 + 778ffdf commit ca6e4b3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bundles/configuration.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class, you can add all the logic related to processing the configuration in that
9898
// use it directly to configure the service container (when defining an
9999
// extension class, you also have to do this merging and processing)
100100
$containerConfigurator->services()
101-
->get('acme.social.twitter_client')
101+
->get('acme_social.twitter_client')
102102
->arg(0, $config['twitter']['client_id'])
103103
->arg(1, $config['twitter']['client_secret'])
104104
;
@@ -347,7 +347,7 @@ For example, imagine your bundle has the following example config:
347347
https://symfony.com/schema/dic/services/services-1.0.xsd"
348348
>
349349
<services>
350-
<service id="acme.social.twitter_client" class="Acme\SocialBundle\TwitterClient">
350+
<service id="acme_social.twitter_client" class="Acme\SocialBundle\TwitterClient">
351351
<argument></argument> <!-- will be filled in with client_id dynamically -->
352352
<argument></argument> <!-- will be filled in with client_secret dynamically -->
353353
</service>
@@ -370,7 +370,7 @@ In your extension, you can load this and dynamically set its arguments::
370370
$configuration = new Configuration();
371371
$config = $this->processConfiguration($configuration, $configs);
372372

373-
$definition = $container->getDefinition('acme.social.twitter_client');
373+
$definition = $container->getDefinition('acme_social.twitter_client');
374374
$definition->replaceArgument(0, $config['twitter']['client_id']);
375375
$definition->replaceArgument(1, $config['twitter']['client_secret']);
376376
}

0 commit comments

Comments
 (0)