diff --git a/.github/workflows/analyse.yml b/.github/workflows/analyse.yml index 2eed0a0..f8a0fe8 100644 --- a/.github/workflows/analyse.yml +++ b/.github/workflows/analyse.yml @@ -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 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 701b3bf..c85cbf7 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -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 diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 8e32ad0..e9a5c3d 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -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 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 138e94c..7000deb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 diff --git a/composer.json b/composer.json index 5ad6ff8..509de8a 100644 --- a/composer.json +++ b/composer.json @@ -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" }, diff --git a/phpstan.neon b/phpstan.neon index 2c40061..ae42faf 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,5 +1,5 @@ includes: - - ./vendor/nunomaduro/larastan/extension.neon + - ./vendor/larastan/larastan/extension.neon - ./vendor/phpstan/phpstan-mockery/extension.neon parameters: diff --git a/src/Jobs/ProcessImageJob.php b/src/Jobs/ProcessImageJob.php index 5b3974a..1194dbc 100644 --- a/src/Jobs/ProcessImageJob.php +++ b/src/Jobs/ProcessImageJob.php @@ -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; diff --git a/src/Jobs/UploadImageJob.php b/src/Jobs/UploadImageJob.php index 118f654..8c3013c 100644 --- a/src/Jobs/UploadImageJob.php +++ b/src/Jobs/UploadImageJob.php @@ -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;