Skip to content

Conversation

@jrfnl
Copy link
Member

@jrfnl jrfnl commented Jul 5, 2025

⚠️ This PR needs for PR #1806 to be merged first. It relies on functionality from PHPCSUtils 1.1.0. ⚠️ (PR #1806 has been merged)


PHP 8.3 introduced typed constants.

. Class, interface, trait, and enum constants now support type
declarations.

This commit adds a new sniff to detect these.

Includes unit tests.
Includes documentation.

Refs:

Related to #1589

@jrfnl jrfnl added this to the 10.0.0 milestone Jul 5, 2025
@jrfnl jrfnl force-pushed the php-8.3/new-typed-constants-sniff branch from b9bf2eb to 6e64a36 Compare July 6, 2025 00:09
@jrfnl jrfnl requested a review from wimg July 6, 2025 00:38
Base automatically changed from feature/composer-update-for-phpcsutils-1.1.0 to develop July 6, 2025 13:28
@jrfnl
Copy link
Member Author

jrfnl commented Jul 6, 2025

Rebased without changes after the merge of #1806 and marked as "ready for review".

@jrfnl jrfnl force-pushed the php-8.3/new-typed-constants-sniff branch from 6e64a36 to a073d3b Compare July 6, 2025 13:36
@jrfnl jrfnl marked this pull request as ready for review July 6, 2025 13:36
PHP 8.3 introduced typed constants.

>   . Class, interface, trait, and enum constants now support type
>    declarations.

This commit adds a new sniff to detect these.

Includes unit tests.
Includes documentation.

Refs:
* https://wiki.php.net/rfc/typed_class_constants
* php/php-src 10444
* php/php-src@414f71a
@jrfnl
Copy link
Member Author

jrfnl commented Jul 8, 2025

Force push = minor updates to some documentation, nothing more.

@jrfnl jrfnl force-pushed the php-8.3/new-typed-constants-sniff branch from a073d3b to 013133c Compare July 8, 2025 12:53
@wimg wimg merged commit 487756a into develop Aug 6, 2025
48 checks passed
@wimg wimg deleted the php-8.3/new-typed-constants-sniff branch August 6, 2025 19:20
@jrfnl jrfnl added the PHP: 8.3 label Nov 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants