Skip to content

Commit

Permalink
Support for Laravel 9 (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalbaljet authored Feb 4, 2022
1 parent 5625119 commit 4cc9ab4
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 69 deletions.
81 changes: 43 additions & 38 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,46 @@ name: run-tests
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.1, 8.0, 7.4]
laravel: [8.*]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 8.*
testbench: 6.*

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

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, mysql, mysqli, pdo_mysql
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
- name: Execute tests
run: vendor/bin/phpunit
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.1, 8.0, 7.4]
laravel: [9.*, 8.*]
dependency-version: [prefer-lowest, prefer-stable]
exclude:
- laravel: 9.*
php: 7.4
include:
- laravel: 9.*
testbench: 7.*
- laravel: 8.*
testbench: 6.*

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

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, mysql, mysqli, pdo_mysql
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
- name: Execute tests
run: vendor/bin/phpunit
26 changes: 0 additions & 26 deletions .scrutinizer.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
This package allows you to seamlessly use the [Browser Kit features](https://github.com/laravel/browser-kit-testing) in more modern Laravel installations.

## Requirements
* Laravel 8.
* Laravel 8 or 9.
* PHP 7.4 or higher.
* Support for [Package Discovery](https://laravel.com/docs/5.5/packages#package-discovery).

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"require": {
"php": "^7.4 || ^8.0 || ^8.1",
"laravel/browser-kit-testing": "^6.0",
"illuminate/http": "^8.67",
"illuminate/support": "^8.67",
"symfony/dom-crawler": "^5.1.14"
"illuminate/http": "^8.67 || ^9.0",
"illuminate/support": "^8.67 || ^9.0",
"symfony/dom-crawler": "^5.1.14 || ^6.0"
},
"require-dev": {
"orchestra/testbench": "^6.23",
"orchestra/testbench": "^6.23 || ^7.0",
"phpunit/phpunit": "^9.4"
},
"license": "MIT",
Expand Down

0 comments on commit 4cc9ab4

Please sign in to comment.