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

Fix for bug #9654: Unsafe use of new static when trait enforces constructor via abstract method #2767

Open
wants to merge 1 commit into
base: 1.10.x
Choose a base branch
from

Conversation

maurice2k
Copy link

@maurice2k maurice2k commented Nov 22, 2023

@maurice2k maurice2k marked this pull request as ready for review November 22, 2023 16:20
@phpstan-bot
Copy link
Collaborator

This pull request has been marked as ready for review.

if ($traitReflection->hasConstructor()) {
$traitConstructor = $traitReflection->getConstructor();

if ($traitConstructor instanceof PhpMethodReflection) {
Copy link
Member

Choose a reason for hiding this comment

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

This still needs to error before PHP 8.0: https://3v4l.org/cOUYD

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