This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/DependencyInjection/Tests
Fabien Potencier 8807eaf30b feature #22362 [DI] Populate class of ChildDefinition when its id matches an existing FQCN (nicolas-grekas)
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
-------

3200d3738a [DI] Populate class of ChildDefinition when its id matches an existing FQCN
2017-04-10 18:20:21 -07:00
..
Argument [DI] Introduce "container.service_locator" tag, replaces ServiceLocatorArgument 2017-03-17 17:49:32 +01:00
Compiler feature #22362 [DI] Populate class of ChildDefinition when its id matches an existing FQCN (nicolas-grekas) 2017-04-10 18:20:21 -07:00
Config [DI][Router][DX] Invalidate routing cache when container parameters changed 2017-03-05 20:24:24 +01:00
Dumper [DI] Restrict autowired registration to "same-vendor" namespaces 2017-04-06 11:28:30 +02:00
Extension Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
Fixtures [DI] Restrict autowired registration to "same-vendor" namespaces 2017-04-06 11:28:30 +02:00
LazyProxy Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
Loader [DI] Fix anonymous factories/configurators support 2017-04-05 06:16:28 -07:00
ParameterBag Refactored other PHPUnit method calls to work with namespaced PHPUnit 6 2017-02-21 11:04:38 +01:00
ChildDefinitionTest.php [DI] Replace wildcard-based methods autowiring by @required annotation 2017-02-28 10:00:46 +01:00
ContainerBuilderTest.php [BC BREAK][DI] Always autowire "by id" instead of using reflection against all existing services 2017-04-05 23:48:42 +02:00
ContainerTest.php [DI] Enhance DX by throwing instead of triggering a deprecation notice 2017-03-28 08:18:44 +02:00
CrossCheckTest.php Merge branch '3.2' 2017-02-18 18:35:19 +01:00
DefinitionDecoratorTest.php [DI] Replace wildcard-based methods autowiring by @required annotation 2017-02-28 10:00:46 +01:00
DefinitionTest.php [DI] Replace wildcard-based methods autowiring by @required annotation 2017-02-28 10:00:46 +01:00
ParameterTest.php Update to PHPUnit namespaces 2017-02-18 08:02:39 -08:00
ReferenceTest.php Merge branch '3.2' 2017-02-18 18:35:19 +01:00
ServiceLocatorTest.php [DI] Remove useless state from ServiceLocator 2017-03-16 19:18:58 +01:00