Skip to content

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

Open
jrfnl wants to merge 1 commit into
developfrom
php-8.6/removed-constants-sort_locale_string
Open

PHP 8.6 | RemovedConstants: detect deprecated SORT_LOCALE_STRING (RFC)#2072
jrfnl wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant