Skip to content

PHP 8.6 | RemovedConstants: detect deprecated SORT_LOCALE_STRING (RFC) - #2072

Merged
wimg merged 1 commit into
developfrom
php-8.6/removed-constants-sort_locale_string
Sep 12, 2026
Merged

wimg merged 1 commit into
developfrom
php-8.6/removed-constants-sort_locale_string

Conversation

@jrfnl

@jrfnl jrfnl commented Sep 5, 2026

Copy link
Copy Markdown
Member

. The SORT_LOCALE_STRING constant for the family of sort functions is now
deprecated, use one of the following functions instead:
* Collator::sort()
* Collator::asort()
* Collator::sort()
* Collator::sortWithSortKeys()
RFC: https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_sort_locale_string_flag_for_sort_functions

This commit add detection of use of this deprecated constant.

Includes tests.

Refs:

Related to #2052

>   . The SORT_LOCALE_STRING constant for the family of sort functions is now
>     deprecated, use one of the following functions instead:
>     * Collator::sort()
>     * Collator::asort()
>     * Collator::sort()
>     * Collator::sortWithSortKeys()
>     RFC: https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_sort_locale_string_flag_for_sort_functions

This commit add detection of use of this deprecated constant.

Includes tests.

Refs:
* https://wiki.php.net/rfc/deprecations_php_8_6#deprecate_sort_locale_string_flag_for_sort_functions
* https://github.com/php/php-src/blob/38e8b232da8981790d8c3aa635cf09875a837e32/UPGRADING#L544-L550
* php/php-src 23074
* php/php-src@22217b3

Related to 2052
@jrfnl jrfnl added this to the 10.0.0-alpha3 milestone Sep 5, 2026
@jrfnl
jrfnl requested a review from wimg September 5, 2026 22:43
@wimg
wimg merged commit ab964fc into develop Sep 12, 2026
50 checks passed
@wimg
wimg deleted the php-8.6/removed-constants-sort_locale_string branch September 12, 2026 16:13
@github-actions github-actions Bot removed PR: quick merge PR only contains relatively simple changes PR: ready for review labels Sep 12, 2026
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.

2 participants