From 5c5ed7ec45821cad4de3fa15b853daf3eaea8cda Mon Sep 17 00:00:00 2001 From: Alexandr Smirnov Date: Tue, 25 Jun 2024 10:23:33 +0300 Subject: [PATCH 1/2] Upgrade phpunit/phpunit": "^9" Fix is_infinite PHP 8.1 --- build.xml | 2 +- composer.json | 4 +- phpunit.xml.dist | 52 +++++++++---------- .../GreatestCommonDivisor.php | 2 +- 4 files changed, 29 insertions(+), 31 deletions(-) diff --git a/build.xml b/build.xml index 698824c..9da7f3a 100644 --- a/build.xml +++ b/build.xml @@ -9,7 +9,7 @@ - + diff --git a/composer.json b/composer.json index 3251382..394861d 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,7 @@ }, { "name": "Kohana World Team", - "email": "ga@koseven@ga" + "email": "ga@koseven.ga" } ], "autoload": { @@ -26,6 +26,6 @@ "php": "^7.2|^8.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9" } } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 1c38cb5..c3e837e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,32 +1,30 @@ - - - - - ./tests/ - - - - - - - - - - - - - - - - src/ - - + bootstrap="vendor/autoload.php" verbose="true" + colors="true" timeoutForLargeTests="100" + xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"> + + + src/ + + + + + + + + + ./tests/ + + + + + + + + diff --git a/src/hmmmath/GreatestCommonDivisor/GreatestCommonDivisor.php b/src/hmmmath/GreatestCommonDivisor/GreatestCommonDivisor.php index 4b76c43..69f332d 100644 --- a/src/hmmmath/GreatestCommonDivisor/GreatestCommonDivisor.php +++ b/src/hmmmath/GreatestCommonDivisor/GreatestCommonDivisor.php @@ -31,7 +31,7 @@ public static function greatestCommonDivisor(array $numbers, string $mode = self do { $right = array_shift($numbers); - if (is_infinite($right)) { + if (is_infinite((float) $right)) { return INF; } From 6412b2289a5878961c9ca106ef2c8544fba663af Mon Sep 17 00:00:00 2001 From: Alexandr Smirnov Date: Tue, 25 Jun 2024 10:27:55 +0300 Subject: [PATCH 2/2] Remove PHP 7.2 --- .github/workflows/test.yaml | 1 - composer.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a709c44..bca7243 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,7 +11,6 @@ jobs: strategy: matrix: php-version: - - 7.2 - 7.3 - 7.4 - 8.0 diff --git a/composer.json b/composer.json index 394861d..d0e9e1e 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ } }, "require": { - "php": "^7.2|^8.0" + "php": "^7.3|^8.0" }, "require-dev": { "phpunit/phpunit": "^9"