Skip to content

Commit

Permalink
Merge pull request #15 from truckspace/feature/php-8-support-ch130
Browse files Browse the repository at this point in the history
Add support for PHP 8 and older versions of Laravel
  • Loading branch information
Mwikala Kangwa authored Jan 25, 2021
2 parents c993f5a + 41496f0 commit c57f165
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 23 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,41 +4,32 @@ on: [push, pull_request]

jobs:
test:
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

strategy:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.4]
laravel: [8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*
php: [ 7.3, 7.4, 8.0 ]
laravel: [ ^6.0, ^7.0, ^8.0 ]

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
name: P${{ matrix.php }} - L${{ matrix.laravel }}

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
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
extensions: dom, curl, libxml, mbstring, zip
tools: composer:v2
coverage: none

- 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 require "illuminate/contracts=${{ matrix.laravel }}" --no-update
composer update --prefer-dist --no-interaction --no-progress
- name: Execute tests
run: |
Expand Down
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
}
],
"require": {
"php": "^7.4",
"ext-json": "*",
"php": "^7.3|^8.0",
"fakerphp/faker": "^1.9",
"illuminate/support": "^8.7",
"illuminate/support": "^6.0|^7.0|^8.0",
"laravel/socialite": "^5.0"
},
"require-dev": {
"orchestra/testbench": "^6.0",
"phpunit/phpunit": "^9.3.3",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"phpunit/phpunit": "^8.0|^9.3",
"squizlabs/php_codesniffer": "^3.5"
},
"autoload": {
Expand Down

0 comments on commit c57f165

Please sign in to comment.