-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Debug] Trigger a deprecation when an @internal
class/interface/trait is used
#23800
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Do you have an idea of such implementation? A class is loaded only once so I don't see how we could always trigger the deprecation when necessary. |
In the case where one extends/uses/implements, it should be similar to what we do for final. Not sure we should do more (we maybe could, using the stack trace, but that might have to high of an impact.) |
Ok, I thought you talked about detecting the use of an internal class in the code which is indeed complicated. |
…lass/trait/interface (GuilhemN) This PR was squashed before being merged into the 3.4 branch (closes #23807). Discussion ---------- [Debug] Trigger a deprecation when using an internal class/trait/interface | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | yes <!-- don't forget updating src/**/CHANGELOG.md files --> | BC breaks? | no | Deprecations? | not truly <!-- don't forget updating UPGRADE-*.md files --> | Tests pass? | yes | Fixed tickets | #23800 | License | MIT | Doc PR | Trigger a deprecation when the user uses an internal class/trait/interface. The deprecation is not triggered when an `@internal` is used in the same vendor. Commits ------- b89ba29 [Debug] Trigger a deprecation when using an internal class/trait/interface
We use
@internal
quite extensively, yet, the DebugClassLoader class doesn't warn when one uses such a tagged class/interface/trait.We should trigger the same kind of deprecation as we already do for
@final
, with the added condition that the root namespace needs to be different (don't trigger within the same root namespace.)The text was updated successfully, but these errors were encountered: