From ce7ff68b1fb9eaaa2f778268540947796c7e25e3 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:48:33 -0500 Subject: [PATCH 1/9] update php-cs-fixer config & workflow --- .github/workflows/php-cs-fixer.yml | 4 ++-- .php_cs => .php-cs-fixer.dist.php | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) rename .php_cs => .php-cs-fixer.dist.php (85%) diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 5cb3a86..20504ad 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -8,12 +8,12 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Fix style uses: docker://oskarstark/php-cs-fixer-ga with: - args: --config=.php_cs --allow-risky=yes + args: --config=.php-cs-fixer.dist.php --allow-risky=yes - name: Extract branch name shell: bash diff --git a/.php_cs b/.php-cs-fixer.dist.php similarity index 85% rename from .php_cs rename to .php-cs-fixer.dist.php index 6b6c913..cc8470b 100644 --- a/.php_cs +++ b/.php-cs-fixer.dist.php @@ -3,7 +3,6 @@ $finder = Symfony\Component\Finder\Finder::create() ->notPath('bootstrap/*') ->notPath('storage/*') - ->notPath('storage/*') ->notPath('resources/view/mail/*') ->in([ __DIR__ . '/src', @@ -14,14 +13,14 @@ ->ignoreDotFiles(true) ->ignoreVCS(true); -return PhpCsFixer\Config::create() +return (new PhpCsFixer\Config) ->setRules([ '@PSR2' => true, 'array_syntax' => ['syntax' => 'short'], - 'ordered_imports' => ['sortAlgorithm' => 'alpha'], + 'ordered_imports' => ['sort_algorithm' => 'alpha'], 'no_unused_imports' => true, 'not_operator_with_successor_space' => true, - 'trailing_comma_in_multiline_array' => true, + 'trailing_comma_in_multiline' => true, 'phpdoc_scalar' => true, 'unary_operator_spaces' => true, 'binary_operator_spaces' => true, From 59d32348bf3ba38c84f1ae74a54ea925d5aec84e Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:48:44 -0500 Subject: [PATCH 2/9] add update changelog workflow --- .github/workflows/update-changelog.yml | 28 ++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/update-changelog.yml diff --git a/.github/workflows/update-changelog.yml b/.github/workflows/update-changelog.yml new file mode 100644 index 0000000..fa56639 --- /dev/null +++ b/.github/workflows/update-changelog.yml @@ -0,0 +1,28 @@ +name: "Update Changelog" + +on: + release: + types: [released] + +jobs: + update: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + with: + ref: main + + - name: Update Changelog + uses: stefanzweifel/changelog-updater-action@v1 + with: + latest-version: ${{ github.event.release.name }} + release-notes: ${{ github.event.release.body }} + + - name: Commit updated CHANGELOG + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: main + commit_message: Update CHANGELOG + file_pattern: CHANGELOG.md From c6705d07217c35eeeea982dced75ab310931d341 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:48:56 -0500 Subject: [PATCH 3/9] migrate to latest schema and add coverage --- phpunit.xml.dist | 57 +++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 7d48ef1..3171b24 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,25 +1,36 @@ - - - - tests/Unit - - - tests/Integration - - - - - src/ - - + + + + src/ + + + + + + + + + + tests/Unit + + + tests/Integration + + + + + From 8ec29b5135f0d9408e668ed0509d2fce104368eb Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:49:04 -0500 Subject: [PATCH 4/9] wip --- .github/FUNDING.yml | 1 + .gitignore | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 636ef53..fe5143b 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +1,2 @@ +github: spatie custom: https://spatie.be/open-source/support-us diff --git a/.gitignore b/.gitignore index 4a3bfd4..543c37a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,5 +2,5 @@ build composer.lock docs vendor -.php_cs.cache +*.cache phpunit.xml From 5139febc16cab04cf0a70807311b07ebff651dcd Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:49:15 -0500 Subject: [PATCH 5/9] bump dep versions --- composer.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/composer.json b/composer.json index ff47d8b..4101b73 100644 --- a/composer.json +++ b/composer.json @@ -28,12 +28,12 @@ } ], "require": { - "php" : "^7.2|^8.0", + "php": "^7.2|^8.0", "ext-json": "*", - "guzzlehttp/guzzle":"^6.5|^7.0" + "guzzlehttp/guzzle": "^6.5|^7.0" }, "require-dev": { - "phpunit/phpunit": "^8.5|^9.0" + "phpunit/phpunit": "^8.5|^9.4" }, "autoload": { "psr-4": { @@ -49,4 +49,4 @@ "test": "vendor/bin/phpunit", "format": "vendor/bin/php-cs-fixer fix --allow-risky=yes" } -} +} \ No newline at end of file From 61a9359b71a4236e43731efab0c327e8857445cc Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:49:31 -0500 Subject: [PATCH 6/9] add php 8.1 support, bump action versions --- .github/workflows/run-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index cb98d61..49d4c09 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,17 +9,17 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - php: [7.2, 7.3, 7.4, 8.0] + php: [8.1, 8.0, 7.4, 7.3, 7.2] dependency-version: [prefer-lowest, prefer-stable] name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 - name: Cache dependencies - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: ~/.composer/cache/files key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} From fe3ddb56a6dcb0bdc3df2fa8ad2d95441e92145f Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:56:27 -0500 Subject: [PATCH 7/9] wip --- .github/workflows/run-tests.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 49d4c09..7e25761 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,11 @@ jobs: os: [ubuntu-latest, windows-latest] php: [8.1, 8.0, 7.4, 7.3, 7.2] dependency-version: [prefer-lowest, prefer-stable] - + phpunit: [^8.5,9.*] + exclude: + - phpunit: ^8.5 + php: 8.1 + name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} steps: @@ -32,7 +36,9 @@ jobs: coverage: none - name: Install dependencies - run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + run: | + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest + composer install phpunit/${{ matrix.phpunit }} --prefer-dist --no-interaction --no-suggest - name: Execute tests run: vendor/bin/phpunit From 2dcabc72d5f969f396f027aae067e582729023a4 Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 21:59:04 -0500 Subject: [PATCH 8/9] wip --- .github/workflows/run-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 7e25761..82160a4 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -11,7 +11,7 @@ jobs: os: [ubuntu-latest, windows-latest] php: [8.1, 8.0, 7.4, 7.3, 7.2] dependency-version: [prefer-lowest, prefer-stable] - phpunit: [^8.5,9.*] + phpunit: [^8.5, 9.*] exclude: - phpunit: ^8.5 php: 8.1 @@ -37,8 +37,8 @@ jobs: - name: Install dependencies run: | - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest - composer install phpunit/${{ matrix.phpunit }} --prefer-dist --no-interaction --no-suggest + composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction + composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update - name: Execute tests run: vendor/bin/phpunit From 0c85fecee898b627e450be9af8e74bebabbb522b Mon Sep 17 00:00:00 2001 From: Patrick Organ Date: Sat, 27 Nov 2021 22:00:50 -0500 Subject: [PATCH 9/9] drop php 7.2 support --- .github/workflows/run-tests.yml | 10 ++-------- composer.json | 6 +++--- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 82160a4..2ebd070 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -9,12 +9,8 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, windows-latest] - php: [8.1, 8.0, 7.4, 7.3, 7.2] + php: [8.1, 8.0, 7.4, 7.3] dependency-version: [prefer-lowest, prefer-stable] - phpunit: [^8.5, 9.*] - exclude: - - phpunit: ^8.5 - php: 8.1 name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }} @@ -36,9 +32,7 @@ jobs: coverage: none - name: Install dependencies - run: | - composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - composer require "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction --no-update + run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit diff --git a/composer.json b/composer.json index 4101b73..bdbadaf 100644 --- a/composer.json +++ b/composer.json @@ -28,12 +28,12 @@ } ], "require": { - "php": "^7.2|^8.0", + "php": "^7.3|^8.0", "ext-json": "*", - "guzzlehttp/guzzle": "^6.5|^7.0" + "guzzlehttp/guzzle": "^7.0" }, "require-dev": { - "phpunit/phpunit": "^8.5|^9.4" + "phpunit/phpunit": "^9.4" }, "autoload": { "psr-4": {