diff --git a/.github/workflows/composer-normalize.yml b/.github/workflows/composer-normalize.yml new file mode 100644 index 0000000..560c42b --- /dev/null +++ b/.github/workflows/composer-normalize.yml @@ -0,0 +1,22 @@ +name: normalize composer.json + +on: + push: + paths: + - 'composer.json' + +jobs: + normalize: + runs-on: ubuntu-latest + steps: + - name: Git checkout + uses: actions/checkout@v2 + + - name: normalize composer.json + run: | + composer global require ergebnis/composer-normalize + composer normalize + + - uses: stefanzweifel/git-auto-commit-action@v4.0.0 + with: + commit_message: normalize composer.json diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ed57201..777d838 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,8 +10,13 @@ jobs: matrix: os: [ubuntu-latest] php: [7.4] - laravel: [6.*] + laravel: [7.*, 6.*] dependency-version: [prefer-lowest, prefer-stable] + include: + - laravel: 7.* + testbench: 5.* + - laravel: 6.* + testbench: 4.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} @@ -34,7 +39,7 @@ jobs: - name: Install dependencies run: | - composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update + composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - name: phpunit diff --git a/.gitignore b/.gitignore index 2178feb..fbd55c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /vendor/ +/vendor-bin/**/vendor /composer.lock /phpunit.xml \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 3883c8f..29a366c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to this package will be documented in this file. +## v0.6.0 + +* add Laravel 7 support + ## v0.5.0 * upgrade `astrotomic/laravel-guzzle` to v2.0.0 diff --git a/composer.json b/composer.json index bfc149a..54eed94 100644 --- a/composer.json +++ b/composer.json @@ -19,16 +19,24 @@ ], "require": { "php": "^7.4", - "astrotomic/laravel-guzzle": "^2.0", - "illuminate/cache": "^6.0", - "illuminate/support": "^6.0" + "astrotomic/laravel-guzzle": "^2.1", + "illuminate/cache": "^6.0 || ^7.0", + "illuminate/support": "^6.0 || ^7.0" }, "require-dev": { - "codedungeon/phpunit-result-printer": "^0.26.2", - "elbgoods/ci-test-tools": "^1.5.1", - "nunomaduro/collision": "^3.0", - "orchestra/testbench": "^4.0", - "phpunit/phpunit": "^8.0" + "bamarni/composer-bin-plugin": "^1.3", + "orchestra/testbench": "^4.0 || ^5.0", + "phpunit/phpunit": "^8.0 || ^9.0" + }, + "config": { + "sort-packages": true + }, + "extra": { + "laravel": { + "providers": [ + "Elbgoods\\TrashmailRule\\TrashmailRuleServiceProvider" + ] + } }, "autoload": { "psr-4": { @@ -40,14 +48,14 @@ "Elbgoods\\TrashmailRule\\Tests\\": "tests" } }, - "config": { - "sort-packages": true - }, - "extra": { - "laravel": { - "providers": [ - "Elbgoods\\TrashmailRule\\TrashmailRuleServiceProvider" - ] - } + "minimum-stability": "dev", + "prefer-stable": true, + "scripts": { + "post-install-cmd": [ + "@composer bin all install --ansi" + ], + "post-update-cmd": [ + "@composer bin all update --ansi" + ] } } diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 97496f0..bd9094b 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,6 @@ includes: - - ./vendor/nunomaduro/larastan/extension.neon - - ./vendor/elbgoods/ci-test-tools/configs/phpstan.neon.dist + - ./vendor-bin/elbgoods/vendor/nunomaduro/larastan/extension.neon + - ./vendor-bin/elbgoods/vendor/elbgoods/ci-test-tools/configs/phpstan.neon.dist parameters: paths: diff --git a/phpunit.xml.dist b/phpunit.xml.dist index f4bb52d..6193f8e 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -10,7 +10,6 @@ convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" - printerClass="Codedungeon\PHPUnitPrettyResultPrinter\Printer" > @@ -22,9 +21,6 @@ ./src - - - diff --git a/vendor-bin/elbgoods/composer.json b/vendor-bin/elbgoods/composer.json new file mode 100644 index 0000000..f872671 --- /dev/null +++ b/vendor-bin/elbgoods/composer.json @@ -0,0 +1,5 @@ +{ + "require-dev": { + "elbgoods/ci-test-tools": "^1.7" + } +}