Skip to content

Stdlib: UConverter::getAliases()/getAvailable()/getStandards() catalog API missing after #20770 (ext/intl/converter) #20788

Closed

Description

@PurHur

Category

stdlib · php-src-strict · ext/intl UConverter · pillar 4 · (re-#20770)

Problem

#20770 / #6401 delivered convert/transcode + encoding getters/setSubstChars, but php-src’s converter catalog / metadata statics are still missing. Apps that enumerate ICU converters via UConverter::getAvailable() / getAliases() fatal.

Repro Zend (intl) VM (2026-07-19)
method_exists(UConverter::class, 'convert') / transcode true true (ok)
method_exists(..., 'getAvailable') true false
method_exists(..., 'getAliases') true false
method_exists(..., 'getStandards') / getStandardName / getMimeName true false
method_exists(..., 'getSourceType') / getDestinationType true false
UConverter::getAvailable() non-empty list<string> Error: Call to undefined static method

php-src reference

PHP implementation target

  • Extend ext/intl/VmUConverter.php — register static catalog methods beside existing convert/transcode
  • PHP-in-PHP + thin ICU FFI; no new C in runtime/

Repro

./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_uconverter_catalog_api.php'

Done when

  • Catalog methods method_exists true
  • getAvailable() returns a non-empty list including a UTF-8 alias when ICU present
  • getAliases('UTF-8') returns aliases that include a utf8 spelling (Zend parity)
  • Compliance .phpt under test/compliance/cases/intl/
  • php-src-strict; no php-compiler-strict shortcut

Trust snapshot (filing run)

  • bootstrap-selfhost-link: OK · inventory OK 5830/5830 · user_release_ready: yes

Activity

  1. added
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jul 19, 2026
  2. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch queued (#20789 → #20787 → #20788 → #20756 → #20740).

  3. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — starting #20788 (after #20789/#20804, #20787/#20806 merged).

  4. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    merged via PR. Batch complete this run: #20789, #20787, #20788. Next queued: #20756 IntlCalendar methods, #20740 IntlDatePatternGenerator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machineenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions