Skip to content

added support for final constants#336

Open
i582 wants to merge 4 commits intomasterfrom
pmakhnev/final_class_constants
Open

added support for final constants#336
i582 wants to merge 4 commits intomasterfrom
pmakhnev/final_class_constants

Conversation

@i582
Copy link
Contributor

@i582 i582 commented Oct 14, 2021

RFC: https://wiki.php.net/rfc/final_class_const

In the current implementation, we are allowed to override constants in both classes and interfaces,
although in PHP 7.4 it is forbidden to override constants in interfaces.

PHP 8.1 introduces a final modifier for constants and changes behavior for interfaces, now overriding
is allowed by default.

Thus, with the support for the final modifier for constants, we will begin to match the PHP behavior.

@i582 i582 added the PHP8 PHP8 feature label Oct 14, 2021
@i582 i582 changed the title WIP: added support for final constants added support for final constants Oct 14, 2021
@Tsygankov-Slava Tsygankov-Slava mentioned this pull request Jul 3, 2023
44 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PHP8 PHP8 feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant