Skip to content

Commit

Permalink
add php 8.4 to test suite (#369)
Browse files Browse the repository at this point in the history
* add php 8.4 to test suite

* address implicit nulls

* exclude vendor dir from phpstan analysis

* bump minimum versions of dependencies
  • Loading branch information
frasmage authored Dec 5, 2024
1 parent 6fb3d0a commit 2173b16
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/automated-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.1', '8.2', '8.3']
php-versions: ['8.2', '8.3', '8.4']
prefer-lowest: ['','--prefer-lowest']
name: PHP ${{ matrix.php-versions }} ${{ matrix.prefer-lowest }}
steps:
Expand Down
40 changes: 20 additions & 20 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,29 @@
"require": {
"php": ">=8.1.0",
"ext-fileinfo": "*",
"guzzlehttp/guzzle": "^7.4.1",
"guzzlehttp/psr7": "^2.6",
"illuminate/database": "^10.0|^11.0",
"illuminate/filesystem": "^10.0|^11.0",
"illuminate/support": "^10.0|^11.0",
"intervention/image": "^2.7.1|^3.0",
"league/flysystem": "^3.0.4",
"symfony/http-foundation": "^6.0.3|^7.0",
"symfony/mime": "^6.0|^7.0",
"spatie/image-optimizer": "^1.7"
"guzzlehttp/guzzle": "^7.9.1",
"guzzlehttp/psr7": "^2.7",
"illuminate/database": "^10.48.25|^11.34.0",
"illuminate/filesystem": "^10.48.25|^11.34.0",
"illuminate/support": "^10.48.25|^11.34.0",
"intervention/image": "^2.7.1|^3.9.1",
"league/flysystem": "^3.29.1",
"symfony/http-foundation": "^6.0.3|^7.2",
"symfony/mime": "^6.0|^7.2",
"spatie/image-optimizer": "^1.8"
},
"require-dev": {
"aws/aws-sdk-php": "^3.166.2",
"doctrine/dbal": "^2.11|^3.0",
"aws/aws-sdk-php": "^3.334.0",
"doctrine/dbal": "^3.9.3",
"guzzlehttp/promises": "^1.5.1",
"laravel/legacy-factories": "^1.3.0",
"league/flysystem-aws-s3-v3": "^3.0",
"mockery/mockery": "^1.4.2",
"orchestra/testbench": "^8.0|^9.0",
"php-coveralls/php-coveralls": "^2.5.2",
"phpunit/phpunit": "^10.0",
"vlucas/phpdotenv": "^5.4.1",
"phpstan/phpstan": "^1.10"
"laravel/legacy-factories": "^1.4.0",
"league/flysystem-aws-s3-v3": "^3.29.0",
"mockery/mockery": "^1.6.12",
"orchestra/testbench": "^9.6.1",
"php-coveralls/php-coveralls": "^2.7.0",
"phpunit/phpunit": "^10.5.38",
"vlucas/phpdotenv": "^5.6.1",
"phpstan/phpstan": "^2.0.3"
},
"autoload": {
"psr-4": {
Expand Down
3 changes: 3 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ parameters:
paths:
- src
- tests
excludePaths:
analyse:
- vendor
4 changes: 2 additions & 2 deletions src/Exceptions/MediaMoveException.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ public static function destinationExistsOnDisk(string $disk, string $path): self
return new self("Another file already exists at `{$path}` on disk `{$disk}`.");
}

public static function fileNotFound(string $disk, string $path, Exception $previous = null): self
public static function fileNotFound(string $disk, string $path, ?Exception $previous = null): self
{
return new self("File not found at `{$path}` on disk `{$disk}`.", 0, $previous);
}

public static function failedToCopy(string $from, string $to, Exception $previous = null): self
public static function failedToCopy(string $from, string $to, ?Exception $previous = null): self
{
return new self("Failed to copy file from `{$from}` to `{$to}`.", 0, $previous);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ImageManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ private function getHashFromStream(StreamInterface $stream, string $algo): strin
private function checkForDuplicates(
Media $variant,
ImageManipulation $manipulation,
Media $originalVariant = null
?Media $originalVariant = null
) {
if ($originalVariant
&& $variant->disk === $originalVariant->disk
Expand Down

0 comments on commit 2173b16

Please sign in to comment.