Skip to content

Conversation

@jdecool
Copy link
Collaborator

@jdecool jdecool commented Aug 2, 2018

phpstan 0.10 introduce internal change in PHPStan\Reflection\MethodReflection.

So, the Timeweb\PHPStan\Reflection\EnumMethodReflection class need to be updated. This imply that the extension is not compatible anymore with phpstan < 0.10 and require php >= 7.1 (phpstan 0.10 requirement).

@samizdam samizdam merged commit cc4dce0 into timeweb:master Aug 3, 2018

public function getVariants(): array
{
return [];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not seem right - you should return at least a single item. Can be a FunctionVariant instance.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because you have to report the return type of this method: new ObjectType($this->classReflection->getName(), false).

@jdecool jdecool deleted the phpstan-010-compatibility branch August 3, 2018 21:47
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