Commit cc8e436
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 functionality1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
294 | 294 | | |
295 | 295 | | |
296 | 296 | | |
297 | | - | |
298 | | - | |
| 297 | + | |
| 298 | + | |
299 | 299 | | |
300 | 300 | | |
301 | 301 | | |
| |||
0 commit comments