From f3efd3a1f9e64b29e3994d780e7e66104c4f4fe5 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Thu, 28 Apr 2022 18:13:46 +0200 Subject: [PATCH 01/10] updated phpunit version --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6f22255..8c5577d 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ }, "require-dev": { "cakephp/cakephp-codesniffer": "^4.0", - "phpunit/phpunit": "^8.5.14|^9.0" + "phpunit/phpunit": "^9.1|^9.5" }, "autoload": { "psr-4": { From 029cec47d2c250360d6ccd746ef2bfd552593113 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Thu, 28 Apr 2022 18:13:59 +0200 Subject: [PATCH 02/10] fixed --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ada769..652c3b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -75,14 +75,14 @@ jobs: if [[ ${{ matrix.thumber-driver }} == 'gd' ]] || ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then vendor/bin/phpunit --exclude-group imageEquals elif [[ ${{ matrix.php-version }} == '8.0' ]]; then - export CODECOVERAGE=1 && vendor/bin/phpunit --verbose --coverage-clover=coverage.xml + export XDEBUG_MODE=coverage && vendor/bin/phpunit --verbose --coverage-clover=coverage.xml else vendor/bin/phpunit fi - name: Submit code coverage if: matrix.php-version == '8.0' - uses: codecov/codecov-action@v1 + uses: codecov/codecov-action@v2 cs-stan: name: Coding Standard & Static Analysis From dbe2d09581cbcd4d41826b6450761aee92399943 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:18:02 +0200 Subject: [PATCH 03/10] added tests for PHP 8.1 --- .github/workflows/ci.yml | 5 ++++- CHANGELOG.md | 3 +++ version | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 652c3b5..bf35660 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: strategy: fail-fast: false matrix: - php-version: ['7.2', '7.3', '7.4', '8.0'] + php-version: ['7.2', '7.3', '7.4', '8.0', '8.1'] prefer-lowest: [''] thumber-driver: ['imagick', 'gd'] include: @@ -28,6 +28,9 @@ jobs: - php-version: '8.0' prefer-lowest: 'prefer-lowest' thumber-driver: 'imagick' + - php-version: '8.1' + prefer-lowest: 'prefer-lowest' + thumber-driver: 'imagick' - php-version: '7.4' thumber-driver: 'gd' exclude: diff --git a/CHANGELOG.md b/CHANGELOG.md index 2214424..5e97c7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # 1.x branch ## 1.9 branch +### 1.9.9 +* added tests for PHP 8.1. + ### 1.9.8 * fixed the bootstrap. diff --git a/version b/version index 66beabb..6ae756c 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.9.8 +1.9.9 From aa1f7c987125b75c521b2224a8e18de2029283f7 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:19:40 +0200 Subject: [PATCH 04/10] removed useless trait --- src/TestSuite/TestCase.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/TestSuite/TestCase.php b/src/TestSuite/TestCase.php index de729d3..e29e938 100644 --- a/src/TestSuite/TestCase.php +++ b/src/TestSuite/TestCase.php @@ -17,14 +17,12 @@ use MeTools\TestSuite\TestCase as BaseTestCase; use Thumber\Cake\Utility\ThumbCreator; use Thumber\TestSuite\TestTrait; -use Tools\TestSuite\BackwardCompatibilityTrait; /** * TestCase class */ abstract class TestCase extends BaseTestCase { - use BackwardCompatibilityTrait; use TestTrait; /** From 0daf5d8fa17500c61098d2daba255431677e4ee1 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:19:54 +0200 Subject: [PATCH 05/10] fixed code --- src/Utility/ThumbCreator.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Utility/ThumbCreator.php b/src/Utility/ThumbCreator.php index ea71ccb..d0d8e3a 100644 --- a/src/Utility/ThumbCreator.php +++ b/src/Utility/ThumbCreator.php @@ -71,11 +71,10 @@ protected function getImageInstance(): Image * @return string * @since 1.5.1 * @throws \InvalidArgumentException - * @uses $target */ public function getUrl(bool $fullBase = true): string { - Exceptionist::isTrue($this->target, __d( + Exceptionist::isTrue($this->target ?? false, __d( 'thumber', 'Missing path of the generated thumbnail. Probably the `{0}` method has not been invoked', 'save()' From 38fbc2eab48582105abb38801e897a97d499225c Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:20:06 +0200 Subject: [PATCH 06/10] fixed deprecated function --- src/View/Helper/ThumbHelper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/View/Helper/ThumbHelper.php b/src/View/Helper/ThumbHelper.php index d30aa63..dde4701 100644 --- a/src/View/Helper/ThumbHelper.php +++ b/src/View/Helper/ThumbHelper.php @@ -80,7 +80,7 @@ public function __call(string $name, array $params): string */ protected function isUrlMethod(string $name): bool { - return string_ends_with($name, 'Url'); + return str_ends_with($name, 'Url'); } /** From 09c3445711f43573b8c93253305ccddf20611a95 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:20:11 +0200 Subject: [PATCH 07/10] fixed --- psalm.xml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/psalm.xml b/psalm.xml index 0b4fcc2..7ddf1f0 100644 --- a/psalm.xml +++ b/psalm.xml @@ -15,6 +15,18 @@ + + + + + + + + + + + + @@ -26,11 +38,5 @@ - - - - - - From 7fa237ab3d88a221429adaa3a74c4358c5b36319 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:20:28 +0200 Subject: [PATCH 08/10] updated --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e97c7e..67fe5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # 1.x branch ## 1.9 branch ### 1.9.9 -* added tests for PHP 8.1. +* added tests for PHP 8.1; +* little fixes. ### 1.9.8 * fixed the bootstrap. From 3dbe23db7d0477dd877aeee948e2da4bb66de227 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 16:25:24 +0200 Subject: [PATCH 09/10] fixed --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8c5577d..33a4477 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ }, "require-dev": { "cakephp/cakephp-codesniffer": "^4.0", - "phpunit/phpunit": "^9.1|^9.5" + "phpunit/phpunit": "^8.5.14|^9.1|^9.5" }, "autoload": { "psr-4": { From e57d2e36b542f3e7043b7a17c563dfbc26377097 Mon Sep 17 00:00:00 2001 From: mirko-pagliai Date: Fri, 29 Apr 2022 17:20:26 +0200 Subject: [PATCH 10/10] fixed --- composer.json | 5 +++-- psalm.xml | 6 ++++++ src/TestSuite/TestCase.php | 2 ++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 33a4477..535564b 100644 --- a/composer.json +++ b/composer.json @@ -14,8 +14,9 @@ "php": ">=7.2", "cakephp/cakephp": "^4.0", "intervention/image": "^2.4", - "mirko-pagliai/me-tools": "^2.20", - "mirko-pagliai/php-thumber": "^1.4" + "mirko-pagliai/me-tools": "^2.20.9", + "mirko-pagliai/php-thumber": "^1.4", + "mirko-pagliai/php-tools": "~1.5.9" }, "require-dev": { "cakephp/cakephp-codesniffer": "^4.0", diff --git a/psalm.xml b/psalm.xml index 7ddf1f0..acc2420 100644 --- a/psalm.xml +++ b/psalm.xml @@ -33,6 +33,12 @@ + + + + + + diff --git a/src/TestSuite/TestCase.php b/src/TestSuite/TestCase.php index e29e938..de729d3 100644 --- a/src/TestSuite/TestCase.php +++ b/src/TestSuite/TestCase.php @@ -17,12 +17,14 @@ use MeTools\TestSuite\TestCase as BaseTestCase; use Thumber\Cake\Utility\ThumbCreator; use Thumber\TestSuite\TestTrait; +use Tools\TestSuite\BackwardCompatibilityTrait; /** * TestCase class */ abstract class TestCase extends BaseTestCase { + use BackwardCompatibilityTrait; use TestTrait; /**