Skip to content

PHP 8.4 | File::getMemberProperties() + File::getMethodParameters(): add support for asymmetric visibility #1116

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented Jun 5, 2025

Description

PHP 8.4 | File::getMemberProperties(): add support for asymmetric visibility

Implements the suggested support per #851 (comment) with one difference: the set_scope key will always be available, but will be false if no set scope is specified. This is more in line with the other keys in the return array.

Includes tests.
Includes updated test expectation for the PSR2/PropertyDeclarationSniff. Mind: this sniff still needs further updates!

PHP 8.4 | File::getMethodParameters(): add support for asymmetric visibility

Implements the suggested support per #851 (comment).

Includes tests.

Suggested changelog entry

  • Added support for PHP 8.4 properties with asymmetric visibility to File::getMemberProperties() through a new set_scope array index in the return value.
  • Added support for PHP 8.4 (constructor promoted) properties with asymmetric visibility to File::getMethodParameters() through new set_visibility and set_visibility_token array indexes in the return value.

Related issues/external references

Follow up on #871
Fixes for #851

Related to #734

Types of changes

  • New feature (non-breaking change which adds functionality)

jrfnl added 2 commits June 6, 2025 00:25
…ibility

Implements the suggested support per #851 (comment) with one difference: the `set_scope` key will always be available, but will be `false` if no set scope is specified. This is more in line with the other keys in the return array.

Includes tests.
Includes updated test expectation for the PSR2/PropertyDeclarationSniff. Mind: this sniff still needs further updates!

Follow up on 871
Partial fix for 851

Related to 734
…ibility

Implements the suggested support per #851 (comment).

Includes tests.

Follow up on 871
Partial fix for 851

Related to 734
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant