Commit af4cee6
committed
bug #62544 [DependencyInjection] Ensure deprecation detection does not trigger a PHP error (bnf)
This PR was merged into the 7.4 branch.
Discussion
----------
[DependencyInjection] Ensure deprecation detection does not trigger a PHP error
`Exception Interface "TYPO3\CMS\Reports\StatusProviderInterface" not found`
See https://forge.typo3.org/issues/108349
| Q | A
| ------------- | ---
| Branch? | 7.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix #62589
| License | MIT
The `class_exists` check and the condition `$definition instanceof ChildDefinition` have been swapped with #61215 in order to produce an error if a service is not available.
This error was later relaxed in #61270, but the executing order of the condition kept to be `class_exists` first, then `instanceof`.
That means, if `class_exists` fails with a PHP error (like PHP Fatal Error: Interface "My\Vendor\MyInterface" not found`) affected uses will not see the deprecation, but a fatal error instead.
Commits
-------
662d28f [DependencyInjection] Ensure deprecation detection does not trigger a PHP errorFile tree
2 files changed
+25
-1
lines changed- src/Symfony/Component/DependencyInjection
- Compiler
- Tests/Compiler
2 files changed
+25
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| |||
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
110 | 134 | | |
0 commit comments