Commit cf20e09
committed
bug symfony#58822 [DependencyInjection] Fix checking for interfaces in ContainerBuilder::getReflectionClass() (donquixote)
This PR was merged into the 5.4 branch.
Discussion
----------
[DependencyInjection] Fix checking for interfaces in ContainerBuilder::getReflectionClass()
| Q | A
| ------------- | ---
| Branch? | 5.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix symfony#58821.
| License | MIT
Currently, `ContainerBuilder::getReflectionClass()` supports interfaces only if `symfony/config` package is present.
With this fix, it will do so without `symfony/config`.
> Always add tests and ensure they pass.
Not sure how to do this.
All tests run in the monorepo, with all packages present, so `class_exists(ClassExistenceResource::class)` will always be TRUE.
To make this testable, we should make the condition dependent on resource tracking.
> Never break backward compatibility (see https://symfony.com/bc).
This is TBD.
This change would enable autowire for some services where this was previously not the case.
Commits
-------
6166e8f Issue symfony#58821: [DependencyInjection] Support interfaces in ContainerBuilder::getReflectionClass().File tree
1 file changed
+1
-1
lines changed- src/Symfony/Component/DependencyInjection
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
369 | 369 | | |
370 | 370 | | |
371 | 371 | | |
372 | | - | |
| 372 | + | |
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
| |||
0 commit comments