Skip to content

ext/intl: Fix various error messages - #22828

Merged
LamentXU123 merged 1 commit into
php:masterfrom
LamentXU123:intl-error
Jul 20, 2026
Merged

ext/intl: Fix various error messages#22828
LamentXU123 merged 1 commit into
php:masterfrom
LamentXU123:intl-error

Conversation

@LamentXU123

@LamentXU123 LamentXU123 commented Jul 20, 2026

Copy link
Copy Markdown
Member
object has an time zone offset that's too large

to

object has a time zone offset that is too large

and

must be a a valid normalization form

to

must be a valid normalization form

@LamentXU123
LamentXU123 merged commit 94e8c54 into php:master Jul 20, 2026
18 checks passed
nicolas-grekas added a commit to symfony/polyfill that referenced this pull request Aug 7, 2026
…(nicolas-grekas)

This PR was merged into the 1.x branch.

Discussion
----------

Align tests with PHP 8.6 changes to ext/tidy and ext/intl

Fixes the two failures of the `PHPUnit Tests (8.6, apc, apcu, ... intl-73.2 ...)` job, which is red on `1.x` itself, plus an unrelated flaky test that failed in the same run.

### `DeepCloneTest::testTidyNodeRoundTrip`

php-src [`4782ec55aae`](php/php-src@4782ec55aae) (*Add NOT_SERIALIZABLE to XMLWriter, XMLReader, SNMP, tidy, and tidyNode*, php/php-src#21694, master only) marks `tidyNode` ``@not`-serializable` — it wraps a libTidy handle and "segfaults on use" once unserialized.

`ext/deepclone` honours `ZEND_ACC_NOT_SERIALIZABLE`, so on 8.6 both engines now refuse the node: the extension via that flag, the polyfill because `unserialize('O:8:"tidyNode":0:{}')` throws. Same exception, same message — only the test was stale.

Per the design principle that the `deepclone` polyfill mirrors the newest native state rather than each intermediate version, `tidyNode` joins `NOT_ROUND_TRIPPABLE`. The extension is more lenient below 8.6 (`tidyNode` is `final` and bare-instantiable there, so it passes the probe), so the test keeps the round-trip expectation for that combination.

### `NormalizerTest::testNormalizeWithInvalidForm`

php-src [`94e8c54ef27`](php/php-src@94e8c54ef27) (*ext/intl: Fix various error messages*, php/php-src#22828, master only) dropped the doubled article introduced back when intl warnings were promoted to exceptions. Both the polyfill and its test hardcoded `must be a a valid`, so the message is now conditional on `PHP_VERSION_ID >= 80600`.

### `Php73Test::testHardwareTimeAsArrayNanos`

Unrelated, and the reason the `(7.3, apc, apcu, ...)` job failed in the same run: the test asserted `$hrtime2[0] - $hrtime[0] === 0`, which fails whenever the two `hrtime()` calls straddle a whole second. It now measures total elapsed nanoseconds and checks the sub-second component stays in range.

Commits
-------

159e290 Align tests with PHP 8.6 changes to ext/tidy and ext/intl
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants