Skip to content

Commit

Permalink
Laravel 12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentBean committed Feb 13, 2025
1 parent 20dc17c commit 6b399cb
Show file tree
Hide file tree
Showing 10 changed files with 32 additions and 38 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.3]
laravel: [10.*, 11.*]
php: [8.3, 8.4]
laravel: [11.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

Expand Down
11 changes: 4 additions & 7 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,10 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.3]
laravel: [10.*, 11.*]
php: [8.4]
laravel: [11.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

Expand All @@ -33,8 +31,7 @@ jobs:

- name: Install dependencies
run: |
composer config allow-plugins.pestphp/pest-plugin true
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" pestphp/pest --no-interaction --no-update
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: XDEBUG_MODE=coverage php vendor/bin/pest --coverage --min=100
run: composer coverage
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
php-version: 8.4
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,12 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: [10.*, 11.*]
stability: [prefer-stable]
php: [8.3, 8.4]
laravel: [11.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
php: 8.1

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand Down
28 changes: 16 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,17 @@
}
],
"require": {
"php": "^8.1",
"php": "^8.3",
"justbetter/laravel-akeneo-client": "^1.4",
"laravel/framework": "^10.0|^11.0"
"laravel/framework": "^11.0|^12.0"
},
"require-dev": {
"larastan/larastan": "^2.9",
"laravel/pint": "^1.10",
"orchestra/testbench": "^8.0|^9.0",
"phpstan/phpstan-mockery": "^1.1",
"phpunit/phpunit": "^10.2"
"larastan/larastan": "^3.0",
"laravel/pint": "^1.20",
"orchestra/testbench": "^9.0",
"pestphp/pest": "^3.7",
"phpstan/phpstan-mockery": "^2.0",
"phpunit/phpunit": "^11.5"
},
"autoload": {
"psr-4": {
Expand All @@ -34,18 +35,21 @@
},
"scripts": {
"test": "phpunit",
"analyse": "phpstan",
"analyse": "phpstan --memory-limit=256M",
"style": "pint --test",
"quality": [
"@test",
"@style",
"@analyse",
"@style"
]
"@test",
"@coverage"
],
"coverage": "XDEBUG_MODE=coverage php vendor/bin/pest --coverage --min=100"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"php-http/discovery": true
"php-http/discovery": true,
"pestphp/pest-plugin": true
}
},
"extra": {
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ parameters:
- src
- tests
level: 8
checkMissingIterableValueType: false
ignoreErrors:
- identifier: missingType.iterableValue
3 changes: 1 addition & 2 deletions src/Actions/UploadImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ class UploadImage implements UploadsImage
{
public function __construct(
protected Akeneo $akeneo
) {
}
) {}

public function upload(Image $image): Image
{
Expand Down
2 changes: 1 addition & 1 deletion tests/Jobs/ProcessImageJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function it_can_process_images(): void
->shouldReceive('process')
->with('::disk::', '::path::', ['key' => 'value'], false)
->once()
->andReturn(new Image());
->andReturn(new Image);
});

ProcessImageJob::dispatch('::disk::', '::path::', ['key' => 'value'], false);
Expand Down
2 changes: 1 addition & 1 deletion tests/Jobs/UploadImageJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function it_can_upload_images(): void
$mock
->shouldReceive('upload')
->once()
->andReturn(new Image());
->andReturn(new Image);
});

UploadImageJob::dispatch($image);
Expand Down
2 changes: 1 addition & 1 deletion tests/Models/ImageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class ImageTest extends TestCase
*/
public function it_can_get_meta(?array $meta, int|string $key, mixed $default, mixed $expected): void
{
$image = new Image();
$image = new Image;
$image->meta = $meta;

$this->assertEquals($expected, $image->meta($key, $default));
Expand Down

0 comments on commit 6b399cb

Please sign in to comment.