From 8ef6b44b9a10392f9184e9d4b0bd366bbc8adbed Mon Sep 17 00:00:00 2001 From: Laravel Shift Date: Sun, 21 Apr 2024 09:50:34 -0400 Subject: [PATCH] Laravel 11.x compatibility & tests (#721) --- .github/workflows/test.yml | 35 ++++++++++++++++++++++------------- composer.json | 13 +++++++------ 2 files changed, 29 insertions(+), 19 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a1202972..9af7919d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,14 +9,23 @@ env: jobs: test: - name: "Build" + name: "Lara ${{ matrix.laravel }} PHP ${{ matrix.php }} Unit ${{ matrix.phpunit }}" runs-on: ubuntu-latest strategy: - max-parallel: 12 + max-parallel: 6 # 12 fail-fast: false matrix: - php: ['7.4', '8.0', '8.1', '8.2'] - package-release: [dist] + laravel: [9, 10, 11] + php: ['8.1', '8.2', '8.3'] + phpunit: [9, 10] + exclude: + - {laravel: 11, php: '8.1'} + - {laravel: 9, phpunit: 10} + - {phpunit: 9} + include: + - {laravel: 9, php: '8.1', phpunit: 9} + - {laravel: 9, php: '8.2', phpunit: 9} + - {laravel: 9, php: '8.3', phpunit: 9} steps: - name: Checkout repository uses: actions/checkout@v3 @@ -37,21 +46,21 @@ jobs: uses: actions/cache@v3 with: path: ${{ steps.composer-cache.outputs.dir }} - key: composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.package-release }}-${{ hashFiles('**/composer.json') }} + key: composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.json') }} restore-keys: | - composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.package-release }}-${{ env.cache-name }}- - composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.package-release }}- + composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }}-${{ env.cache-name }}- + composer-${{ runner.os }}-${{ matrix.php }}-${{ matrix.laravel }}- composer-${{ runner.os }}-${{ matrix.php }}- composer-${{ runner.os }}- - name: Install composer dependencies - run: composer install --no-progress --no-interaction --prefer-${{ matrix.package-release }} + run: composer require --no-progress --no-interaction illuminate/database:^${{ matrix.laravel }}.0 illuminate/validation:^${{ matrix.laravel }}.0 phpunit/phpunit:^${{ matrix.phpunit }}.0 - name: Run unit tests run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover - - name: Upload to Scrutinizer - continue-on-error: true - run: | - composer global require scrutinizer/ocular - ~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover + # - name: Upload to Scrutinizer + # continue-on-error: true + # run: | + # composer global require scrutinizer/ocular + # ~/.composer/vendor/bin/ocular code-coverage:upload --format=php-clover coverage.clover diff --git a/composer.json b/composer.json index 80d14d8e..013cc451 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "kris/laravel-form-builder", "description": "Laravel form builder - symfony like", - "keywords": ["laravel", "form", "builder","symfony"], + "keywords": ["laravel", "form", "builder", "symfony"], "license": "MIT", "authors": [ { @@ -10,13 +10,14 @@ } ], "require": { - "php": ">=7.4", - "laravelcollective/html": "^6", - "illuminate/database": "^6 || ^7 || ^8 || ^9 || ^10", - "illuminate/validation": "^6 || ^7 || ^8 || ^9 || ^10" + "php": "^8.0", + "rdx/laravelcollective-html": "^6", + "illuminate/database": "^6 || ^7 || ^8 || ^9 || ^10 || ^11", + "illuminate/validation": "^6 || ^7 || ^8 || ^9 || ^10 || ^11" }, "require-dev": { - "orchestra/testbench": "^6.13 || ^7.0 || ^8" + "orchestra/testbench": "^6.13 || ^7 || ^8 || ^9", + "phpunit/phpunit": "^10.0" }, "extra": { "branch-alias": {