Skip to content

Commit

Permalink
Update to support latest laravel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
BenCavens committed Jan 6, 2021
1 parent feb901b commit f8ee07b
Show file tree
Hide file tree
Showing 5 changed files with 310 additions and 148 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/codestyle.yml
@@ -0,0 +1,17 @@
name: codestyle
on:
push:
paths:
- '**.php'
- '.php_cs'
- '.github/workflows/codestyle.yml'
jobs:
codestyle:
runs-on: ubuntu-latest
steps:
- name: Code checkout
uses: actions/checkout@v2
- name: Fix style
uses: docker://oskarstark/php-cs-fixer-ga
with:
args: --config=.php_cs --allow-risky=yes
35 changes: 35 additions & 0 deletions .github/workflows/static-analysis.yml
@@ -0,0 +1,35 @@
# Trigger the workflow on push or pull request
name: static analysis
on:
push:
paths:
- '**.php'
- 'psalm.xml'
- '.github/workflows/static-analysis.yml'

jobs:
test:
runs-on: ubuntu-latest
name: Static analysis
steps:
- name: Checkout Code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Cache composer dependencies
uses: actions/cache@v1
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}

- name: Install dependencies
run: composer install -n --prefer-dist --no-suggest

- name: Run psalm
run: ./vendor/bin/psalm -c psalm.xml
40 changes: 40 additions & 0 deletions .github/workflows/testsuite.yml
@@ -0,0 +1,40 @@
# Trigger the workflow on push or pull request
name: testsuite
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [7.3,7.4]
laravel: [6.*,7.*,8.*]
stability: [prefer-stable, prefer-lowest]
include:
- laravel: 6.*
testbench: 4.*
- laravel: 7.*
testbench: 5.*
- laravel: 8.*
testbench: 6.*

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }}
steps:
- name: Checkout Code
uses: actions/checkout@v2

- 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
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest
- name: Run phpunit
run: vendor/bin/phpunit
6 changes: 3 additions & 3 deletions composer.json
Expand Up @@ -14,14 +14,14 @@
}
],
"require": {
"php" : ">=7.2",
"laravel/framework": "~7.0",
"php" : ">=7.3",
"laravel/framework": "~7.0|^8.0",
"thinktomorrow/url": "1.0.0"
},
"require-dev": {
"phpunit/phpunit" : "~8.5",
"mockery/mockery" : "~1.1",
"orchestra/testbench": "^5.0.0"
"orchestra/testbench": "^5.7|^6.0"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit f8ee07b

Please sign in to comment.