Skip to content

Commit

Permalink
Merge pull request #1 from justbetter/feature/laravel-11
Browse files Browse the repository at this point in the history
Support Laravel 11
  • Loading branch information
VincentBean authored Mar 29, 2024
2 parents 96a7228 + 20dc17c commit d72f2bc
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 47 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1]
laravel: [10.*]
php: [8.3]
laravel: [10.*, 11.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

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

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1]
laravel: [10.*]
php: [8.3]
laravel: [10.*, 11.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*

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

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
55 changes: 25 additions & 30 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
name: style

on: ['push', 'pull_request']

on:
push:
branches:
- main
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.1]
laravel: [10.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
style:
name: Style
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none

- name: Install dependencies
run: composer install

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
coverage: none
- name: Style
run: composer fix-style

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Style
run: composer style
- name: Commit Changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Fix styling changes
13 changes: 9 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,24 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ubuntu-20.04, ubuntu-22.04]
php: [8.1, 8.2]
laravel: [10.*]
os: [ubuntu-latest]
php: [8.2, 8.3]
laravel: [10.*, 11.*]
stability: [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 }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
],
"require": {
"php": "^8.1",
"justbetter/laravel-akeneo-client": "^1.1",
"laravel/framework": "^10.0"
"justbetter/laravel-akeneo-client": "^1.4",
"laravel/framework": "^10.0|^11.0"
},
"require-dev": {
"larastan/larastan": "^2.9",
"laravel/pint": "^1.10",
"nunomaduro/larastan": "^2.6",
"orchestra/testbench": "^8.5",
"orchestra/testbench": "^8.0|^9.0",
"phpstan/phpstan-mockery": "^1.1",
"phpunit/phpunit": "^10.2"
},
Expand Down
2 changes: 1 addition & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
includes:
- ./vendor/nunomaduro/larastan/extension.neon
- ./vendor/larastan/larastan/extension.neon
- ./vendor/phpstan/phpstan-mockery/extension.neon

parameters:
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/ProcessImageJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use Illuminate\Queue\SerializesModels;
use JustBetter\AkeneoImages\Contracts\ProcessesImage;

class ProcessImageJob implements ShouldQueue, ShouldBeUnique
class ProcessImageJob implements ShouldBeUnique, ShouldQueue
{
use Batchable;
use Dispatchable;
Expand Down
2 changes: 1 addition & 1 deletion src/Jobs/UploadImageJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use JustBetter\AkeneoImages\Contracts\UploadsImage;
use JustBetter\AkeneoImages\Models\Image;

class UploadImageJob implements ShouldQueue, ShouldBeUnique
class UploadImageJob implements ShouldBeUnique, ShouldQueue
{
use Batchable;
use Dispatchable;
Expand Down

0 comments on commit d72f2bc

Please sign in to comment.