Category
stdlib
Problem
Zend ext/intl exposes IntlCalendar and IntlTimeZone for locale-aware calendar math (field get/set, roll, add, timezone rules). This compiler has an ext/intl skeleton (#5925, #5747, #5201) but no calendar classes — class_exists('IntlCalendar') and class_exists('IntlTimeZone') are false under bin/vm.php.
Scheduling, i18n date pickers, and ICU-based calendar conversions depend on this API (distinct from procedural date() / DateTime in #3072).
php-src reference
Repro (failure today)
<?php
var_export(class_exists('IntlCalendar'));
echo "\n";
var_export(class_exists('IntlTimeZone'));
echo "\n";
$cal = IntlCalendar::createInstance(null, 'en_US');
echo $cal->get(IntlCalendar::FIELD_YEAR), "\n";
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php repro_intl_calendar.php # false/false if ext/intl absent in image; true + year if built
php bin/vm.php repro_intl_calendar.php
'
| Runtime |
class_exists('IntlCalendar') |
createInstance |
| Zend (ext/intl) |
true |
object + field year |
| VM today |
false |
compile/runtime fatal — class unknown |
Scope (this repo) — v1 subset
| Module |
Path |
| Extension |
ext/intl/IntlCalendar.php, IntlTimeZone.php, Module.php registration |
| VM OOP |
thin wrappers; v1 may delegate field math to host ICU behind VmIntl guard or port minimal Gregorian rules in PHP |
| Constants |
IntlCalendar::FIELD_*, DOW_*, MONTH_* |
| Tests |
test/compliance/cases/ext/intl_calendar_basic.phpt |
| Matrix |
script/capability-matrix.php |
Defer IntlGregorianCalendar, IntlBreakIterator integration, and full ICU timezone rule DB to phase 2. Coordinate with #3336 umbrella and #5201 date formatter.
PHP-in-PHP: prefer PHP class implementations in ext/intl/; no permanent C calendar tables in runtime/.
Done when
Links
Category
stdlibProblem
Zend ext/intl exposes
IntlCalendarandIntlTimeZonefor locale-aware calendar math (field get/set,roll,add, timezone rules). This compiler has an ext/intl skeleton (#5925, #5747, #5201) but no calendar classes —class_exists('IntlCalendar')andclass_exists('IntlTimeZone')are false underbin/vm.php.Scheduling, i18n date pickers, and ICU-based calendar conversions depend on this API (distinct from procedural
date()/DateTimein #3072).php-src reference
ext/intl/calendar/calendar_class.c—IntlCalendarmethodsext/intl/timezone/timezone_class.c—IntlTimeZoneext/intl/calendar/calendar_methods.c—createInstance,get,set,add,rollext/intl/php_intl.stub.php— stubsRepro (failure today)
class_exists('IntlCalendar')createInstancetruefalseScope (this repo) — v1 subset
ext/intl/IntlCalendar.php,IntlTimeZone.php,Module.phpregistrationVmIntlguard or port minimal Gregorian rules in PHPIntlCalendar::FIELD_*,DOW_*,MONTH_*test/compliance/cases/ext/intl_calendar_basic.phptscript/capability-matrix.phpDefer
IntlGregorianCalendar,IntlBreakIteratorintegration, and full ICU timezone rule DB to phase 2. Coordinate with #3336 umbrella and #5201 date formatter.PHP-in-PHP: prefer PHP class implementations in
ext/intl/; no permanent C calendar tables inruntime/.Done when
IntlCalendar+IntlTimeZoneregistered;class_existstrue on VMcreateInstance,get/setonFIELD_YEAR/FIELD_MONTH/FIELD_DAY_OF_MONTH,getTimeZone— repro prints sensible year./script/ci-fast.sh --filter IntlCalendargreen (or@group intlskip documented)Links