8000 Improved code example of `prepend` method · symfony/symfony-docs@2271059 · GitHub
[go: up one dir, main page]

Skip to content
65E8

Commit 2271059

Browse files
a-astxabbuh
authored andcommitted
Improved code example of prepend method
- Split the comment into readable parts. At the moment 2 different sentences combined in one without a comma or a dot. It is difficult to catch a sense of '...acme_something and acme_other note that if the user...' - Additionally, added a comment with a file path to put reader in the context of this example
1 parent d9b74dc commit 2271059

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

bundles/prepend_extension.rst

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ The following example illustrates how to prepend
5656
a configuration setting in multiple bundles as well as disable a flag in multiple bundles
5757
in case a specific other bundle is not registered::
5858

59+
// src/Acme/HelloBundle/DependencyInjection/AcmeHelloExtension.php
5960
public function prepend(ContainerBuilder $container)
6061
{
6162
// get all bundles
@@ -69,8 +70,10 @@ in case a specific other bundle is not registered::
6970
case 'acme_something':
7071
case 'acme_other':
7172
// set use_acme_goodbye to false in the config of
72-
// acme_something and acme_other note that if the user manually
73-
// configured use_acme_goodbye to true in the app/config/config.yml
73+
// acme_something and acme_other
74+
//
75+
// note that if the user manually configured
76+
// use_acme_goodbye to true in the app/config/config.yml
7477
// then the setting would in the end be true and not false
7578
$container->prependExtensionConfig($name, $config);
7679
break;

0 commit comments

Comments
 (0)
0