Skip to content

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

Development

Successfully merging this pull request may close these issues.

4 participants