Skip to content

Commit

Permalink
Merge pull request #83 from mirko-pagliai/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
mirko-pagliai committed Apr 29, 2022
2 parents 064c2a0 + e57d2e3 commit 14c0815
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 16 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Expand Up @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions 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.

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Expand Up @@ -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": {
Expand Down
24 changes: 18 additions & 6 deletions psalm.xml
Expand Up @@ -15,22 +15,34 @@
</projectFiles>

<issueHandlers>
<NullableReturnStatement>
<errorLevel type="suppress">
<file name="src/View/Helper/ThumbHelper.php" />
</errorLevel>
</NullableReturnStatement>

<RedundantPropertyInitializationCheck>
<errorLevel type="suppress">
<file name="src/Utility/ThumbCreator.php" />
</errorLevel>
</RedundantPropertyInitializationCheck>

<UndefinedConstant>
<errorLevel type="suppress">
<file name="src/Middleware/ThumbnailMiddleware.php" />
</errorLevel>
</UndefinedConstant>

<UndefinedInterfaceMethod>
<UndefinedFunction>
<errorLevel type="suppress">
<file name="src/Middleware/ThumbnailMiddleware.php" />
<file name="src/View/Helper/ThumbHelper.php" />
</errorLevel>
</UndefinedInterfaceMethod>
</UndefinedFunction>

<NullableReturnStatement>
<UndefinedInterfaceMethod>
<errorLevel type="suppress">
<file name="src/View/Helper/ThumbHelper.php" />
<file name="src/Middleware/ThumbnailMiddleware.php" />
</errorLevel>
</NullableReturnStatement>
</UndefinedInterfaceMethod>
</issueHandlers>
</psalm>
3 changes: 1 addition & 2 deletions src/Utility/ThumbCreator.php
Expand Up @@ -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()'
Expand Down
2 changes: 1 addition & 1 deletion src/View/Helper/ThumbHelper.php
Expand Up @@ -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');
}

/**
Expand Down
2 changes: 1 addition & 1 deletion version
@@ -1 +1 @@
1.9.8
1.9.9

0 comments on commit 14c0815

Please sign in to comment.