forked from KnpLabs/KnpUserBundle
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Showing
2 changed files
with
27 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters