Skip to content
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

Add support for a not-deprecated annotation #2255

Merged
merged 1 commit into from
Feb 24, 2023

Conversation

stof
Copy link
Contributor

@stof stof commented Feb 24, 2023

This annotation allows disabling the inheritance of method deprecations when a child class does not want to deprecate its method even though it corresponds to a deprecated parent method.

Solves phpstan/phpstan#7422

This annotation allows disabling the inheritance of method deprecations
when a child class does not want to deprecate its method even though it
corresponds to a deprecated parent method.
@ondrejmirtes ondrejmirtes merged commit 7abcc51 into phpstan:1.10.x Feb 24, 2023
@ondrejmirtes
Copy link
Member

Thank you!

@stof stof deleted the not_deprecated branch February 24, 2023 16:42
@VincentLanglet
Copy link
Contributor

If I understand correctly the code

/**
 * @deprecated
 * @not-deprecated
 */

Will still consider the method as deprecated, but might be confusing.

Should phpstan report that those annotations are incompatible ?

@stof
Copy link
Contributor Author

stof commented Jun 26, 2023

@VincentLanglet this might make sense as a rule indeed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants