Commit 662d28f
[DependencyInjection] Ensure deprecation detection does not trigger a PHP error
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 to a deprecation 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 receive the deprecation, but a fatal error instead.1 parent 8d2c50c commit 662d28f
File 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