Skip to content

Commit 6bf5a8f

Browse files
authored
Support Laravel 11 (#436)
* Update composer.json * Tweak testsuite * Tweak testsuite * Tweak testsuite * Tweak testsuite
1 parent c32d507 commit 6bf5a8f

File tree

4 files changed

+20
-83
lines changed

4 files changed

+20
-83
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -11,33 +11,11 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
matrix:
14-
php: [ '7.2', '7.3', '7.4', '8.0', '8.1', '8.2' ]
15-
laravel: [ '6', '7', '8', '9', '10' ]
14+
php: [ '8.1', '8.2', '8.3']
15+
laravel: [ '9', '10', '11' ]
1616
exclude:
17-
- php: '7.2'
18-
laravel: '8'
19-
- php: '7.2'
20-
laravel: '9'
21-
- php: '7.3'
22-
laravel: '9'
23-
- php: '7.4'
24-
laravel: '9'
25-
- php: '8.1'
26-
laravel: '6'
27-
- php: '8.1'
28-
laravel: '7'
29-
- php: '8.2'
30-
laravel: '6'
31-
- php: '8.2'
32-
laravel: '7'
33-
- php: '7.2'
34-
laravel: '10'
35-
- php: '7.3'
36-
laravel: '10'
37-
- php: '7.4'
38-
laravel: '10'
39-
- php: '8.0'
40-
laravel: '10'
17+
- laravel: 11
18+
php: 8.1
4119

4220
name: PHP ${{ matrix.php }}; Laravel ${{ matrix.laravel }}
4321

@@ -55,30 +33,6 @@ jobs:
5533
- name: Setup Problem Matchers
5634
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
5735

58-
- name: Select Laravel 6
59-
uses: nick-invision/retry@v1
60-
with:
61-
timeout_minutes: 5
62-
max_attempts: 5
63-
command: composer require "laravel/framework:6.*" "phpunit/phpunit:^8.5.8|^9.3.7" --no-update --no-interaction
64-
if: "matrix.laravel == '6'"
65-
66-
- name: Select Laravel 7
67-
uses: nick-invision/retry@v1
68-
with:
69-
timeout_minutes: 5
70-
max_attempts: 5
71-
command: composer require "laravel/framework:7.*" "phpunit/phpunit:^8.5.8|^9.3.7" --no-update --no-interaction
72-
if: "matrix.laravel == '7'"
73-
74-
- name: Select Laravel 8
75-
uses: nick-invision/retry@v1
76-
with:
77-
timeout_minutes: 5
78-
max_attempts: 5
79-
command: composer require "laravel/framework:8.*" "phpunit/phpunit:^9.3.7" --no-update --no-interaction
80-
if: "matrix.laravel == '8'"
81-
8236
- name: Select Laravel 9
8337
uses: nick-invision/retry@v1
8438
with:
@@ -95,6 +49,14 @@ jobs:
9549
command: composer require "laravel/framework:10.*" "phpunit/phpunit:^9.3.7" --no-update --no-interaction
9650
if: "matrix.laravel == '10'"
9751

52+
- name: Select Laravel 11
53+
uses: nick-invision/retry@v1
54+
with:
55+
timeout_minutes: 5
56+
max_attempts: 5
57+
command: composer require "laravel/framework:11.*" "phpunit/phpunit:^9.3.7" --no-update --no-interaction
58+
if: "matrix.laravel == '11'"
59+
9860
- name: Install PHP Dependencies
9961
uses: nick-invision/retry@v1
10062
with:
@@ -106,7 +68,7 @@ jobs:
10668
run: ./vendor/bin/phpunit --coverage-clover clover.xml
10769

10870
- name: Execute code style checks
109-
run: ./vendor/bin/phpcs --standard=PSR2 -p --ignore=./tests/storage/* --report=full --report-checkstyle=build/logs/checkstyle.xml src/ tests/
71+
run: ./vendor/bin/phpcs --standard=PSR2 -p --ignore=./tests/storage/* src/ tests/
11072

11173
- name: Check code coverage
11274
if: ${{ matrix.php == '8.1' }}

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^7.2.5 || ^8.0",
17+
"php": "^8.1",
1818
"twig/twig": "~3.0",
19-
"illuminate/support": "^6|^7|^8|^9|^10",
20-
"illuminate/view": "^6|^7|^8|^9|^10"
19+
"illuminate/support": "^9|^10|^11",
20+
"illuminate/view": "^9|^10|^11"
2121
},
2222
"require-dev": {
2323
"ext-json": "*",
24-
"laravel/framework": "^6|^7|^8|^9|^10",
24+
"laravel/framework": "^9|^10|^11",
2525
"mockery/mockery": "^1.3.1",
26-
"phpunit/phpunit": "^6.5.14 || ^7.5.20 || ^8.5.8 || ^9.3.7",
26+
"phpunit/phpunit": "^8.5.8 || ^9.3.7",
2727
"squizlabs/php_codesniffer": "^3.6"
2828
},
2929
"suggest": {
3030
"twig/extensions": "~1.0",
31-
"laravelcollective/html": "For bringing back html/form in Laravel 5.x"
31+
"laravelcollective/html": "For bringing back html/form in Laravel"
3232
},
3333
"autoload": {
3434
"psr-4": {

phpunit.xml

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,5 @@
1414
<directory>./tests/</directory>
1515
</testsuite>
1616
</testsuites>
17-
<filter>
18-
<whitelist>
19-
<directory suffix=".php">./src</directory>
20-
<exclude>
21-
<directory suffix=".php">./src/config</directory>
22-
</exclude>
23-
</whitelist>
24-
</filter>
25-
<logging>
26-
<log type="coverage-html"
27-
target="build/coverage"
28-
title="TwigBridge"
29-
charset="UTF-8"
30-
yui="true"
31-
highlight="true" />
3217

33-
<log type="coverage-text"
34-
target="php://stdout"
35-
title="TwigBridge"
36-
charset="UTF-8"
37-
lowUpperBound="50"
38-
highLowerBound="90" />
39-
40-
<log type="coverage-clover" target="build/logs/clover.xml"/>
41-
<log type="junit" target="build/logs/junit.xml" logIncompleteSkipped="false"/>
42-
</logging>
4318
</phpunit>

tests/Node/GetAttrTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ public function getTests()
137137
$tests[] = [
138138
$node,
139139
sprintf(
140-
'%s%s, "bar", [0 => %s, 1 => "bar"], "method", false, false, false, 1)',
140+
'%s%s, "bar", [%s, "bar"], "method", false, false, false, 1)',
141141
$this->getAttributeGetter(),
142142
$this->getVariableGetter('foo', 1),
143143
$this->getVariableGetter('foo')

0 commit comments

Comments
 (0)