Skip to content

Update Attribute::class constants to PHP 8.5 values #538

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 1 commit into
base: 1.x
Choose a base branch
from

Conversation

kubawerlos
Copy link

Fixes #537

Copy link
Contributor

@DanielEScherzer DanielEScherzer left a comment

Choose a reason for hiding this comment

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

I had considered sending a patch like this, but decided against it

  • PHP 7.4 code with polyfill: Attribute::TARGET_ALL is 127
  • PHP 8.0-8.4 code: Attribute::TARGET_ALL is 63
  • PHP 8.5: Attribute::TARGET_ALL is 127

Which to me would be confusing. I would expect a PHP 8.0 polyfill to polyfill the class as it existed in PHP 8.0. It is also worth pointing out that for TARGET_CONSTANT, actually trying to put attributes on constants was a parser error until 8.5, so it isn't really useful

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.

Changes to Attribute::class constants in PHP 8.5
4 participants