Commit 334a6e8
committed
Fix deprecation warning for UserInterface on Symfony 4
The deprecated annotation removed in 2.2.3 had a purpose: deprecated
interfaces are allowed to extend deprecated interfaces of another
package without triggering a warning in DebugClassLoader.
However, applying it on the public UserInterface was the mistake.
Instead of having an internal interface that is extended by the
conditional declaration of the public interface, the implementation is
now reversed. An internal CompatUserInterface is now declared
conditionally to handle the BC layer, and the public UserInterface
extends it.
As our UserInterface and the CompatUserInterface are in the same
package, UserInterface is allowed to extend CompatUserInterface without
warning even when it is marked as deprecated, making both
DebugClassLoader and downstream static analyzers happy.1 parent 90d7848 commit 334a6e8
2 files changed
+27
-22
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
17 | 36 | | |
18 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
19 | 40 | | |
20 | | - | |
| 41 | + | |
21 | 42 | | |
22 | 43 | | |
23 | 44 | | |
| |||
270 | 291 | | |
271 | 292 | | |
272 | 293 | | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
286 | | - | |
287 | | - | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
| |||
0 commit comments