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

Call aliased trait methods from subclass #6306

Closed
ondrejmirtes opened this issue Jan 4, 2022 Discussed in #6303 · 2 comments
Closed

Call aliased trait methods from subclass #6306

ondrejmirtes opened this issue Jan 4, 2022 Discussed in #6303 · 2 comments
Labels

Comments

@ondrejmirtes
Copy link
Member

Discussed in #6303

Originally posted by xmorave2 January 4, 2022
Is this an issue in PHPStan, or am I doing something wrong?

When function from trait is renamed in parent class, phpstan report error 'Call to private method method() of parent class' when I am trying to call it by alias in sub class, although the code is working at least on PHP 7.4.

https://phpstan.org/r/7d2d47f0-9bcf-4586-a3d7-f47e5741fc15

PHPStan 1.1.0 didn't show this error. It is shown after upgrading to 1.3.0.

@ondrejmirtes
Copy link
Member Author

Fixed: phpstan/phpstan-src@8498b01

Root cause: Roave/BetterReflection#947

@github-actions
Copy link

github-actions bot commented Feb 5, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant