From 0b108903b51711ff9f0357458dc3eb03398eb894 Mon Sep 17 00:00:00 2001 From: lukinovec Date: Thu, 16 Feb 2023 11:34:42 +0100 Subject: [PATCH] Add L10 support, remove L6 and L8 support (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add L10 support * Update PHP version in ci.yml * Update ci.yml * Revert ci.yml changes * Migrate PHPUnit XML config using "--migrate-configuration" * Update phpunit.xml (delete cacheDirectory, use backupStaticAttributes instead of backupStaticProperties) * Delete backupStaticAttributes * Add PHP version matrix * Use ci.yml from #12 * Correct Laravel matrix versions * Revert ci.yml changes * Use multiple PHP versions * Update ci.yml * Don't use PHP 8 with Laravel 10 in CI * Update ci.yml * Remove L6 and L8 support * Use single PHP version in CI * Update ci.yml * Change matrix in ci.yml * swap laravel 9 & 10 * Update README.md --------- Co-authored-by: Samuel Ć tancl --- .github/workflows/ci.yml | 11 +++++--- README.md | 4 +-- composer.json | 6 ++-- phpunit.xml | 60 +++++++++++++++++----------------------- 4 files changed, 38 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b21de4..54f1a71 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,13 +3,16 @@ name: run-tests on: [push, pull_request] jobs: - test: + tests: runs-on: ubuntu-latest strategy: fail-fast: true matrix: - laravel: [6, 8, 9] - + include: + - laravel: 9 + php: 8.0 + - laravel: 10 + php: 8.1 name: Tests (PHPUnit) - L${{ matrix.laravel }} @@ -20,7 +23,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.0' + php-version: ${{matrix.php}} - name: Install dependencies run: composer require "laravel/framework:^${{matrix.laravel}}.0" diff --git a/README.md b/README.md index bfef432..ee5725a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ ## Installation -Supports Laravel 6, 7, 8, and 9. +Supports Laravel 9 and 10. ``` composer require stancl/virtualcolumn @@ -20,7 +20,7 @@ class MyModel extends Model use VirtualColumn; public $guarded = []; - + public static function getCustomColumns(): array { return [ diff --git a/composer.json b/composer.json index f58bcc9..bccaf62 100644 --- a/composer.json +++ b/composer.json @@ -19,11 +19,11 @@ } }, "require": { - "illuminate/support": "^6.0|^8.0|^9.0", - "illuminate/database": "^6.0|^8.0|^9.0" + "illuminate/support": "^9.0|^10.0", + "illuminate/database": "^9.0|^10.0" }, "require-dev": { - "orchestra/testbench": "^4.0|^6.0|^7.0" + "orchestra/testbench": "^7.0|^8.0" }, "minimum-stability": "dev", "prefer-stable": true diff --git a/phpunit.xml b/phpunit.xml index c888838..300b6ff 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -1,35 +1,27 @@ - - - - ./tests - - - - - ./src - - ./src/routes.php - - - - - - - - - - - - - - - \ No newline at end of file + + + + ./src + + + ./src/routes.php + + + + + ./tests + + + + + + + + + + + + + +