Repository navigation
PHP 8.6 compatibility - #28
Merged
Merged
Conversation
on PHP 8.6+ the same value is built from spl_object_id(), its output is identical to spl_object_hash() since PHP 8.1 - exported object references stay unchanged.
The last php-invoker 1.1 release (1.1.4) calls is_integer() in PHP_Invoker::invoke(), used for test timeouts in strict mode. PHPUnit_Util_Invoker overrides invoke() with is_int() and is still only used when php-invoker is installed.
code coverage with processUncoveredFilesFromWhitelist includes every whitelisted file, and including PHPUnit/Util/Invoker.php without php-invoker failed on the missing PHP_Invoker parent class.
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.
Ensure PHP 8.6 compatibility. All changes are backward-compatible with PHP 5.3+.
followup to #25
add PHP 8.6 to CI matrix
replace
is_integer()→is_int(),is_double()→is_float()(deprecated in PHP 8.6) - the numeric comparators call these, so on 8.6 nearly every numericassertEquals()raised a deprecationreplace
spl_object_hash()(deprecated in PHP 8.6) inPHPUnit_Util_TypeandPHPUnit_Util_Type_ExportContext- on PHP 8.6+ the same value is built fromspl_object_id()(identical output since PHP 8.1), keeping exported object references (stdClass Object &0000...) unchangeddon't return a value from mocked
__destruct()- returning a value from a destructor is deprecated in PHP 8.6, and the mock generator renderedreturn $resultfor every method while generated code for all other methods stays unchangedfix
is_integer()deprecation from the optional php-invoker (strict mode test timeouts) - php-invoker 1.1.4 is the last 1.1 release, soPHPUnit_Util_InvokeroverridesPHP_Invoker::invoke()withis_int(), still used only when php-invoker is installed and with unchanged timeout behaviornote:
deps/phpunit-mock-objects/Testsis not run by CI and already fails on master (28 failures, 2 errors), unrelated to this PR.note: the backtick and
(integer)cast deprecations in the CI log come from PEAR 1.10.18 (latest release, also unfixed on pear-core master) loaded for.phpttests - they appear on PHP 8.5 as well, don't affect results and fix is submitted to upstream in pear/pear-core#171.Assisted by Claude (Opus 5.5, xhigh).