Skip to content

Commit

Permalink
wip (#31)
Browse files Browse the repository at this point in the history
* wip

* wip
  • Loading branch information
timacdonald authored Feb 17, 2023
1 parent 3588706 commit a82afdb
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 51 deletions.
102 changes: 51 additions & 51 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
lint:
Expand Down Expand Up @@ -55,52 +55,52 @@ jobs:
- name: PHPStan
run: ./vendor/bin/phpstan

tests:
runs-on: ubuntu-latest
name: 'PHP: ${{ matrix.php }}; Laravel: ${{ matrix.laravel }}; Prefer: ${{ matrix.prefer }}'
strategy:
matrix:
php: ['8.1', '8.2']
laravel: ['^9.0', '^10.0']
prefer: ['prefer-lowest', 'prefer-stable']
include:
- laravel: '^9.0'
testbench: '^7.0'
- laravel: '^10.0'
testbench: '^8.0'

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

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Support prefer-lowest in PHP 8.1
if: ${{ matrix.php == 8.1 && matrix.prefer == 'prefer-lowest' }}
run: composer require --no-update --no-scripts phpunit/phpunit:">=9.0" symfony/http-foundation:">=5.3.7" illuminate/http:">=8.62.0" nesbot/carbon:">=2.51.0"

- name: Install dependencies
run: |
composer require --no-update 'illuminate/support:${{ matrix.laravel }}' 'orchestra/testbench:${{ matrix.testbench }}'
composer update --${{ matrix.prefer }} --no-scripts
- name: Check platform requirements
run: composer check-platform-reqs

- name: Run tests
run: ./vendor/bin/phpunit
tests:
runs-on: ubuntu-latest
name: 'PHP: ${{ matrix.php }}; Laravel: ${{ matrix.laravel }}; Prefer: ${{ matrix.prefer }}'
strategy:
matrix:
php: ['8.1', '8.2']
laravel: ['^9.0', '^10.0']
prefer: ['prefer-lowest', 'prefer-stable']
include:
- laravel: '^9.0'
testbench: '^7.0'
- laravel: '^10.0'
testbench: '^8.0'

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

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- name: Support prefer-lowest in PHP 8.1
if: ${{ matrix.php == 8.1 && matrix.prefer == 'prefer-lowest' }}
run: composer require --no-update --no-scripts phpunit/phpunit:">=9.0" symfony/http-foundation:">=5.3.7" illuminate/http:">=8.62.0" nesbot/carbon:">=2.51.0"

- name: Install dependencies
run: |
composer require --no-update 'illuminate/support:${{ matrix.laravel }}' 'orchestra/testbench:${{ matrix.testbench }}'
composer update --${{ matrix.prefer }} --no-scripts
- name: Check platform requirements
run: composer check-platform-reqs

- name: Run tests
run: ./vendor/bin/phpunit
1 change: 1 addition & 0 deletions src/HasParameters.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace TiMacDonald\Middleware;



use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use ReflectionMethod;
Expand Down

0 comments on commit a82afdb

Please sign in to comment.