Skip to content

Commit

Permalink
Merge pull request #100 from spatie/support-php8
Browse files Browse the repository at this point in the history
Support php8
  • Loading branch information
Nielsvanpach authored Nov 25, 2020
2 parents f9a56d2 + bfa38b9 commit c4c5e92
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 22 deletions.
File renamed without changes.
29 changes: 13 additions & 16 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ on: [push, pull_request]

jobs:
test:

runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
php: [7.4, 7.3]
laravel: [5.8.*, 6.*, 7.*, 8.*]
os: [ubuntu-latest]
php: [8.0, 7.4, 7.3]
laravel: [8.*, 7.*, 6.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
Expand All @@ -19,32 +19,29 @@ jobs:
testbench: 5.*
- laravel: 6.*
testbench: 4.*
- laravel: 5.8.*
testbench: 3.8.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ 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.dependency-version }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/phpunit
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed re

## Contributing

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
Please see [CONTRIBUTING](.github/CONTRIBUTING.md) for details.

## Security

Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@
],
"license": "MIT",
"require": {
"php": "^7.3",
"illuminate/database": "~5.8.0|^6.0|^7.0|^8.0",
"illuminate/support": "~5.8.0|^6.0|^7.0|^8.0"
"php": "^7.3|^8.0",
"illuminate/database": "^6.0|^7.0|^8.0",
"illuminate/support": "^6.0|^7.0|^8.0"
},
"require-dev": {
"phpunit/phpunit" : "^8.0|^9.0",
"orchestra/testbench": "~3.8.0|^4.0|^5.0|^6.0",
"friendsofphp/php-cs-fixer": "^2.16"
"orchestra/testbench": "^4.0|^5.0|^6.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit c4c5e92

Please sign in to comment.