You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments