Skip to content

Commit 1e306c2

Browse files
committed
Merge branch '1.x' into pr/740
2 parents 93bd207 + 4b41c20 commit 1e306c2

18 files changed

+91
-40
lines changed

.github/workflows/facade.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v3
19+
uses: actions/checkout@v4
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
@@ -26,7 +26,7 @@ jobs:
2626
coverage: none
2727

2828
- name: Install dependencies
29-
uses: nick-fields/retry@v2
29+
uses: nick-fields/retry@v3
3030
with:
3131
timeout_minutes: 5
3232
max_attempts: 5

.github/workflows/tests.yml

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,55 @@ on:
88

99
jobs:
1010
tests:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-24.04
1212
strategy:
1313
fail-fast: true
1414
matrix:
1515
php: [7.3, 7.4, "8.0", 8.1, 8.2, 8.3]
16-
laravel: [8, 9, 10, 11]
16+
laravel: [8, 9, 10, 11, 12]
1717
stability: ["prefer-lowest", "prefer-stable"]
18+
include:
19+
- php: 8.4
20+
laravel: 11
21+
stability: "prefer-stable"
22+
- php: 8.4
23+
laravel: 12
24+
stability: "prefer-stable"
1825
exclude:
26+
- php: 7.3
27+
laravel: 8 # Failed security advisory
1928
- php: 7.3
2029
laravel: 9
2130
- php: 7.3
2231
laravel: 10
2332
- php: 7.3
2433
laravel: 11
34+
- php: 7.3
35+
laravel: 12
2536
- php: 7.4
2637
laravel: 9
2738
- php: 7.4
2839
laravel: 10
2940
- php: 7.4
3041
laravel: 11
42+
- php: 7.4
43+
laravel: 12
44+
- php: '8.0'
45+
laravel: 9 # Failed security advisory
3146
- php: '8.0'
3247
laravel: 10
3348
- php: '8.0'
3449
laravel: 11
50+
- php: '8.0'
51+
laravel: 12
3552
- php: 8.1
3653
laravel: 6
3754
- php: 8.1
3855
laravel: 7
3956
- php: 8.1
4057
laravel: 11
58+
- php: 8.1
59+
laravel: 12
4160
- php: 8.2
4261
laravel: 6
4362
- php: 8.2
@@ -54,7 +73,7 @@ jobs:
5473
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} (w/ ${{ matrix.stability }})
5574
steps:
5675
- name: Checkout code
57-
uses: actions/checkout@v2
76+
uses: actions/checkout@v4
5877

5978
- name: Setup PHP
6079
uses: shivammathur/setup-php@v2
@@ -66,7 +85,7 @@ jobs:
6685
coverage: none
6786

6887
- name: Set Minimum PHP 8.1 Versions
69-
uses: nick-invision/retry@v1
88+
uses: nick-fields/retry@v3
7089
with:
7190
timeout_minutes: 5
7291
max_attempts: 5
@@ -76,32 +95,32 @@ jobs:
7695
if: matrix.php >= 8.1 && matrix.stability == 'prefer-lowest'
7796

7897
- name: Set Minimum PHP 8.2 Versions
79-
uses: nick-invision/retry@v1
98+
uses: nick-fields/retry@v3
8099
with:
81100
timeout_minutes: 5
82101
max_attempts: 5
83102
command: |
84103
composer require nesbot/carbon:^2.62.1 --dev --${{ matrix.stability }} --no-update --no-interaction
85-
if: matrix.php >= 8.2 && matrix.stability == 'prefer-lowest'
104+
if: matrix.php >= 8.2 && matrix.stability == 'prefer-lowest' && matrix.laravel < 12
86105

87106
- name: Set Minimum PHP 8.2 Versions and Laravel > 11
88-
uses: nick-invision/retry@v1
107+
uses: nick-fields/retry@v3
89108
with:
90109
timeout_minutes: 5
91110
max_attempts: 5
92111
command: |
93-
composer require phpunit/phpunit:^10.4 --dev --${{ matrix.stability }} --no-update --no-interaction
112+
composer require "phpunit/phpunit:^10.4|^11.5" --dev --${{ matrix.stability }} --no-update --no-interaction
94113
if: matrix.php >= 8.2 && matrix.stability == 'prefer-lowest' && matrix.laravel >= 11
95114

96115
- name: Set Laravel version
97-
uses: nick-invision/retry@v1
116+
uses: nick-fields/retry@v3
98117
with:
99118
timeout_minutes: 5
100119
max_attempts: 5
101120
command: composer require "laravel/framework=^${{ matrix.laravel }}" --no-interaction --no-update
102121

103122
- name: Install dependencies
104-
uses: nick-invision/retry@v1
123+
uses: nick-fields/retry@v3
105124
with:
106125
timeout_minutes: 5
107126
max_attempts: 5

CHANGELOG.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
# Release Notes
22

3-
## [Unreleased](https://github.com/inertiajs/inertia-laravel/compare/v1.3.0...1.x)
3+
## [Unreleased](https://github.com/inertiajs/inertia-laravel/compare/v1.3.2...1.x)
44

55
- Nothing yet!
66

7+
## [v1.3.2](https://github.com/inertiajs/inertia-laravel/compare/v1.3.1...v1.3.2) - 2024-12-05
8+
9+
- [1.x] Fix PHP 8.4 deprecations ([#691](https://github.com/inertiajs/inertia-laravel/pull/691))
10+
- [1.x] Ensure Inertia Response generate also compatible with Inertia.js 2 ([#692](https://github.com/inertiajs/inertia-laravel/pull/692))
11+
12+
## [v1.3.1](https://github.com/inertiajs/inertia-laravel/compare/v1.3.0...v1.3.1) - 2024-11-14
13+
14+
- [1.x] Supports PHP 8.4 by [@crynobone](https://github.com/crynobone) in https://github.com/inertiajs/inertia-laravel/pull/683
15+
716
## [v1.3.0](https://github.com/inertiajs/inertia-laravel/compare/v1.2.0...v1.3.0) - 2024-06-12
817

918
- Add "always" props using new `Inertia::always()` wrapper ([#627](https://github.com/inertiajs/inertia-laravel/pull/627))

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,15 @@
2525
}
2626
},
2727
"require": {
28-
"php": "^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0",
28+
"php": "^7.3|~8.0.0|~8.1.0|~8.2.0|~8.3.0|~8.4.0",
2929
"ext-json": "*",
30-
"laravel/framework": "^8.74|^9.0|^10.0|^11.0",
30+
"laravel/framework": "^8.74|^9.0|^10.0|^11.0|^12.0",
3131
"symfony/console": "^5.3|^6.0|^7.0"
3232
},
3333
"require-dev": {
34-
"roave/security-advisories": "dev-master",
35-
"orchestra/testbench": "^6.4|^7.0|^8.0|^9.0",
34+
"orchestra/testbench": "^6.45|^7.44|^8.25|^9.3|^10.0",
3635
"mockery/mockery": "^1.3.3",
37-
"phpunit/phpunit": "^8.0|^9.5.8|^10.4"
36+
"phpunit/phpunit": "^8.0|^9.5.8|^10.4|^11.5"
3837
},
3938
"suggest": {
4039
"ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command."

src/Middleware.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
use Inertia\Support\Header;
77
use Illuminate\Http\Request;
88
use Illuminate\Support\Facades\Redirect;
9+
use Inertia\Support\LaravelVapor;
910
use Symfony\Component\HttpFoundation\Response;
1011

1112
class Middleware
@@ -28,7 +29,7 @@ class Middleware
2829
*/
2930
public function version(Request $request)
3031
{
31-
if (config('app.asset_url')) {
32+
if (LaravelVapor::detect()) {
3233
return md5(config('app.asset_url'));
3334
}
3435

src/Response.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ public function toResponse($request)
9595
'props' => $props,
9696
'url' => Str::start(Str::after($request->fullUrl(), $request->getSchemeAndHttpHost()), '/'),
9797
'version' => $this->version,
98+
'encryptHistory' => false,
99+
'clearHistory' => false,
98100
];
99101

100102
if ($request->header(Header::INERTIA)) {

src/ResponseFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function share($key, $value = null): void
4646
}
4747
}
4848

49-
public function getShared(string $key = null, $default = null)
49+
public function getShared(?string $key = null, $default = null)
5050
{
5151
if ($key) {
5252
return Arr::get($this->sharedProps, $key, $default);

src/Support/LaravelVapor.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
namespace Inertia\Support;
4+
5+
use Laravel\Vapor\Vapor;
6+
7+
class LaravelVapor
8+
{
9+
public static function detect(): bool
10+
{
11+
if (class_exists(Vapor::class)) {
12+
return Vapor::active();
13+
}
14+
15+
return false;
16+
}
17+
}

src/Testing/AssertableInertia.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public static function fromTestResponse(TestResponse $response): self
4242
return $instance;
4343
}
4444

45-
public function component(string $value = null, $shouldExist = null): self
45+
public function component(?string $value = null, $shouldExist = null): self
4646
{
4747
PHPUnit::assertSame($value, $this->component, 'Unexpected Inertia page component.');
4848

src/Testing/Concerns/Debugging.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44

55
trait Debugging
66
{
7-
public function dump(string $prop = null): self
7+
public function dump(?string $prop = null): self
88
{
99
dump($this->prop($prop));
1010

1111
return $this;
1212
}
1313

14-
public function dd(string $prop = null): void
14+
public function dd(?string $prop = null): void
1515
{
1616
dd($this->prop($prop));
1717
}
1818

19-
abstract protected function prop(string $key = null);
19+
abstract protected function prop(?string $key = null);
2020
}

0 commit comments

Comments
 (0)