Skip to content

mbstring: fix mb_ucfirst_lcfirst.phpt eszett probe (#17609) - #17815

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-17609-mb-ucfirst-phpt-fix
Jul 11, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-17609-mb-ucfirst-phpt-fix

Conversation

@PurHur

@PurHur PurHur commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix compliance probe test/compliance/cases/mbstring/mb_ucfirst_lcfirst.phpt: line 10 called mb_lcfirst('ßtraße') but --EXPECT-- required SStraße (Unicode sharp-s upper expansion from mb_ucfirst, not lcfirst).
  • Implementation in VmMbstring::ucfirst() / Utf8CaseMap::UPPER_EXPANSION[0xDF] was already correct; only the PHPT call site was wrong.

php-src reference

  • ext/mbstring/mbstring.c — php_mb_ulcfirst / mb_ucfirst (MB_CASE_TITLE on first codepoint; ß → SS)

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
export PHP_COMPILER_PROFILE=8.4
php bin/vm.php test/compliance/cases/mbstring/mb_ucfirst_lcfirst.phpt
vendor/bin/phpunit --filter mb_ucfirst
vendor/bin/phpunit --filter MbUcfirst
'
PHPUnit --filter mb_ucfirst: OK (4 tests, 4 assertions)
PHPUnit --filter MbUcfirst: OK (4 tests, 8 assertions)

Closes #17609 (compliance regression from merged #17614 PHPT typo)

Made with Cursor

Line 10 called mb_lcfirst('ßtraße') but expected mb_ucfirst SS expansion
(SStraße). Align call with expect so compliance matches php-src UTF-8
sharp-s title case behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Stdlib: mb_ucfirst()/mb_lcfirst() missing on forward 8.4 profile while mb_trim family registered (ext/mbstring/mbstring.c, extends #4007)

1 participant