Skip to content

Commit ca5042f

Browse files
authored
[master] Finishes L11 support (#564)
* Finishes L11 support * Removes verbose * Uses PHPUnit 10.4 * Fixes test suite * Fixes test suite
1 parent 76c14a1 commit ca5042f

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.github/workflows/tests.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
php: [7.2, 7.3, 7.4, "8.0", 8.1, 8.2, 8.3]
16-
laravel: [6, 7, 8, 9, 10]
16+
laravel: [6, 7, 8, 9, 10, 11]
1717
stability: ["prefer-lowest", "prefer-stable"]
1818
exclude:
1919
- php: 7.2
@@ -22,20 +22,30 @@ jobs:
2222
laravel: 9
2323
- php: 7.2
2424
laravel: 10
25+
- php: 7.2
26+
laravel: 11
2527
- php: 7.3
2628
laravel: 9
2729
- php: 7.3
2830
laravel: 10
31+
- php: 7.3
32+
laravel: 11
2933
- php: 7.4
3034
laravel: 9
3135
- php: 7.4
3236
laravel: 10
37+
- php: 7.4
38+
laravel: 11
3339
- php: '8.0'
3440
laravel: 10
41+
- php: '8.0'
42+
laravel: 11
3543
- php: 8.1
3644
laravel: 6
3745
- php: 8.1
3846
laravel: 7
47+
- php: 8.1
48+
laravel: 11
3949
- php: 8.2
4050
laravel: 6
4151
- php: 8.2
@@ -82,6 +92,15 @@ jobs:
8292
composer require nesbot/carbon:^2.62.1 --dev --${{ matrix.stability }} --no-update --no-interaction
8393
if: matrix.php >= 8.2 && matrix.stability == 'prefer-lowest'
8494

95+
- name: Set Minimum PHP 8.2 Versions and Laravel > 11
96+
uses: nick-invision/retry@v1
97+
with:
98+
timeout_minutes: 5
99+
max_attempts: 5
100+
command: |
101+
composer require phpunit/phpunit:^10.4 --dev --${{ matrix.stability }} --no-update --no-interaction
102+
if: matrix.php >= 8.2 && matrix.stability == 'prefer-lowest' && matrix.laravel >= 11
103+
85104
- name: Set Laravel version
86105
uses: nick-invision/retry@v1
87106
with:
@@ -97,4 +116,4 @@ jobs:
97116
command: composer update --${{ matrix.stability }} --no-interaction
98117

99118
- name: Execute tests
100-
run: vendor/bin/phpunit --verbose
119+
run: vendor/bin/phpunit

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"roave/security-advisories": "dev-master",
3434
"orchestra/testbench": "^4.0|^5.0|^6.4|^7.0|^8.0|^9.0",
3535
"mockery/mockery": "^1.3.3",
36-
"phpunit/phpunit": "^8.0|^9.5.8"
36+
"phpunit/phpunit": "^8.0|^9.5.8|^10.4"
3737
},
3838
"suggest": {
3939
"ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command."

tests/ResponseTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ public function test_lazy_props_are_not_included_by_default(): void
269269
$page = $response->getData();
270270

271271
$this->assertSame([], $page->props->users);
272-
$this->assertObjectNotHasAttribute('lazy', $page->props);
272+
$this->assertFalse(property_exists($page->props, 'lazy'));
273273
}
274274

275275
public function test_lazy_props_are_included_in_partial_reload(): void
@@ -287,7 +287,7 @@ public function test_lazy_props_are_included_in_partial_reload(): void
287287
$response = $response->toResponse($request);
288288
$page = $response->getData();
289289

290-
$this->assertObjectNotHasAttribute('users', $page->props);
290+
$this->assertFalse(property_exists($page->props, 'users'));
291291
$this->assertSame('A lazy value', $page->props->lazy);
292292
}
293293

0 commit comments

Comments
 (0)