Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[PropertyInfo] Add PHP 8.0 promoted properties @param mutation support to PhpDocExtractor#45062

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

@raphaelvoisin
Copy link
Contributor

QA
Branch?6.1
Bug fix?no
New feature?yes
Deprecations?no
Tickets
LicenseMIT
Doc PR

By definition, PHP 8 promoted properties are declared in the constructor. Therefore, a new particular case raises when trying to extract (usingPhpDocExtractor) a promoted property that is mutated via@param in the constructor.

class Php80Dummy {    /**     * @param string $promotedAndMutatedProperty     */    public function __construct(private mixed $promotedAndMutatedProperty)    {    }}

$promotedAndMutatedProperty extracted types is currently[null] (because of "mixed"), but IMO should be[string].

However, I'm not sure if this is the intended behaviour for everyone (opinions welcomed). If it is, I guess I should updatePhpDocExtractorTest as well to reflect the new priorities ?

JanTvrdik, EmilMassey, and shouze reacted with thumbs up emoji
@nicolas-grekasnicolas-grekasforce-pushed thepropertyinfo_phpdoc_promoted_props branch from4eb266a to92b0da1CompareMarch 6, 2022 11:37
@nicolas-grekas
Copy link
Member

Thank you@raphaelvoisin.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@derrabusderrabusderrabus approved these changes

@dunglasdunglasAwaiting requested review from dunglasdunglas is a code owner

Assignees

No one assigned

Projects

None yet

Milestone

6.1

Development

Successfully merging this pull request may close these issues.

4 participants

@raphaelvoisin@nicolas-grekas@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp