Skip to content

Stdlib: IntlBreakIterator preceding/following/isBoundary/getLocale (#20771) - #20783

Merged
PurHur merged 3 commits into
masterfrom
fix/20771-breakiterator-preceding
Jul 19, 2026
Merged

PurHur merged 3 commits into
masterfrom
fix/20771-breakiterator-preceding

Conversation

@PurHur

@PurHur PurHur commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference: ext/intl/breakiterator/breakiterator.stub.php, breakiterator_methods.cpp (ubrk_preceding / ubrk_following / ubrk_isBoundary).

PHP-in-PHP: no new C runtime.

Closes #20771

Test plan

  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/issue_20771_breakiterator_preceding.php
  • PHP_COMPILER_PROFILE=8.4 php bin/jit.php test/repro/issue_20771_breakiterator_preceding.php
  • ./script/phpunit.sh --filter test_breakiterator (2 tests)
  • Docker: PHP_COMPILER_PROFILE=8.4 vendor/bin/phpunit --filter breakiterator_preceding test/compliance/VMTest.php
  • php script/bootstrap-inventory.php --check → OK 5831/5831
  • ./script/ci-fast.sh (running)
  • Note: native AOT for intl OOP instance methods remains a broader gap (Collator::compare / setText also fail at compile) — not introduced here.

Verification transcript (VM)

preceding=1 following=1 isBoundary=1 getLocale=1 …
preceding6=5 current_after_preceding=5 following6=11
isBoundary5=1 isBoundary6=1 isBoundary7=0
locale_actual='' locale_valid='en_US' err=0:U_ZERO_ERROR

Matches Zend 8.4+intl on Hello world word breaks (0 5 6 11).

Made with Cursor

PurHur and others added 3 commits July 19, 2026 01:52
…20771)

Wire random-access boundary APIs and locale/error getters on the existing
ICU/fallback boundaries state so PROFILE=8.4 matches php-src breakiterator.

Co-authored-by: Cursor <cursoragent@cursor.com>
ci-fast auto-heal for 5831/5831 footnotes and VmDom construct-flag refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
Regenerate construct flags so VmBreakIterator preceding APIs are listed.

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: IntlBreakIterator::preceding()/following()/isBoundary()/getLocale() missing after #6188 (ext/intl/breakiterator)

1 participant