Skip to content

Commit cc8e436

Browse files
committed
minor #6141 Docs do not match functionality (Loupax)
This PR was submitted for the 3.0 branch but it was merged into the 2.3 branch instead (closes #6141). Discussion ---------- Docs do not match functionality | Q | A | ------------- | --- | Doc fix? | yes | New docs? | no | Applies to | 3 | Fixed tickets | None The Dump the configuration section specifies that one of the requirements that need to be met to automatically dump configuration is the constructor not requiring parameters. The code that handles this though does not match this description: ``` /** * {@inheritdoc} */ public function getConfiguration(array $config, ContainerBuilder $container) { $reflected = new \ReflectionClass($this); $namespace = $reflected->getNamespaceName(); $class = $namespace.'\\Configuration'; if (class_exists($class)) { $r = new \ReflectionClass($class); $container->addResource(new FileResource($r->getFileName())); // Notice here that it just checks if the __construct method exists, // the arguments are irrelevant if (!method_exists($class, '__construct')) { $configuration = new $class(); return $configuration; } } } ``` Commits ------- 739e23a Docs do not match functionality
2 parents 0a5227d + 739e23a commit cc8e436

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cookbook/bundles/configuration.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ The ``config:dump-reference`` command dumps the default configuration of a
294294
bundle in the console using the Yaml format.
295295

296296
As long as your bundle's configuration is located in the standard location
297-
(``YourBundle\DependencyInjection\Configuration``) and does not require
298-
arguments to be passed to the constructor it will work automatically. If you
297+
(``YourBundle\DependencyInjection\Configuration``) and does not have
298+
a constructor it will work automatically. If you
299299
have something different, your ``Extension`` class must override the
300300
:method:`Extension::getConfiguration() <Symfony\\Component\\HttpKernel\\DependencyInjection\\Extension::getConfiguration>`
301301
method and return an instance of your ``Configuration``.

0 commit comments

Comments
 (0)