From 75e3399709c43a7594b89e725229ebbf45bca68e Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 19 Nov 2020 14:46:24 +0100 Subject: [PATCH 1/4] allow php 8 --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 .github/workflows/php-cs-fixer.yml | 16 ++++-------- .github/workflows/run-tests.yml | 29 +++++++++++----------- README.md | 2 +- composer.json | 2 +- 5 files changed, 21 insertions(+), 28 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/.github/workflows/php-cs-fixer.yml b/.github/workflows/php-cs-fixer.yml index 5cb3a86..c402e34 100644 --- a/.github/workflows/php-cs-fixer.yml +++ b/.github/workflows/php-cs-fixer.yml @@ -8,22 +8,16 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v1 + uses: actions/checkout@v2 + with: + ref: ${{ github.head_ref }} - - name: Fix style + - name: Run PHP CS Fixer uses: docker://oskarstark/php-cs-fixer-ga with: args: --config=.php_cs --allow-risky=yes - - name: Extract branch name - shell: bash - run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})" - id: extract_branch - - name: Commit changes - uses: stefanzweifel/git-auto-commit-action@v2.3.0 + uses: stefanzweifel/git-auto-commit-action@v4 with: commit_message: Fix styling - branch: ${{ steps.extract_branch.outputs.branch }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5cb5982..e239614 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -4,14 +4,14 @@ on: [push, pull_request] jobs: test: - - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: fail-fast: true matrix: - php: [7.4] - laravel: [5.8.*, 6.*, 7.*, 8.*] - dependency-version: [prefer-lowest, prefer-stable] + os: [ubuntu-latest] + php: [8.0, 7.4] + laravel: [8.*, 7.*, 6.*, 5.8.*] + stability: [prefer-lowest, prefer-stable] include: - laravel: 8.* testbench: 6.* @@ -22,29 +22,28 @@ jobs: - laravel: 5.8.* testbench: 3.8.* - name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} + name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} steps: - name: Checkout code - uses: actions/checkout@v1 - - - name: Cache dependencies - uses: actions/cache@v1 - with: - path: ~/.composer/cache/files - key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} + uses: actions/checkout@v2 - name: Setup PHP - uses: shivammathur/setup-php@v1 + uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick coverage: none + - name: Setup problem matchers + run: | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Install dependencies run: | 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 + composer update --${{ matrix.stability }} --prefer-dist --no-interaction - name: Execute tests run: vendor/bin/phpunit diff --git a/README.md b/README.md index 5dd0d13..da31111 100644 --- a/README.md +++ b/README.md @@ -310,7 +310,7 @@ composer test ## Contributing -Please see [CONTRIBUTING](CONTRIBUTING.md) for details. +Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details. ## Security diff --git a/composer.json b/composer.json index 8e731c3..9158183 100644 --- a/composer.json +++ b/composer.json @@ -32,7 +32,7 @@ } ], "require": { - "php" : "^7.2", + "php" : "^7.2|^8.0", "illuminate/database": "~5.8.0|^6.0|^7.0|^8.0", "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0" }, From 3ea783245e17a7fbb58fc98d4aeb3778daf1ce65 Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 19 Nov 2020 14:51:08 +0100 Subject: [PATCH 2/4] remove php_cs from require dev --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9158183..fa46c77 100644 --- a/composer.json +++ b/composer.json @@ -37,8 +37,7 @@ "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "mockery/mockery": "^1.3", + "mockery/mockery": "^1.4", "orchestra/testbench": "~3.8.0|^4.0|^5.0|^6.0" }, "autoload": { From 1296bddf3943c17b5112f2aca36b077434453577 Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 19 Nov 2020 14:53:49 +0100 Subject: [PATCH 3/4] remove support on L5.8 --- .github/workflows/run-tests.yml | 4 +--- composer.json | 6 +++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e239614..7a23cc3 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -10,7 +10,7 @@ jobs: matrix: os: [ubuntu-latest] php: [8.0, 7.4] - laravel: [8.*, 7.*, 6.*, 5.8.*] + laravel: [8.*, 7.*, 6.*] stability: [prefer-lowest, prefer-stable] include: - laravel: 8.* @@ -19,8 +19,6 @@ jobs: testbench: 5.* - laravel: 6.* testbench: 4.* - - laravel: 5.8.* - testbench: 3.8.* name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }} diff --git a/composer.json b/composer.json index fa46c77..5250a8b 100644 --- a/composer.json +++ b/composer.json @@ -33,12 +33,12 @@ ], "require": { "php" : "^7.2|^8.0", - "illuminate/database": "~5.8.0|^6.0|^7.0|^8.0", - "illuminate/support": "~5.8.0|^6.0|^7.0|^8.0" + "illuminate/database": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0" }, "require-dev": { "mockery/mockery": "^1.4", - "orchestra/testbench": "~3.8.0|^4.0|^5.0|^6.0" + "orchestra/testbench": "^4.0|^5.0|^6.0" }, "autoload": { "psr-4": { From cc10294b665a570456aeb552fe42b5ac6fbadcdb Mon Sep 17 00:00:00 2001 From: Niels Date: Thu, 19 Nov 2020 14:57:55 +0100 Subject: [PATCH 4/4] Update CHANGELOG.md --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f9d575..e4b3da5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `laravel-translatable` will be documented in this file +## 4.6.0 - 2020-11-19 + +- add support for PHP 8.0 (#241) +- drop support for Laravel 5.8 (#241) + ## 4.5.2 - 2020-10-22 - revert #235