8807eaf30b
This PR was merged into the 3.3-dev branch.
Discussion
----------
[DI] Populate class of ChildDefinition when its id matches an existing FQCN
| Q | A
| ------------- | ---
| Branch? | 3.3
| Bug fix? | no
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #22345
| License | MIT
| Doc PR | -
See linked issue for expected DX.
Instead of doing a "continue", let's throw to force the resolution of any ambiguities.
There is a minor potential BC Break, if one uses an ambiguous FQCN as child-definition id in 3.2 or below.
To me, this should be rare, and easy to fix (compile time only).
The DX enhancement this PR provides looks worth it.
> Service definition "App\Foo\Child" has a parent but no class, and its name looks like a FQCN. Either the class is missing or you want to inherit it from the parent service. To resolve this ambiguity, please rename this service to a non-FQCN (e.g. using dots), or create the missing class.
Commits
-------
|
||
---|---|---|
.. | ||
Argument | ||
Compiler | ||
Config | ||
Dumper | ||
Extension | ||
Fixtures | ||
LazyProxy | ||
Loader | ||
ParameterBag | ||
ChildDefinitionTest.php | ||
ContainerBuilderTest.php | ||
ContainerTest.php | ||
CrossCheckTest.php | ||
DefinitionDecoratorTest.php | ||
DefinitionTest.php | ||
ParameterTest.php | ||
ReferenceTest.php | ||
ServiceLocatorTest.php |