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

[Php80] Skip callable type different definition on ClassPropertyAssignToConstructorPromotionRector #3010

Merged
merged 2 commits into from
Oct 24, 2022

Conversation

samsonasik
Copy link
Member

Given the following code:

final class SkipCallableTypeDifferentDefinition
{
    /** @var CallbackHandler */
    private $fallback;

    public function __construct(callable $fallback)
    {
        $this->fallback = $fallback;
    }
}

It currently produce:

+public function __construct(private callable $fallback)

which make error:

Fatal error: Property SkipCallableTypeDifferentDefinition::$fallback cannot have type callable

@samsonasik
Copy link
Member Author

Fixed 🎉

@samsonasik
Copy link
Member Author

All checks have passed 🎉 @TomasVotruba it is ready for review.

@TomasVotruba TomasVotruba merged commit f915a1f into main Oct 24, 2022
@TomasVotruba TomasVotruba deleted the skip-callable-type-different-definition branch October 24, 2022 08:14
@TomasVotruba
Copy link
Member

Thanks 👍

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