diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6ada769..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: @@ -75,14 +78,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 diff --git a/CHANGELOG.md b/CHANGELOG.md index 2214424..67fe5e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 1.x branch ## 1.9 branch +### 1.9.9 +* added tests for PHP 8.1; +* little fixes. + ### 1.9.8 * fixed the bootstrap. diff --git a/composer.json b/composer.json index 6f22255..535564b 100644 --- a/composer.json +++ b/composer.json @@ -14,12 +14,13 @@ "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", - "phpunit/phpunit": "^8.5.14|^9.0" + "phpunit/phpunit": "^8.5.14|^9.1|^9.5" }, "autoload": { "psr-4": { diff --git a/psalm.xml b/psalm.xml index 0b4fcc2..acc2420 100644 --- a/psalm.xml +++ b/psalm.xml @@ -15,22 +15,34 @@ + + + + + + + + + + + + - + - + - + - + - + - + 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()' 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'); } /** diff --git a/version b/version index 66beabb..6ae756c 100644 --- a/version +++ b/version @@ -1 +1 @@ -1.9.8 +1.9.9