Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Oct 15, 2022

As of PHP 8.2, it is allowed to declare constants in traits.

This commit adds support for detecting whether a constant declared using the const keyword is within an trait structure to the Scopes::isOOConstant() method.

Includes adding the T_TRAIT token to the Collections::ooConstantScopes() token array.

Refs:

As of PHP 8.2, it is allowed to declare constants in traits. This commit adds support for detecting whether a constant declared using the `const` keyword is within an trait structure to the `Scopes::isOOConstant()` method. Includes adding the `T_TRAIT` token to the `Collections::ooConstantScopes()` token array. Refs: * https://wiki.php.net/rfc/constants_in_traits
@jrfnl jrfnl added this to the 1.0.0-alpha4 milestone Oct 15, 2022
@jrfnl jrfnl merged commit 50cb535 into develop Oct 15, 2022
@jrfnl jrfnl deleted the php-8.2/add-support-constants-in-traits branch October 15, 2022 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment