From 8c9e7f88a83a1fe19bc14c5e73747eb566ee731f Mon Sep 17 00:00:00 2001 From: Joel Butcher Date: Wed, 9 Feb 2022 21:46:50 +0000 Subject: [PATCH] Add Laravel 9 Support --- .github/workflows/tests.yml | 73 +++++-------------------------------- .styleci.yml | 6 ++- composer.json | 10 ++--- 3 files changed, 20 insertions(+), 69 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 84181ad..84164ec 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,75 +7,23 @@ on: - cron: '0 0 * * *' jobs: - linux_tests: + tests: - runs-on: ubuntu-latest - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: forge - ports: - - 33306:3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - redis: - image: redis:5.0 - ports: - - 6379:6379 - options: --entrypoint redis-server + runs-on: ubuntu-18.04 strategy: fail-fast: true matrix: - php: [7.3, 7.4] - stability: [prefer-lowest, prefer-stable] - - name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, gd - tools: composer:v2 - coverage: none - - - name: Setup Memcached - uses: niden/actions-memcached@v7 - - - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress - - - name: Execute tests - run: vendor/bin/phpunit --verbose - env: - DB_PORT: ${{ job.services.mysql.ports[3306] }} - DB_USERNAME: root - - windows_tests: - - runs-on: windows-latest - strategy: - fail-fast: true - matrix: - php: [7.3, 7.4] - include: + php: [7.3, 7.4, 8.0, 8.1] + laravel: [6.0, 7.0, 8.0, 9.0] + exclude: - php: 7.3 - stability: prefer-lowest + laravel: 9 - php: 7.4 - stability: prefer-stable + laravel: 9 - name: PHP ${{ matrix.php }} - ${{ matrix.stability }} - Windows + name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf false - git config --global core.eol lf - name: Checkout code uses: actions/checkout@v2 @@ -83,13 +31,12 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} - extensions: dom, curl, libxml, mbstring, zip, pdo, sqlite, pdo_sqlite, gd, pdo_mysql, fileinfo, ftp + extensions: dom, curl, libxml, mbstring, zip tools: composer:v2 coverage: none - ini-values: memory_limit=512M - name: Install dependencies - run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-progress + run: composer update --prefer-dist --no-interaction --no-progress - name: Execute tests run: vendor/bin/phpunit --verbose diff --git a/.styleci.yml b/.styleci.yml index 0285f17..1430fee 100644 --- a/.styleci.yml +++ b/.styleci.yml @@ -1 +1,5 @@ -preset: laravel +php: + preset: laravel + version: 8 + disabled: + - no_unused_imports diff --git a/composer.json b/composer.json index 8c85d16..4200b24 100644 --- a/composer.json +++ b/composer.json @@ -17,13 +17,13 @@ ], "require": { "php": "^7.3|^8.0", - "illuminate/support": "^8.0", - "illuminate/database": "^8.0" + "illuminate/support": "^7.0|^8.0|^9.0", + "illuminate/database": "^7.0|^8.0|^9.0" }, "require-dev": { - "illuminate/pagination": "^8.0", - "orchestra/testbench": "^6.3", - "phpunit/phpunit": "^8.4|^9.0" + "illuminate/pagination": "^7.0|^8.0|^9.0", + "orchestra/testbench": "^6.3|^7.0", + "phpunit/phpunit": "^8.4|^9.1" }, "autoload": { "psr-4": {