tecnickcom / tc-lib-color

PHP library to manipulate various color representations
Other
23 stars 6 forks source link

Test failure with PHP 8.4 #14

Open remicollet opened 2 months ago

remicollet commented 2 months ago

Using 8.4.0beta3

PHPUnit 10.5.30 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.4.0beta3
Configuration: /dev/shm/BUILD/tc-lib-color-14fc157ae64767cc6761e9126f7ec7e5b27bf1cb/phpunit.xml

................................................................. 65 / 94 ( 69%)
F.....................F......                                     94 / 94 (100%)

Time: 00:00.018, Memory: 4.00 MB

There were 2 failures:

1) Test\PdfTest::testGetColorObject
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'#4080bfff'
+'#407fbfff'

/dev/shm/BUILD/tc-lib-color-14fc157ae64767cc6761e9126f7ec7e5b27bf1cb/test/PdfTest.php:154

2) Test\WebTest::testGetColorObj
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'#4080bfff'
+'#407fbfff'

/dev/shm/BUILD/tc-lib-color-14fc157ae64767cc6761e9126f7ec7e5b27bf1cb/test/WebTest.php:191

FAILURES!
Tests: 94, Assertions: 274, Failures: 2.
nicolaasuni commented 2 months ago

Interesting. At first glance, since this works with all the preceding PHP version since 5, It could be PHP 8.4 bug. It may be related to the changes in the PHP round function: https://github.com/php/php-src/issues/14332