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 support for PHP 8.4 property hooks #42

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

Conversation

thekid
Copy link
Member

@thekid thekid commented May 18, 2024

See https://wiki.php.net/rfc/property-hooks, including support for @property-read and @property-write properties via API docs for PHP < 8.4

  • New lang.reflection.Property::virtual() method, see here
  • Get hook methods for a given virtual properties

use test\verify\Condition;
use test\{Assert, Expect, Test};

#[Condition(assert: 'method_exists(ReflectionProperty::class, "getHooks")')]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot yet use PHP_VERSION_ID here as php/php-src#13455 is yet to be merged.

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.

1 participant