Skip to content

Conversation

@localheinz
Copy link
Contributor

This PR

  • fixes the build by removing an expected error message

Follows 1ed86a5.

πŸ’β€β™‚οΈ Not sure if instead the CallToDeprecatedStaticMethodRule should be fixed. What do you think?

13,
],
[
'Call to deprecated method deprecatedFoo() of class CheckDeprecatedStaticMethodCall\Foo.',
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because of

if (DeprecatedScopeHelper::isScopeDeprecated($scope)) {
return [];
}

and

/**
* @deprecated
*/
public static function deprecatedFoo()
{
}

and

public static function deprecatedFoo()
{
parent::foo();
parent::deprecatedFoo();
}

we never enter the scope of the deprecated method Bar::deprecatedFoo().

@iluuu1994 iluuu1994 merged commit cc60143 into phpstan:master Dec 5, 2018
@iluuu1994
Copy link
Collaborator

Ah, I didn't realize deprecatedFoo() was overwritten. Since 0.11 phpDoc annotations are implicitly inherited. Since the method itself is now deprecated the error message goes away. I think this is ok.

@ondrejmirtes Do you agree?

@iluuu1994
Copy link
Collaborator

Thanks πŸ™‚

@localheinz localheinz deleted the fix/build branch December 5, 2018 17:14
@localheinz
Copy link
Contributor Author

Thank you, @iluuu1994!

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.

2 participants