Skip to content

Commit 3895ea1

Browse files
authored
Laravel 12 (#59)
* v1 * wip * wip * 8.3
1 parent 72578be commit 3895ea1

File tree

5 files changed

+66
-134
lines changed

5 files changed

+66
-134
lines changed

.github/workflows/main.yml

Lines changed: 60 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,65 @@
11
name: run-tests
22

33
on:
4-
push:
5-
branches: [master]
6-
pull_request:
7-
branches: [master]
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
810

911
jobs:
10-
test:
11-
runs-on: ${{ matrix.os }}
12-
strategy:
13-
fail-fast: true
14-
matrix:
15-
os: [ubuntu-latest]
16-
php: [8.1, 8.2]
17-
laravel: [9.*, 10.*,11.*]
18-
stability: [prefer-stable]
19-
include:
20-
- laravel: 9.*
21-
testbench: ^7.0
22-
- laravel: 10.*
23-
testbench: ^8.0
24-
- laravel: 11.*
25-
testbench: ^9.0
26-
exclude:
27-
- laravel: 11.*
28-
php: 8.1
29-
- laravel: 10.*
30-
php: 8.0
31-
- laravel: 9.*
32-
php: 7.4
33-
34-
name: PHP${{ matrix.php }} - LARAVEL${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
35-
36-
steps:
37-
- name: Checkout code
38-
uses: actions/checkout@v3
39-
40-
- name: Setup PHP
41-
uses: shivammathur/setup-php@v2
42-
with:
43-
php-version: ${{ matrix.php }}
44-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
45-
coverage: none
46-
47-
- name: Setup problem matchers
48-
run: |
49-
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
50-
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
51-
52-
- name: Install dependencies
53-
run: |
54-
composer require "laravel/framework:${{ matrix.laravel }}" "nesbot/carbon:^2.63" "ramsey/collection:^1.2.2" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
55-
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
56-
57-
- name: Execute tests
58-
run: vendor/bin/phpunit
12+
test:
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
fail-fast: true
17+
matrix:
18+
os: [ubuntu-latest]
19+
php: [8.1, 8.2, 8.3]
20+
laravel: ['9.*', '10.*', '11.*', '12.*']
21+
stability: [prefer-stable]
22+
include:
23+
- laravel: 9.*
24+
testbench: ^7.0
25+
- laravel: 10.*
26+
testbench: ^8.0
27+
- laravel: 11.*
28+
testbench: ^9.0
29+
- laravel: 12.*
30+
testbench: ^10.0
31+
exclude:
32+
- laravel: 11.*
33+
php: 8.1
34+
- laravel: 10.*
35+
php: 8.0
36+
- laravel: 9.*
37+
php: 7.4
38+
- laravel: 12.*
39+
php: 8.1
40+
41+
name: PHP${{ matrix.php }} - LARAVEL${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}
42+
43+
steps:
44+
- name: Checkout code
45+
uses: actions/checkout@v3
46+
47+
- name: Setup PHP
48+
uses: shivammathur/setup-php@v2
49+
with:
50+
php-version: ${{ matrix.php }}
51+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
52+
coverage: none
53+
54+
- name: Setup problem matchers
55+
run: |
56+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
57+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
58+
59+
- name: Install dependencies
60+
run: |
61+
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
62+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
63+
64+
- name: Execute tests
65+
run: vendor/bin/phpunit

composer.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"require": {
1919
"php": "^8.1|^8.2",
2020
"gajus/dindent": "^2.0.2",
21-
"illuminate/support": "^9.43|^v10.0.0|^11.0"
21+
"illuminate/support": "^9.43|^v10.0.0|^11.0|^12.0",
22+
"nesbot/carbon": "^2.63|^3.0",
23+
"ramsey/collection": "^1.2.2|^2.0"
2224
},
2325
"require-dev": {
2426
"orchestra/testbench": "^6.0|^7.0|^8.0|^9.0|^10.0|^11.0",
@@ -40,13 +42,12 @@
4042
"scripts": {
4143
"test": "vendor/bin/phpunit",
4244
"test-coverage": "vendor/bin/phpunit --coverage-html coverage"
43-
4445
},
4546
"config": {
4647
"sort-packages": true
4748
},
4849
"minimum-stability": "dev",
49-
"prefer-stable" : true,
50+
"prefer-stable": true,
5051
"extra": {
5152
"laravel": {
5253
"providers": [

tests/InteractsWithViews.php

Lines changed: 0 additions & 76 deletions
This file was deleted.

tests/Unit/GoogleMapsTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Tests\Unit;
66

7-
use Tests\InteractsWithViews;
7+
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
88
use Tests\TestCase;
99

1010
final class GoogleMapsTest extends TestCase

tests/Unit/LeafletTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace Tests\Unit;
66

7-
use Tests\InteractsWithViews;
7+
use Illuminate\Foundation\Testing\Concerns\InteractsWithViews;
88
use Tests\TestCase;
99

1010
final class LeafletTest extends TestCase

0 commit comments

Comments
 (0)