Skip to content

Commit ec00506

Browse files
authored
Merge pull request #23 from milwad-dev/support-laravel-11
[1.x] Support `Laravel 11`
2 parents 212da58 + 37be5d6 commit ec00506

File tree

3 files changed

+30
-15
lines changed

3 files changed

+30
-15
lines changed

.github/workflows/run-tests.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,51 @@ jobs:
88
strategy:
99
fail-fast: false
1010
matrix:
11-
php: [8.2, 8.1, 8.0]
12-
laravel: [10.*, 9.*]
11+
php: [8.0, 8.1, 8.2, 8.3]
12+
laravel: [9.*, 10.*, 11.*]
1313
dependency-version: [prefer-lowest, prefer-stable]
1414
include:
15+
- laravel: 11.*
16+
testbench: 9.*
17+
pest-plugin-laravel: 2.3.0
18+
1519
- laravel: 10.*
1620
testbench: 8.*
21+
pest-plugin-laravel: 2.0.0
22+
1723
- laravel: 9.*
1824
testbench: 7.*
25+
pest-plugin-laravel: 1.4.0
26+
1927
exclude:
28+
- laravel: 11.*
29+
php: 8.1
30+
31+
- laravel: 11.*
32+
php: 8.0
33+
2034
- laravel: 10.*
2135
php: 8.0
2236

37+
- laravel: 9.*
38+
php: 8.3
39+
2340
name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}
2441

2542
steps:
2643
- name: Checkout code
2744
uses: actions/checkout@v4
2845

29-
- name: Cache dependencies
30-
uses: actions/cache@v4
31-
with:
32-
path: ~/.composer/cache/files
33-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
34-
3546
- name: Setup PHP
3647
uses: shivammathur/setup-php@v2
3748
with:
3849
php-version: ${{ matrix.php }}
39-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
50+
extensions: curl, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, iconv
4051
coverage: none
4152

4253
- name: Install dependencies
4354
run: |
44-
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" --dev --no-interaction --no-update
55+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "pestphp/pest-plugin-laravel:${{ matrix.pest-plugin-laravel }}" --no-interaction --no-update
4556
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
4657
- name: Execute tests
4758
run: vendor/bin/pest

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"milwad",
66
"milwad-dev",
77
"laravel-attributes",
8+
"laravel attributes",
89
"easy attributes",
910
"laravel",
1011
"laravel attributes package"
@@ -15,18 +16,17 @@
1516
{
1617
"name": "milwad khosravi",
1718
"email": "[email protected]",
18-
"homepage": "https://milwad.ir",
19+
"homepage": "https://github.com/milwad-dev",
1920
"role": "Developer"
2021
}
2122
],
2223
"require": {
2324
"php": "^8.0",
24-
"illuminate/contracts": "9.*|10.*"
25+
"laravel/framework": "^9.0|^10.0|^11.0"
2526
},
2627
"require-dev": {
27-
"orchestra/testbench": "^7.0 || ^8.0",
28-
"pestphp/pest": "^1.0",
29-
"pestphp/pest-plugin-laravel": "^1.0"
28+
"pestphp/pest-plugin-laravel": "^1.4.0|^2.0.0",
29+
"orchestra/testbench": "^7.0|^8.0|^9.0"
3030
},
3131
"autoload": {
3232
"psr-4": {

tests/TestCase.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Milwad\LaravelAttributes\Tests;
44

5+
use Illuminate\Support\Facades\Artisan;
56
use Milwad\LaravelAttributes\LaravelAttributesServiceProvider;
67

78
abstract class TestCase extends \Orchestra\Testbench\TestCase
@@ -37,6 +38,9 @@ protected function getEnvironmentSetUp($app)
3738
protected function setUp(): void
3839
{
3940
parent::setUp();
41+
4042
$this->loadMigrationsFrom(__DIR__.'/SetUp/migrations');
43+
44+
Artisan::call('migrate');
4145
}
4246
}

0 commit comments

Comments
 (0)