Skip to content

[Php80] Make configurable INLINE_PUBLIC on ClassPropertyAssignToConstructorPromotionRector#3126

Merged
TomasVotruba merged 32 commits intomainfrom
make-configurable-inline-public
Nov 29, 2022
Merged

[Php80] Make configurable INLINE_PUBLIC on ClassPropertyAssignToConstructorPromotionRector#3126
TomasVotruba merged 32 commits intomainfrom
make-configurable-inline-public

Conversation

@samsonasik
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

Development

Successfully merging this pull request may close these issues.

3 participants