Skip to content

Commit 881857e

Browse files
committed
minor #7241 Improved code example of prepend method (a-ast, javiereguiluz)
This PR was submitted for the 3.2 branch but it was merged into the 2.7 branch instead (closes #7241). Discussion ---------- 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 Commits ------- 000f430 Minor change 2271059 Improved code example of `prepend` method
2 parents d9b74dc + 000f430 commit 881857e

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 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)