From 1ea671c7fea1a1fbfb10e03b7e1d971d3c856143 Mon Sep 17 00:00:00 2001 From: Marcus Olsson Date: Tue, 8 Feb 2022 17:33:29 +0100 Subject: [PATCH] Laravel 9 support (#19) * Add Laravel 9 requirement * Remove scrutinizer test * Create test.yml * Fix directory name * Fix issue on older PHP-ver --- .github/workflows/test.yml | 45 ++++++++++++++++++++++++++++++++++++++ .scrutinizer.yml | 18 --------------- .travis.yml | 23 ------------------- README.md | 3 +-- composer.json | 5 +++-- 5 files changed, 49 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .scrutinizer.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d2c0a92 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,45 @@ +name: Laravel automated tests + +on: + push: + branches: ['master', 'feature/**'] + pull_request: + branches: ['master'] + +jobs: + php-tests: + runs-on: ubuntu-latest + + strategy: + matrix: + include: + - php: 8.1 + illuminate: ^9.0 + - php: 8.1 + illuminate: ^8.0 + - php: 8.0 + illuminate: ^8.0 + - php: 7.4 + illuminate: ^7.0 + - php: 7.3 + illuminate: ^7.0 + + name: PHP ${{ matrix.php }} - Illuminate ${{ matrix.illuminate }} + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + + - name: Update composer + run: composer self-update --2 + + - name: Install dependencies + run: composer require "illuminate/support:${{ matrix.illuminate }}" --no-interaction --no-progress --no-suggest + + - name: Execute tests + run: composer test diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index 1165e72..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,18 +0,0 @@ -filter: - excluded_paths: [tests/*] - -checks: - php: - remove_extra_empty_lines: true - remove_php_closing_tag: true - remove_trailing_whitespace: true - fix_use_statements: - remove_unused: true - preserve_multiple: false - preserve_blanklines: true - order_alphabetically: true - fix_php_opening_tag: true - fix_linefeed: true - fix_line_ending: true - fix_identation_4spaces: true - fix_doc_comments: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4a8b186..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -language: php - -sudo: false - -before_script: - - travis_retry composer self-update - - travis_retry composer require "illuminate/support:${ILLUMINATE_VERSION}" - -script: - - composer test - -matrix: - include: - - php: 7.3 - env: ILLUMINATE_VERSION=^6.0 - - php: 7.3 - env: ILLUMINATE_VERSION=^7.0 - - php: 7.3 - env: ILLUMINATE_VERSION=^8.0 - - php: 7.4 - env: ILLUMINATE_VERSION=^8.0 - - php: 8.0 - env: ILLUMINATE_VERSION=^8.0 diff --git a/README.md b/README.md index 5e57ddc..46849c4 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,7 @@ [![Latest Version on Packagist][ico-version]][link-packagist] [![Total downloads][ico-downloads]][link-packagist] [![Software License][ico-license]](LICENSE.md) -[![Build Status][ico-travis]][link-travis] -[![Scrutinizer Score][ico-scrutinizer]][link-scrutinizer] +[![Build Status](https://img.shields.io/github/workflow/status/olssonm/laravel-zxcvbn/Laravel%20automated%20tests?style=flat-square)](https://github.com/olssonm/ampersand/actions/workflows/test.yml) ![zxcvbn](https://user-images.githubusercontent.com/907114/41193108-747d9b50-6c08-11e8-8f9c-57874f52fa9b.png) diff --git a/composer.json b/composer.json index bfb6998..7a5e2ec 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ ], "require": { "php": "^7.3|^8.0", - "illuminate/support": "^6.0|^7.0|^8.0", + "illuminate/support": "^7.0|^8.0|^9.0", "bjeavons/zxcvbn-php": "^1.2" }, "require-dev": { @@ -51,5 +51,6 @@ ] } }, - "minimum-stability": "stable" + "minimum-stability": "dev", + "prefer-stable": true }