Repository navigation
Stdlib: ResourceBundle getLocales/getErrorCode/getErrorMessage/getIterator (#20739) - #20775
Merged
Merged
Conversation
…rator (#20739) Expose remaining ResourceBundle surface via ICU ures_openAvailableLocales FFI and per-object error state matching php-src resourcebundle_class.cpp; missing get() returns null with U_MISSING_RESOURCE_ERROR. Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ResourceBundle::getLocales()via ICUures_openAvailableLocales+uenum_*FFI (php-srcresourcebundle_class.cpp/resourcebundle_locales).getErrorCode()/getErrorMessage()matching Zend (U_MISSING_RESOURCE_ERROR/ message format); missingget()now returnsnulllike php-src.getIterator()viaArrayIteratorover top-level keys; compliance.phpt+ repro; JITTest skip for WeakRef bootstrap (same class as Stdlib: Dom\XPath missing — namespaced XPath after Dom\HTMLDocument/XMLDocument (ext/dom/php_dom.stub.php) #20757).Closes #20739
php-src reference
ext/intl/resourcebundle/resourcebundle_class.cpp—resourcebundle_locales/resourcebundle_get_error_*/getIteratorext/intl/resourcebundle/resourcebundle.stub.phpPHP implementation
ext/intl/VmResourceBundle.php(+IntlError::U_MISSING_RESOURCE_ERROR)Test plan
PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/issue_20739_resourcebundle_locales_errors.phpPHP_COMPILER_PROFILE=8.4 php bin/compile.php -l test/repro/issue_20739_resourcebundle_locales_errors.phpvendor/bin/phpunit --filter resourcebundle_locales_errors(VM green; JIT skipped WeakRefNativeOpsJit bootstrap)phpc buildof ResourceBundle instance methods — pre-existing gap ($rb->get()alreadyundefined method object::get()under AOT; FFI unavailable in native binary for locales enum)Verification transcript (this workspace)
Pillar 1 before claim:
bootstrap-selfhost-linkOK; inventory OK 5826/5826;user_release_ready: yes.Made with Cursor