From 21a1ead8da2615449d908ac8b07642b993e260fd Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:28:57 +0100 Subject: [PATCH 1/7] Update to support Laravel 5.7 --- .travis.yml | 3 +++ composer.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 41031c9..79be52c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,10 +5,13 @@ sudo: false php: - 7.1 - 7.2 + - 7.3 + - 7.4 env: matrix: - LARAVEL_VERSION=5.6.* + - LARAVEL_VERSION=5.7.* before_install: - composer self-update --stable -n diff --git a/composer.json b/composer.json index d0d9a46..bc91502 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "laravel/framework": "5.6.*" + "laravel/framework": "5.6.*|5.7.*" }, "require-dev": { "graham-campbell/testbench": "^5.0", From 9fb70a6f1d6e600ad19ee0ca639694c9c00c90d5 Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:34:09 +0100 Subject: [PATCH 2/7] Add github based tests --- .github/workflows/test.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..c663ee3 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,22 @@ +name: Run Tests + +on: push + +jobs: + phpunit: + runs-on: ubuntu-latest + strategy: + matrix: + php: [7.3, 7.4] + laravel: [5.7.*, 5.8.*] + steps: + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - run: composer self-update --stable -n + - run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update -n + - run: composer install --no-suggest --prefer-dist -n -o + + - run: vendor/bin/phpunit From 02dee02218fb3892dc096a0d3ae136a4aba75c9e Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:39:44 +0100 Subject: [PATCH 3/7] Composer not installing dev dependencies? --- .github/workflows/test.yaml | 5 +++-- .styleci.yml | 1 - .travis.yml | 30 ------------------------------ 3 files changed, 3 insertions(+), 33 deletions(-) delete mode 100644 .styleci.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index c663ee3..992c284 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -6,6 +6,7 @@ jobs: phpunit: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: php: [7.3, 7.4] laravel: [5.7.*, 5.8.*] @@ -15,8 +16,8 @@ jobs: with: php-version: ${{ matrix.php }} - - run: composer self-update --stable -n - run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update -n - - run: composer install --no-suggest --prefer-dist -n -o + - run: cat composer.json + - run: composer install --prefer-dist -n - run: vendor/bin/phpunit diff --git a/.styleci.yml b/.styleci.yml deleted file mode 100644 index 0285f17..0000000 --- a/.styleci.yml +++ /dev/null @@ -1 +0,0 @@ -preset: laravel diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 79be52c..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: php - -sudo: false - -php: - - 7.1 - - 7.2 - - 7.3 - - 7.4 - -env: - matrix: - - LARAVEL_VERSION=5.6.* - - LARAVEL_VERSION=5.7.* - -before_install: - - composer self-update --stable -n - - composer require "laravel/framework:${LARAVEL_VERSION}" --no-update -n - -install: travis_retry composer install --no-suggest --prefer-dist -n -o - -script: vendor/bin/phpunit --coverage-clover ./clover.xml - -after_success: -# Code coverage report - - bash <(curl -s https://codecov.io/bash) - -branches: - only: - - master From a6f0c58d410ee52e29a59bf91e65f107b659dcfe Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:42:18 +0100 Subject: [PATCH 4/7] Check out the repository... --- .github/workflows/test.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 992c284..559854a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -11,6 +11,8 @@ jobs: php: [7.3, 7.4] laravel: [5.7.*, 5.8.*] steps: + - uses: actions/checkout@v3 + - name: Setup PHP uses: shivammathur/setup-php@v2 with: From 9158baf6fe4cf29f1d67ced117330dcd23e2f1f4 Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:44:14 +0100 Subject: [PATCH 5/7] Disallow plugins --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index bc91502..d2434f6 100644 --- a/composer.json +++ b/composer.json @@ -32,5 +32,8 @@ "RickSelby\\LaravelRequestFieldTypes\\RequestFieldTypesServiceProvider" ] } + }, + "config": { + "allow-plugins": false } } From cc384d8ffa979633abbf9ccbef66f3b7d2e95aad Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:54:06 +0100 Subject: [PATCH 6/7] Fix getServiceProviderClass declaration --- tests/AbstractTestCase.php | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/AbstractTestCase.php b/tests/AbstractTestCase.php index ee59131..2f2a64e 100644 --- a/tests/AbstractTestCase.php +++ b/tests/AbstractTestCase.php @@ -7,14 +7,7 @@ abstract class AbstractTestCase extends AbstractPackageTestCase { - /** - * Get the service provider class. - * - * @param \Illuminate\Contracts\Foundation\Application $app - * - * @return string - */ - protected function getServiceProviderClass($app) + protected function getServiceProviderClass() { return RequestFieldTypesServiceProvider::class; } From 79bdea96b24af2eca224be43e19fee9fa3d65a63 Mon Sep 17 00:00:00 2001 From: Rick Selby Date: Thu, 6 Oct 2022 11:58:49 +0100 Subject: [PATCH 7/7] Tidy up test workflow --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 559854a..657ca69 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,6 @@ jobs: php-version: ${{ matrix.php }} - run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update -n - - run: cat composer.json - run: composer install --prefer-dist -n - run: vendor/bin/phpunit