Skip to content

Stdlib: IntlCalendar::getType()/add()/roll()/toDateTime() missing after #6151 (ext/intl/calendar) #20756

Closed

Description

@PurHur

Category

stdlib · php-src-strict · ext/intl IntlCalendar · pillar 4

Problem

After #6151, IntlCalendar::createInstance() / getTime() / setTime() / get / set / getTimeZone() work under PHP_COMPILER_PROFILE=8.4, but the bulk of the php-src calendar OOP surface is still missing — including getType(), field arithmetic (add/roll/clear), and DateTime bridges.

Repro Zend (intl) VM PROFILE=8.4 (2026-07-19, 1510ad5a2)
IntlCalendar::createInstance('UTC','en_US') object object
->getTime() float ms float ms ✅
method_exists(...,'getType') true false
add / roll / clear / isSet / fieldDifference / equals true false
getNow / toDateTime / fromDateTime true false
setTimeZone / getFirstDayOfWeek / isWeekend / getActualMaximum true false

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/issue_intlcalendar_methods.php'

Done when

  • getType() returns Zend calendar type string (e.g. gregorian)
  • add / roll / clear / equals present and match php-src field semantics on a minimal case
  • toDateTime / fromDateTime / getNow present
  • Compliance .phpt guard (VM+JIT)
  • php-src-strict; no php-compiler-strict shortcut

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

    Inline repro (if test/repro/issue_*.php is not yet on your tree):

    ./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && PHP_COMPILER_PROFILE=8.4 php bin/vm.php -r "
    // see issue body table — paste the corresponding repro snippet
    "'

    Prefer the test/repro/ path from the issue once present on master; otherwise recreate from the Problem table.

  3. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    handoff: queued after Locale #20755 in advanced-stdlib intl batch (this run finished 3 merges).

  4. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch queued after #20755 (#20755→#20781→#20780→#20769→#20756→#20740).

  5. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    handoff: advanced-stdlib intl batch this run merged #20771 (#20783), #20755 (#20791), #20781 (#20794).

    Next candidate still open in queue: start with #20780 numfmt_parse_currency(), then #20769 IntlTimeZone, #20756 IntlCalendar, #20740 IntlDatePatternGenerator.

  6. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

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

  7. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    handoff: advanced-stdlib intl batch this run merged #20789 (#20804), #20787 (#20806), #20788 (#20807). Next candidates: #20756 IntlCalendar methods, then #20740 IntlDatePatternGenerator.

  8. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib Advanced — batch (#20756 → #20740 → #20813 → #20809 → #20810). Starting with #20756 IntlCalendar methods.

  9. PurHur commented on Jul 19, 2026

    @PurHur
    OwnerAuthor

    merged: #20817

    Verification

    • PHP_COMPILER_PROFILE=8.4 php bin/vm.php test/repro/issue_intlcalendar_methods.php → type=gregorian, add/roll/toDateTime/fromDateTime/equals/clear green
    • vendor/bin/phpunit --filter intlcalendar_methods → OK (2 tests, VM+JIT)
    • inventory + generated docs in sync

    Next in batch: #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