Skip to content

Commit

Permalink
PHP 8.0 support
Browse files Browse the repository at this point in the history
  • Loading branch information
PhiloNL committed Jan 24, 2021
1 parent 3d98692 commit bca5bb6
Show file tree
Hide file tree
Showing 5 changed files with 235 additions and 182 deletions.
43 changes: 24 additions & 19 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,39 @@ on:
branches: [ master ]

jobs:
build:

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: [ '7.3', '7.4', '8.0' ]
laravel: [ 8.*, 7.* ]
phpunit-versions: [ 'latest' ]
include:
- laravel: 8.*
testbench: 6.*
- laravel: 7.*
testbench: 5.*

name: PHP ${{ matrix.php-versions }} - Laravel ${{ matrix.laravel }}

steps:
- uses: actions/checkout@v2

- name: Validate composer.json and composer.lock
run: composer validate
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: mbstring, intl

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
php-version: ${{ matrix.php-versions }}
extensions: mbstring, ctype, fileinfo, openssl, PDO, bcmath, json, tokenizer, xml
tools: phpunit:${{ matrix.phpunit-versions }}
coverage: none

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer install --prefer-dist --no-progress --no-suggest
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --prefer-stable --prefer-dist --no-interaction --no-suggest
- name: Run test suite
run: composer run-script test
run: composer run-script test
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@
}
],
"require": {
"php": "^7.2.5",
"php": "^7.3.0|^8.0",
"sensiolabs/ansi-to-html": "^1.2"
},
"require-dev": {
"orchestra/testbench": "^5.3",
"orchestra/testbench": "^v5.14.0|^v6.9.0",
"phpunit/phpunit": "^9.2"
},
"autoload": {
Expand Down
Loading

0 comments on commit bca5bb6

Please sign in to comment.