Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Laravel 11.x Compatibility #64

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 62 additions & 58 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,71 +1,75 @@
name: Tests

on:
push:
pull_request:
branches: [main]
schedule:
- cron: '0 0 * * *'
push:
pull_request:
branches:
- main
schedule:
- cron: '0 0 * * *'

jobs:
test:
if: github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1]
laravel: [9.*, 10.*]
dependencies: [lowest, stable]
include:
- laravel: 9.*
testbench: ^7.0
- laravel: 10.*
testbench: ^8.0
- php: 8.3
dependencies: lowest
carbon: ^2.62.1
- php: 8.2
dependencies: lowest
carbon: ^2.62.1
test:
if: "github.event_name != 'schedule' || github.repository == 'ylsideas/feature-flags'"

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }}
runs-on: ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v2
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.3, 8.2, 8.1]
laravel: ['9.*', '10.*', '11.*']
dependencies: [lowest, stable]
include:
- laravel: 9.*
testbench: ^7.0
- laravel: 10.*
testbench: ^8.0
- php: 8.3
dependencies: lowest
carbon: ^2.62.1
- php: 8.2
dependencies: lowest
carbon: ^2.62.1
- laravel: 11.*
testbench: ^9.0
exclude:
- laravel: 11.*
php: 8.1

- 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, fileinfo
coverage: none
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependencies }} - ${{ matrix.os }}

- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Require Laravel Version
run: >
composer require
"laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}"
--no-interaction --no-update
- 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, fileinfo
coverage: none

- name: Require Minimum Packages for version
if: ${{ (matrix.php == '8.2' || matrix.php == '8.3') && matrix.dependencies == 'lowest' }}
run: >
composer require
"nesbot/carbon:${{ matrix.carbon }}"
--no-interaction --no-update
- name: Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}
- name: Require Laravel Version
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update

- name: Execute tests
run: vendor/bin/pest
- name: Require Minimum Packages for version
if: "${{ (matrix.php == '8.2' || matrix.php == '8.3') && matrix.dependencies == 'lowest' }}"
run: |
composer require "nesbot/carbon:${{ matrix.carbon }}" --no-interaction --no-update

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
dependency-versions: ${{ matrix.dependencies }}
composer-options: ${{ matrix.composer-options }}

- name: Execute tests
run: vendor/bin/pest
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@
],
"require": {
"php": "^8.1",
"illuminate/contracts": "10.*|^9.6"
"illuminate/contracts": "10.*|^9.6|^11.0"
},
"require-dev": {
"laravel/pint": "^1.2",
"nunomaduro/collision": "^6.0|^5.0",
"nunomaduro/collision": "^6.0|^5.0|^8.0",
"nunomaduro/larastan": "^2.0|^1.0",
"orchestra/testbench": "^8.0|^7.0",
"pestphp/pest": "^1.21",
"pestphp/pest-plugin-laravel": "^1.1",
"orchestra/testbench": "^8.0|^7.0|^9.0",
"pestphp/pest": "^1.21|^2.34",
"pestphp/pest-plugin-laravel": "^1.1|^2.3",
"phpstan/extension-installer": "^1.1",
"phpstan/phpdoc-parser": "^1.15",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "^1.0",
"phpunit/phpunit": "^9.5.13",
"rector/rector": "^0.14.2",
"phpunit/phpunit": "^9.5.13|^10.5",
"rector/rector": "^0.14.2|^1.0",
"spatie/laravel-ray": "^1.26"
},
"autoload": {
Expand Down
Loading