Skip to content

Do not use deprecated SORT_LOCALE_STRING constant at runtime - #6904

Merged
ondrejmirtes merged 1 commit into
2.3.xfrom
sort-locale-string-deprecation
Nov 2, 2026
Merged

ondrejmirtes merged 1 commit into
2.3.xfrom
sort-locale-string-deprecation

Conversation

@ondrejmirtes

Copy link
Copy Markdown
Member

SORT_LOCALE_STRING is deprecated since PHP 8.6 (https://wiki.php.net/rfc/deprecations_php_8_6), so referencing it in SortParameterCastableToStringRule emitted:

Deprecated: Constant SORT_LOCALE_STRING is deprecated since 8.6, use one of the Collator::*sort*() methods instead in .../SortParameterCastableToStringRule.php on line 83

The rule now uses a private class constant with the same value (5). Analysed code using SORT_LOCALE_STRING is handled exactly as before.

The constant is deprecated since PHP 8.6 and using it emits a deprecation notice.

Amp-Thread-ID: https://ampcode.com/threads/T-01a19ba9-8b8d-70d0-895b-882be682a668
@ondrejmirtes
ondrejmirtes merged commit ec06569 into 2.3.x Nov 2, 2026
507 checks passed
@ondrejmirtes
ondrejmirtes deleted the sort-locale-string-deprecation branch November 2, 2026 09:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant