Align tests with PHP 8.6 changes to ext/tidy and ext/intl - #644
Merged
Conversation
php-src 4782ec55aae added ZEND_ACC_NOT_SERIALIZABLE to tidyNode, which ext/deepclone honours by refusing the class. Following the design principle that the deepclone polyfill mirrors the newest native state, tidyNode joins the classes it rejects on every version; the extension itself only rejects it on 8.6+, so the test keeps the round-trip expectation for that case. php-src 94e8c54ef27 removed the doubled article from the ValueError thrown by normalizer_normalize(), so the message is now conditional on the version. Also de-flake Php73Test::testHardwareTimeAsArrayNanos: it compared the two hrtime() components separately, which fails whenever the pair straddles a whole second.
stof
approved these changes
Aug 7, 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.
Fixes the two failures of the
PHPUnit Tests (8.6, apc, apcu, ... intl-73.2 ...)job, which is red on1.xitself, plus an unrelated flaky test that failed in the same run.DeepCloneTest::testTidyNodeRoundTripphp-src
4782ec55aae(Add NOT_SERIALIZABLE to XMLWriter, XMLReader, SNMP, tidy, and tidyNode, php/php-src#21694, master only) markstidyNode@not-serializable— it wraps a libTidy handle and "segfaults on use" once unserialized.ext/deepclonehonoursZEND_ACC_NOT_SERIALIZABLE, so on 8.6 both engines now refuse the node: the extension via that flag, the polyfill becauseunserialize('O:8:"tidyNode":0:{}')throws. Same exception, same message — only the test was stale.Per the design principle that the
deepclonepolyfill mirrors the newest native state rather than each intermediate version,tidyNodejoinsNOT_ROUND_TRIPPABLE. The extension is more lenient below 8.6 (tidyNodeisfinaland bare-instantiable there, so it passes the probe), so the test keeps the round-trip expectation for that combination.NormalizerTest::testNormalizeWithInvalidFormphp-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 hardcodedmust be a a valid, so the message is now conditional onPHP_VERSION_ID >= 80600.Php73Test::testHardwareTimeAsArrayNanosUnrelated, 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 twohrtime()calls straddle a whole second. It now measures total elapsed nanoseconds and checks the sub-second component stays in range.