From 4a5e0e62a4917e7dcc29bc69f36de21eacabf42f Mon Sep 17 00:00:00 2001 From: Arthur LORENT Date: Mon, 23 Jan 2023 09:41:46 +0100 Subject: [PATCH] Laravel 10 support (#24) * Added Laravel 10 support * Dropped Laravel 8 support * Locked PHP versions to 8.1 and 8.2 --- .github/workflows/ci.yml | 20 ++++++++------------ CHANGELOG.md | 8 ++++++++ README.md | 13 +++++++------ composer.json | 12 ++++++------ 4 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fcea479..1b20dc3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,17 +14,13 @@ jobs: strategy: fail-fast: true matrix: - php: ['8.2', '8.1'] - laravel: ['9.*', '8.*'] + php: ['8.1', '8.2'] + laravel: ['9.*', '10.*'] include: - laravel: '9.*' testbench: '7.*' - eloquent-sortable: '4.*' - larastan: '2.*' - - laravel: '8.*' - eloquent-sortable: '3.*' - testbench: '6.*' - larastan: '1.*' + - laravel: '10.*' + testbench: '8.*' name: P${{ matrix.php }} - L${{ matrix.laravel }} @@ -53,13 +49,13 @@ jobs: # Lower PHP and laravel versions. - name: PHPUnit without code coverage - if: matrix.php != '8.2' || matrix.laravel != '9.*' + if: matrix.php != '8.2' || matrix.laravel != '10.*' run: vendor/bin/testbench package:test --parallel --no-coverage # Last PHP and laravel versions. - name: Code analysis - if: matrix.php == '8.2' && matrix.laravel == '9.*' + if: matrix.php == '8.2' && matrix.laravel == '10.*' run: | # Remove this line once Larastan and Livewire are working well together sed -i -e 's#.*protected \$enablesPackageDiscoveries.*#&\nprotected function overrideApplicationBindings($app){return["brickables"=>"Okipa\\\\LaravelBrickables\\\\Brickables"];}#' vendor/nunomaduro/larastan/src/ApplicationResolver.php @@ -68,13 +64,13 @@ jobs: vendor/bin/phpstan analyse - name: PHPUnit with code coverage - if: matrix.php == '8.2' && matrix.laravel == '9.*' + if: matrix.php == '8.2' && matrix.laravel == '10.*' run: | mkdir -p build/logs vendor/bin/testbench package:test --parallel --coverage-text --coverage-clover build/logs/clover.xml - name: Code coverage upload to Coveralls - if: env.COVERALLS_REPO_TOKEN && matrix.php == '8.2' && matrix.laravel == '9.*' + if: env.COVERALLS_REPO_TOKEN && matrix.php == '8.2' && matrix.laravel == '10.*' env: COVERALLS_RUN_LOCALLY: 1 COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 21e256a..f9cbcfc 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [3.2.0](https://github.com/Okipa/laravel-brickables/compare/3.1.0...3.2.0) + +2023-01-22 + +* Added Laravel 10 support +* Dropped Laravel 8 support +* Locked PHP versions to 8.1 and 8.2 + ## [3.1.0](https://github.com/Okipa/laravel-brickables/compare/3.0.1...3.1.0) 2022-12-23 diff --git a/README.md b/README.md index f1510f0..952e4e6 100755 --- a/README.md +++ b/README.md @@ -28,12 +28,13 @@ Found this package helpful? Please consider supporting my work! ## Compatibility -| Laravel version | PHP version | Package version | -|---|---|---| -| ^8.0 | ^9.0 | ^8.1 | ^8.2 | ^3.1 | -| ^8.0 | ^9.0 | ^8.0 | ^8.1 | ^3.0 | -| ^7.0 | ^8.0 | ^7.4 | ^8.0 | ^2.0 | -| ^5.8 | ^6.0 | ^7.0 | ^7.1 | ^7.2 | ^7.3 | ^7.4 | ^1.0 | +| Laravel version | PHP version | Package version | +|------------------------------|------------------------------------------|-----------------| +| ^9.0 | ^10.0 | 8.1.* | 8.2.* | ^3.2 | +| ^8.0 | ^9.0 | ^8.1 | ^8.2 | ^3.1 | +| ^8.0 | ^9.0 | ^8.0 | ^8.1 | ^3.0 | +| ^7.0 | ^8.0 | ^7.4 | ^8.0 | ^2.0 | +| ^5.8 | ^6.0 | ^7.0 | ^7.1 | ^7.2 | ^7.3 | ^7.4 | ^1.0 | ## Upgrade guide diff --git a/composer.json b/composer.json index 29cb8c3..8e0f658 100755 --- a/composer.json +++ b/composer.json @@ -25,15 +25,15 @@ } ], "require": { - "php": "^8.1|^8.2", - "illuminate/contracts": "^8.0|^9.0", - "spatie/eloquent-sortable": "^3.10.0|^4.0.1" + "php": "8.1.*|8.2.*", + "illuminate/contracts": "^9.0|^10.0", + "spatie/eloquent-sortable": "4.0.2" }, "require-dev": { "brianium/paratest": "^6.4", - "nunomaduro/collision": "^5.10|^6.0", - "nunomaduro/larastan": "^1.0|^2.0", - "orchestra/testbench": "^6.0|^7.0", + "nunomaduro/collision": "^6.0", + "nunomaduro/larastan": "^2.0", + "orchestra/testbench": "^7.0|^8.0", "phpmd/phpmd": "^2.11", "laravel/pint": "^1.1" },