Skip to content

Commit c4308f3

Browse files
authored
add support to laravel 11 (#5)
1 parent 526302a commit c4308f3

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

.github/workflows/analyse.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- name: Setup PHP
1818
uses: shivammathur/setup-php@v2
1919
with:
20-
php-version: 8.1
20+
php-version: 8.2
2121

2222
- name: Get Composer Cache Directory
2323
id: composer-cache

.github/workflows/style.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- name: Setup PHP
1616
uses: shivammathur/setup-php@v2
1717
with:
18-
php-version: 8.1
18+
php-version: 8.2
1919

2020
- name: Get Composer Cache Directory
2121
id: composer-cache

.github/workflows/tests.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,15 @@ jobs:
1313

1414
strategy:
1515
matrix:
16-
php-versions: ['8.1', '8.2']
16+
php: ['8.2', '8.3']
17+
laravel: ['10.*', '11.*']
18+
include:
19+
- laravel: 10.*
20+
testbench: 8.*
21+
- laravel: 11.*
22+
testbench: 9.*
23+
24+
name: P${{ matrix.php }} - L${{ matrix.laravel }}
1725

1826
steps:
1927
- uses: actions/checkout@v2
@@ -39,15 +47,15 @@ jobs:
3947
- uses: actions/cache@v3
4048
with:
4149
path: ${{ steps.composer-cache.outputs.dir }}
42-
key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.lock') }}
50+
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }}
4351
restore-keys: |
44-
${{ runner.os }}-composer-${{ matrix.php-versions }}
52+
${{ runner.os }}-composer-${{ matrix.php }}-${{ matrix.laravel }}
4553
4654
- name: Install dependencies
4755
if: steps.composer-cache.outputs.cache-hit != 'true'
4856
run: |
49-
composer install
50-
composer dump
57+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
58+
composer update --prefer-stable --prefer-dist
5159
5260
- name: Run test phpunit
5361
run: vendor/bin/phpunit

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,16 @@
1010
}
1111
],
1212
"require": {
13-
"php": "^8.1",
14-
"laravel/framework": "^10.0",
15-
"laravel/sanctum": "^3.3"
13+
"php": "^8.2",
14+
"laravel/framework": "10.*",
15+
"laravel/sanctum": "^3.3|^4.0",
16+
"orchestra/testbench": "8.*"
1617
},
1718
"require-dev": {
1819
"friendsofphp/php-cs-fixer": "^3.4",
1920
"nunomaduro/larastan": "^2.0",
20-
"orchestra/testbench": "^8.10",
2121
"phpstan/phpstan": "^1.2",
22-
"phpunit/phpunit": "^9.3"
22+
"phpunit/phpunit": "^9.3|^10.5"
2323
},
2424
"autoload": {
2525
"psr-4": {

tests/TestCase.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,7 @@ protected function getEnvironmentSetUp($app)
5353
]);
5454

5555
$app['config']->set('auth.providers.users.model', User::class);
56+
57+
$app['config']->set('session.driver', 'array');
5658
}
5759
}

0 commit comments

Comments
 (0)