Skip to content

Commit ecc2a61

Browse files
Merge branch '2.x' into once-props
2 parents bfbaa75 + a355007 commit ecc2a61

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1056
-146
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
/tests export-ignore
1212
/CHANGELOG.md export-ignore
1313
/README.md export-ignore
14+
/phpstan.neon export-ignore

.github/workflows/facade.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
2323
with:
24-
php-version: 8.1
24+
php-version: 8.2
2525
tools: composer:v2
2626
coverage: none
2727

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: static analysis
2+
3+
on:
4+
push:
5+
branches:
6+
- "2.x"
7+
pull_request:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
tests:
14+
uses: laravel/.github/.github/workflows/static-analysis.yml@main

.github/workflows/tests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ jobs:
3737
tools: composer:v2
3838
coverage: none
3939

40+
- name: Remove PHPStan on PHP 8.1 and Laravel 10
41+
run: composer remove --dev larastan/larastan
42+
if: matrix.php == 8.1 || matrix.laravel == 10
43+
4044
- name: Set Minimum PHP 8.1 Versions
4145
uses: nick-fields/retry@v3
4246
with:

CHANGELOG.md

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

3-
## [Unreleased](https://github.com/inertiajs/inertia-laravel/compare/v2.0.3...2.x)
3+
## [Unreleased](https://github.com/inertiajs/inertia-laravel/compare/v2.0.5...2.x)
44

55
- Nothing!
66

7+
## [v2.0.5](https://github.com/inertiajs/inertia-laravel/compare/v2.0.4...v2.0.5) - 2025-08-12
8+
9+
### What's Changed
10+
11+
* [2.x] Improve inertia helper docblock by [@mtlukaszczyk](https://github.com/mtlukaszczyk) in https://github.com/inertiajs/inertia-laravel/pull/766
12+
* [2.x] Introduce `ProvidesInertiaProp` interface by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/746
13+
* [2.x] Introduce ProvidesInertiaProps interface by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/769
14+
* Introduce PHPStan + improve DocBlocks by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/768
15+
16+
### New Contributors
17+
18+
* [@mtlukaszczyk](https://github.com/mtlukaszczyk) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/766
19+
20+
**Full Changelog**: https://github.com/inertiajs/inertia-laravel/compare/v2.0.4...v2.0.5
21+
22+
## [v2.0.4](https://github.com/inertiajs/inertia-laravel/compare/v2.0.3...v2.0.4) - 2025-07-15
23+
24+
### What's Changed
25+
26+
* [2.x] Ability to perform a SSR request without a bundle by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/751
27+
* [2.x] Added `inertia:check-ssr` Artisan command and `isHealthy()` method on `HttpGateway` by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/752
28+
* [2.x] Refactor `HttpGateway` by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/754
29+
* [2.x] Support for checking if the component exists when rendering by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/749
30+
* [2.x] Refactored `ssr.dispatch_without_bundle` to `ssr.ensure_bundle_exists` by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/755
31+
* [2.x] Restore `testing.page_paths` and `testing.page_extensions` configs by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/756
32+
* GitHub issue template by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/757
33+
* update return type in Middleware share method by [@hosmelq](https://github.com/hosmelq) in https://github.com/inertiajs/inertia-laravel/pull/758
34+
* Fix project name in `SECURITY.md` by [@duncanmcclean](https://github.com/duncanmcclean) in https://github.com/inertiajs/inertia-laravel/pull/759
35+
* [2.x] Remove old version checks by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/763
36+
37+
### New Contributors
38+
39+
* [@hosmelq](https://github.com/hosmelq) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/758
40+
* [@duncanmcclean](https://github.com/duncanmcclean) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/759
41+
42+
**Full Changelog**: https://github.com/inertiajs/inertia-laravel/compare/v2.0.3...v2.0.4
43+
744
## [v2.0.3](https://github.com/inertiajs/inertia-laravel/compare/v2.0.2...v2.0.3) - 2025-06-20
845

946
### What's Changed

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"orchestra/testbench": "^8.0|^9.2|^10.0",
4040
"mockery/mockery": "^1.3.3",
4141
"phpunit/phpunit": "^10.4|^11.5",
42-
"laravel/pint": "^1.16"
42+
"laravel/pint": "^1.16",
43+
"larastan/larastan": "^3.0"
4344
},
4445
"suggest": {
4546
"ext-pcntl": "Recommended when running the Inertia SSR server via the `inertia:start-ssr` artisan command."
@@ -53,4 +54,4 @@
5354
},
5455
"minimum-stability": "dev",
5556
"prefer-stable": true
56-
}
57+
}

helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* @param null|string $component
88
* @param array|\Illuminate\Contracts\Support\Arrayable $props
9-
* @return \Inertia\ResponseFactory|\Inertia\Response
9+
* @return ($component is null ? \Inertia\ResponseFactory : \Inertia\Response)
1010
*/
1111
function inertia($component = null, $props = [])
1212
{

phpstan.neon

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
includes:
2+
- vendor/larastan/larastan/extension.neon
3+
4+
parameters:
5+
level: 6
6+
paths:
7+
- src
8+
- tests
9+
excludePaths:
10+
- src/Testing/Concerns
11+
ignoreErrors:
12+
- '#Call to an undefined method.*TestResponse.*::assertInertia\(\)#'
13+
- '#Call to an undefined method.*TestResponse.*::inertiaPage\(\)#'
14+
- '#Call to an undefined method.*TestResponse.*::inertiaProps\(\)#'
15+
- '#Call to an undefined.*method.*Request::inertia\(\)#'
16+
- '#Call to an undefined.*method.*Route::inertia\(\)#'
17+

src/AlwaysProp.php

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,32 @@
66

77
class AlwaysProp
88
{
9-
/** @var mixed */
9+
/**
10+
* The property value.
11+
*
12+
* Always included in Inertia responses, bypassing partial reload filtering.
13+
*
14+
* @var mixed
15+
*/
1016
protected $value;
1117

1218
/**
19+
* Create a new always property instance. Always properties are included
20+
* in every Inertia response, even during partial reloads when only
21+
* specific props are requested.
22+
*
1323
* @param mixed $value
1424
*/
1525
public function __construct($value)
1626
{
1727
$this->value = $value;
1828
}
1929

30+
/**
31+
* Resolve the property value.
32+
*
33+
* @return mixed
34+
*/
2035
public function __invoke()
2136
{
2237
return is_callable($this->value) ? App::call($this->value) : $this->value;

src/Commands/CheckSsr.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class CheckSsr extends Command
2525
protected $description = 'Check the Inertia SSR server health status';
2626

2727
/**
28-
* check the SSR server via a Node process.
28+
* Check the Inertia SSR server health status.
2929
*/
3030
public function handle(Gateway $gateway): int
3131
{

0 commit comments

Comments
 (0)