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] Make configurable INLINE_PUBLIC on ClassPropertyAssignToConstructorPromotionRector #3126

Merged
merged 32 commits into from
Nov 29, 2022

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Nov 29, 2022

Given the following code:

class SkipNonTypedNonFinalClassProtectedProperty
{
    /**
     * @var object
     */
    protected $x;

    public function __construct(object $x)
    {
        $this->x = $x;
    }
}

should be skipped by default, as when the protected $x is overriden in child without type yet, it will BC break.

see https://3v4l.org/BYkPK

I add INLINE_PUBLIC configurable which default to false, can be enabled to true to make it changed (can be use for major framework upgrade).

Ref codeigniter4/CodeIgniter4#6924 (comment)

@samsonasik samsonasik marked this pull request as draft November 29, 2022 09:26
@samsonasik samsonasik force-pushed the make-configurable-inline-public branch from 9b7dad7 to a18861b Compare November 29, 2022 10:50
@samsonasik samsonasik force-pushed the make-configurable-inline-public branch from 756991b to 2fd5d0f Compare November 29, 2022 12:33
@samsonasik samsonasik marked this pull request as ready for review November 29, 2022 12:53
@samsonasik
Copy link
Member Author

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

@TomasVotruba TomasVotruba merged commit 3f2a16a into main Nov 29, 2022
@TomasVotruba TomasVotruba deleted the make-configurable-inline-public branch November 29, 2022 15:44
@TomasVotruba
Copy link
Member

Thank you 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants