Skip to content

Stdlib: resourcebundle_count() + ResourceBundle Countable (#20781) - #20794

Merged
PurHur merged 2 commits into
masterfrom
fix/20781-resourcebundle-count
Jul 19, 2026
Merged

PurHur merged 2 commits into
masterfrom
fix/20781-resourcebundle-count

Conversation

@PurHur

@PurHur PurHur commented Jul 19, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds procedural resourcebundle_count() alias of ResourceBundle::count() (php-src resourcebundle_class.c).
  • Marks ResourceBundle as implementing Countable.
  • Spine/inventory → 5842/5842. Gen-0 sidecar stamp remains stale on master (waived).

php-src reference: ext/intl/resourcebundle/resourcebundle.stub.php, resourcebundle_class.c
PHP-in-PHP: no new C runtime.

Closes #20781

Test plan

  • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/issue_20781_resourcebundle_count.php
  • PHP_COMPILER_PROFILE=8.4 php bin/jit.php test/repro/…
  • VM + JIT compliance --filter resourcebundle_count_procedural
  • php script/bootstrap-inventory.php --check → OK 5842/5842

Verification

fn=1 method=1 proc=1 countable=1 match=1

Made with Cursor

PurHur and others added 2 commits July 19, 2026 02:22
Register the php-src procedural alias beside ResourceBundle::count() and
mark the class Countable so instanceof/count() match Zend intl.

Co-authored-by: Cursor <cursoragent@cursor.com>
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: resourcebundle_count() missing — ResourceBundle::count() OK after #6187 (ext/intl/resourcebundle)

1 participant