Skip to content

Commit

Permalink
Laravel 11 support
Browse files Browse the repository at this point in the history
  • Loading branch information
WendellAdriel committed Mar 13, 2024
1 parent 87221db commit 9624701
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 42 deletions.
75 changes: 44 additions & 31 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,47 @@ name: run-tests
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.2, 8.1]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

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

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

- name: Install dependencies
run: |
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Code Style 👨‍🏭
run: composer test:lint

- name: Pest Tests 🧫
run: composer test:unit

- name: PHPStan 🧪
run: composer test:static
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php: [8.3, 8.2, 8.1]
laravel: [9.*, 10.*, 11.*]
dependency-version: [prefer-stable]
include:
- laravel: 9.*
testbench: 7.*
- laravel: 10.*
testbench: 8.*
- laravel: 11.*
testbench: 9.*
exclude:
- laravel: 11.*
php: 8.1

name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}

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

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

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nesbot/carbon:>=2.62.1" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Code Style 👨‍🏭
run: composer test:lint

- name: Pest Tests 🧫
run: composer test:unit

- name: PHPStan 🧪
run: composer test:static
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<p align="center">
<a href="https://packagist.org/packages/WendellAdriel/laravel-lift"><img src="https://img.shields.io/packagist/v/WendellAdriel/laravel-lift.svg?style=flat-square" alt="Packagist"></a>
<a href="https://packagist.org/packages/WendellAdriel/laravel-lift"><img src="https://img.shields.io/packagist/php-v/WendellAdriel/laravel-lift.svg?style=flat-square" alt="PHP from Packagist"></a>
<a href="https://packagist.org/packages/WendellAdriel/laravel-lift"><img src="https://img.shields.io/badge/Laravel-9.x,%2010.x-brightgreen.svg?style=flat-square" alt="Laravel Version"></a>
<a href="https://packagist.org/packages/WendellAdriel/laravel-lift"><img src="https://img.shields.io/badge/Laravel-9.x,%2010.x,%2011.x-brightgreen.svg?style=flat-square" alt="Laravel Version"></a>
<a href="https://github.com/WendellAdriel/laravel-lift/actions"><img alt="GitHub Workflow Status (main)" src="https://img.shields.io/github/actions/workflow/status/WendellAdriel/laravel-lift/tests.yml?branch=main&label=Tests"> </a>
</p>

Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@
],
"require": {
"php": "^8.1",
"illuminate/database": "^9.0|^10.0",
"illuminate/support": "^9.0|^10.0",
"illuminate/validation": "^9.0|^10.0"
"illuminate/database": "^9.0|^10.0|^11.0",
"illuminate/support": "^9.0|^10.0|^11.0",
"illuminate/validation": "^9.0|^10.0|^11.0"
},
"require-dev": {
"pestphp/pest": "^2.15",
"laravel/pint": "^1.11",
"phpstan/phpstan": "^1.10",
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^8.9",
"pestphp/pest-plugin-faker": "^2.0"
"larastan/larastan": "^2.0",
"laravel/pint": "^1.14",
"orchestra/testbench": "^7.0|^8.0|^9.0",
"pestphp/pest": "^1.20|^2.0",
"pestphp/pest-plugin-faker": "^1.0|^2.0",
"phpstan/phpstan": "^1.10"
},
"scripts": {
"lint": "pint",
Expand Down
2 changes: 1 addition & 1 deletion src/Console/Commands/LiftMigration.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ final class LiftMigration extends Command
protected $signature = 'lift:migration {model}
{--namespace=App\\Models\\}';

protected static $defaultName = 'lift:migration';
protected static string $defaultName = 'lift:migration';

protected $description = 'Create migration files based on Lift models';

Expand Down

0 comments on commit 9624701

Please sign in to comment.