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

Add emitting support for asymmetric visibility #183

Merged
merged 24 commits into from
Aug 27, 2024

Conversation

thekid
Copy link
Member

@thekid thekid commented Aug 24, 2024

This pull request adds emitting support for asymmetric visibility using (set) specifiers on property modifiers

See https://wiki.php.net/rfc/asymmetric-visibility-v2 and #182

@thekid
Copy link
Member Author

thekid commented Aug 24, 2024

Reflection

Here's a first idea:

$prop= $type->property('name');
$prop->modifiers();       // lang.reflection.Modifiers<public | private(set)>

$prop->modifiers('get');  // lang.reflection.Modifiers<public>
$prop->modifiers('set');  // lang.reflection.Modifiers<private>

@thekid thekid marked this pull request as ready for review August 25, 2024 09:37
@thekid thekid merged commit f121e86 into master Aug 27, 2024
12 checks passed
@thekid thekid deleted the feature/asymmetric-visibility branch August 27, 2024 18:29
@thekid
Copy link
Member Author

thekid commented Aug 27, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant