From 6b80dfbea251cd0ed81dfe5d0f15064030900303 Mon Sep 17 00:00:00 2001 From: Mark Walet Date: Thu, 16 Feb 2023 18:54:44 +0100 Subject: [PATCH] Add support for Laravel 10 (#25) * Add support for Laravel 10 * Exclude Laravel 7 for PHP 8.2 --- .github/workflows/coverage.yml | 8 ++++---- .github/workflows/tests.yml | 16 +++++++++------- CHANGELOG.md | 8 ++++++++ composer.json | 6 +++--- .../MissingConfigurationExceptionTest.php | 2 +- tests/Exceptions/MissingDriverExceptionTest.php | 2 +- .../Exceptions/NoGitRepositoryExceptionTest.php | 2 +- 7 files changed, 27 insertions(+), 17 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 651f95a..df2e60f 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -10,18 +10,18 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Cache dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.composer/cache/files - key: dependencies-php-8.1-illuminate-9.*-composer-${{ hashFiles('composer.json') }} + key: dependencies-php-8.2-illuminate-10.*-composer-${{ hashFiles('composer.json') }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: 8.1 + php-version: 8.2 extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd coverage: xdebug diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index bd39126..85960bb 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,25 +13,27 @@ jobs: strategy: fail-fast: false matrix: - php: [7.4, 8.0, 8.1] - illuminate: [~6.20, ~7.29, ~8.74, ^9.0] + php: [ 8.0, 8.1, 8.2 ] + illuminate: [~7.29, ~8.74, ^9.0, ^10.0] stability: [prefer-lowest, prefer-stable] include: - - illuminate: ~6.20 - testbench: ~4.13 - illuminate: ~7.29 testbench: ~5.12 - illuminate: ~8.74 testbench: 6.* - illuminate: ^9.0 testbench: 7.* + - illuminate: ^10.0 + testbench: 8.* exclude: - - php: 7.4 - illuminate: ^9.0 - php: 8.1 illuminate: ~7.29 - php: 8.1 illuminate: ~6.20 + - php: 8.0 + illuminate: ^10.0 + - php: 8.2 + illuminate: ~7.29 name: P${{ matrix.php }} - I${{ matrix.illuminate }} - ${{ matrix.stability }} @@ -40,7 +42,7 @@ jobs: uses: actions/checkout@v2 - name: Cache dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.composer/cache/files key: dependencies-php-${{ matrix.php }}-illuminate-${{ matrix.illuminate }}-composer-${{ hashFiles('composer.json') }} diff --git a/CHANGELOG.md b/CHANGELOG.md index ec8b813..7f8de12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ ## [Unreleased](https://github.com/markwalet/laravel-git-state/compare/v1.6.1...master) +### Added +- Added support for Laravel 10 +- Added support for PHP 8.2 + +### Removed +- Removed support for PHP 7.4 +- Removed support for Laravel 6 + ## [v1.6.1 (2022-04-22)](https://github.com/markwalet/laravel-git-state/compare/v1.6.0...v1.6.1) ### Fixed diff --git a/composer.json b/composer.json index e68393d..7a283e1 100644 --- a/composer.json +++ b/composer.json @@ -15,14 +15,14 @@ } ], "require": { - "php": "~7.4|8.*", - "laravel/framework": "~6.20|~7.29|~8.74|^9.0", + "php": "8.*", + "laravel/framework": "~7.29|~8.74|^9.0|^10.0", "phpoption/phpoption": ">=1.8", "webmozart/assert": "^1.10" }, "require-dev": { "phpunit/phpunit": "~9.3", - "orchestra/testbench": "~4.13|~5.12|6.*|7.*" + "orchestra/testbench": "~5.12|6.*|7.*|8.*" }, "autoload": { "psr-4": { diff --git a/tests/Exceptions/MissingConfigurationExceptionTest.php b/tests/Exceptions/MissingConfigurationExceptionTest.php index b7d88d2..d261947 100644 --- a/tests/Exceptions/MissingConfigurationExceptionTest.php +++ b/tests/Exceptions/MissingConfigurationExceptionTest.php @@ -16,4 +16,4 @@ public function it_can_create_an_exception_instance(): void $this->assertEquals('Configuration key `config` is missing.', $message); } -} \ No newline at end of file +} diff --git a/tests/Exceptions/MissingDriverExceptionTest.php b/tests/Exceptions/MissingDriverExceptionTest.php index 6bf6a39..4e9b463 100644 --- a/tests/Exceptions/MissingDriverExceptionTest.php +++ b/tests/Exceptions/MissingDriverExceptionTest.php @@ -16,4 +16,4 @@ public function it_can_create_an_exception_instance(): void $this->assertEquals('Driver `invalid-driver` is not supported for git-state.', $message); } -} \ No newline at end of file +} diff --git a/tests/Exceptions/NoGitRepositoryExceptionTest.php b/tests/Exceptions/NoGitRepositoryExceptionTest.php index 86f8863..4744a16 100644 --- a/tests/Exceptions/NoGitRepositoryExceptionTest.php +++ b/tests/Exceptions/NoGitRepositoryExceptionTest.php @@ -16,4 +16,4 @@ public function it_can_create_an_exception_instance(): void $this->assertEquals('`example-path` is not a valid git repository.', $message); } -} \ No newline at end of file +}