-
-
Notifications
You must be signed in to change notification settings - Fork 164
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
Upgrade phpstan to v0.12.9 #121
Merged
BenSampo
merged 14 commits into
BenSampo:master
from
Xint0-elab:Upgrade-phpstan-to-v0.12.9
Feb 11, 2020
Merged
Upgrade phpstan to v0.12.9 #121
BenSampo
merged 14 commits into
BenSampo:master
from
Xint0-elab:Upgrade-phpstan-to-v0.12.9
Feb 11, 2020
Conversation
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
For testing support for @internal and @deprecated PHPDoc tags.
Previous to v0.12 of PHPStan, there were multiple optional reflection interfaces that were not implemented in EnumMethodReflection. Now the methods from those interfaces were integrated to the MethodReflection interface. The new tests verify the methods return expected values. The isInternal, isDeprecated, and getDeprecatedDescription return value will be inherited from the constant that defines the static method.
In PHPStan v0.12 multiple optional reflection interfaces were integrated into MethodReflection interface. EnumMethodReflection now implements: - getDeprecatedDescription() - Will return the @deprecated tag description of the generating constant. - getDocComment - Will return null as this is a dynamic method. - getThrowType - Will return null. - hasSideEffects - Will return TrinaryLogic::No. - isDeprecated - Will return the value of isDeprecated of the generating constant. - isFinal - Will return TrinaryLogic::No. - isInternal - Will return the value of isInternal of the generating constant.
PHPStan v0.12 changed the FunctionVariant constructor signature.
FunctionVariant constructor now requires two new parameters templateTypeMap and resolvedTemplateTypeMap. Will default to empty TemplateTypeMap and null respectively.
Closed
This does basically the same thing as #119. However, i like the additional tests and some cases that i did not have in mind were considered. @Xint0-elab can you rebase your PR on top of the latest changes in |
@spawnia Sure thing |
For testing support for @internal and @deprecated PHPDoc tags.
Previous to v0.12 of PHPStan, there were multiple optional reflection interfaces that were not implemented in EnumMethodReflection. Now the methods from those interfaces were integrated to the MethodReflection interface. The new tests verify the methods return expected values. The isInternal, isDeprecated, and getDeprecatedDescription return value will be inherited from the constant that defines the static method.
In PHPStan v0.12 multiple optional reflection interfaces were integrated into MethodReflection interface. EnumMethodReflection now implements: - getDeprecatedDescription() - Will return the @deprecated tag description of the generating constant. - getDocComment - Will return null as this is a dynamic method. - getThrowType - Will return null. - hasSideEffects - Will return TrinaryLogic::No. - isDeprecated - Will return the value of isDeprecated of the generating constant. - isFinal - Will return TrinaryLogic::No. - isInternal - Will return the value of isInternal of the generating constant.
PHPStan v0.12 changed the FunctionVariant constructor signature.
Thanks @Xint0-elab 👍 |
Awesome, one more step in making the PHP world a (type-)safer place :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related Issue/Intent
Fixes #122 (Support v0.12 of PHPStan)
Changes
Now
EnumMethodReflection
implements the following methods:getDeprecatedDescription
- Will return the@deprecated
tag description of the generating constant.getDocComment
- Will return null.getThrowType
- Will return null.hasSideEffects
- Will returnTrinaryLogic::No
.isDeprecated
- Will return theisDeprecated
value of the generating constant.isFinal
- Will returnTrinaryLogic::No
.isInternal
- Will return theisInternal
value of the generating constant.Breaking changes
Should not break any functionality.