Skip to content

Commit 1994a15

Browse files
committed
Merge branch '2.x' into provides-inertia-props
2 parents 6e79036 + c38ef00 commit 1994a15

32 files changed

+894
-88
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Bug Report
2+
description: "Submit an issue related to the Inertia Laravel adapter."
3+
body:
4+
- type: markdown
5+
attributes:
6+
value: "Please read [our full contribution guide](https://laravel.com/docs/contributions#bug-reports) before submitting bug reports related to the Inertia Laravel adapter."
7+
- type: input
8+
attributes:
9+
label: "PHP package version"
10+
description: Provide the version of `inertiajs/inertia-laravel` you are using.
11+
placeholder: 2.0.0
12+
validations:
13+
required: true
14+
- type: checkboxes
15+
attributes:
16+
label: Inertia adapter(s) affected (if any)
17+
description: Select any frontend adapters involved in this issue, if relevant.
18+
options:
19+
- label: React
20+
- label: Vue 3
21+
- label: Svelte
22+
- label: Not Applicable
23+
- type: textarea
24+
attributes:
25+
label: Backend stack
26+
description: Provide details such as Laravel version, PHP version, and any relevant backend environment info.
27+
placeholder: |
28+
Laravel 12.x
29+
PHP 8.4
30+
validations:
31+
required: true
32+
- type: textarea
33+
attributes:
34+
label: Describe the problem
35+
description: Explain the behavior you're seeing that you think is a bug, and describe how you expect it to behave instead.
36+
validations:
37+
required: true
38+
- type: textarea
39+
attributes:
40+
label: Steps to reproduce
41+
description: Provide clear steps to reproduce the issue. Include a minimal code example that clearly shows the problem.
42+
validations:
43+
required: true

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Feature Request
4+
url: https://github.com/inertiajs/inertia/discussions/new?category=ideas
5+
about: "For ideas or feature requests, start a new discussion"
6+
- name: Support Questions & Other
7+
url: https://github.com/inertiajs/inertia/discussions/new?category=help
8+
about: "This repository is only for reporting bugs. If you have a question or need help using the library, click:"
9+
- name: Documentation issue
10+
url: https://github.com/inertiajs/inertiajs.com
11+
about: For documentation issues, open a pull request at the inertiajs/inertiajs.com repository

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Only the latest major version receives security fixes.
88

99
## Reporting a Vulnerability
1010

11-
If you discover a security vulnerability within Laravel, please send an email to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.
11+
If you discover a security vulnerability within Inertia.js, please send an email to Taylor Otwell at [email protected]. All security vulnerabilities will be promptly addressed.
1212

1313
### Public PGP Key
1414

CHANGELOG.md

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

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

55
- Nothing!
66

7+
## [v2.0.4](https://github.com/inertiajs/inertia-laravel/compare/v2.0.3...v2.0.4) - 2025-07-15
8+
9+
### What's Changed
10+
11+
* [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
12+
* [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
13+
* [2.x] Refactor `HttpGateway` by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/754
14+
* [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
15+
* [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
16+
* [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
17+
* GitHub issue template by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/757
18+
* update return type in Middleware share method by [@hosmelq](https://github.com/hosmelq) in https://github.com/inertiajs/inertia-laravel/pull/758
19+
* Fix project name in `SECURITY.md` by [@duncanmcclean](https://github.com/duncanmcclean) in https://github.com/inertiajs/inertia-laravel/pull/759
20+
* [2.x] Remove old version checks by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/763
21+
22+
### New Contributors
23+
24+
* [@hosmelq](https://github.com/hosmelq) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/758
25+
* [@duncanmcclean](https://github.com/duncanmcclean) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/759
26+
27+
**Full Changelog**: https://github.com/inertiajs/inertia-laravel/compare/v2.0.3...v2.0.4
28+
29+
## [v2.0.3](https://github.com/inertiajs/inertia-laravel/compare/v2.0.2...v2.0.3) - 2025-06-20
30+
31+
### What's Changed
32+
33+
* Run tests on Ubuntu 24.04 by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/735
34+
* Improve URL handling with support for trailing slashes by [@ljbw](https://github.com/ljbw) in https://github.com/inertiajs/inertia-laravel/pull/731
35+
* [2.x] Remove old LegacyTestResponse by [@nshiro](https://github.com/nshiro) in https://github.com/inertiajs/inertia-laravel/pull/736
36+
* [2.x] Introduce inertiaProps Method in TestResponseMacros for Improved Inertia.js Testing by [@ashokatheheroo](https://github.com/ashokatheheroo) in https://github.com/inertiajs/inertia-laravel/pull/700
37+
* [2.x] Remove check for `TestResponse` from Laravel <= 6.0 by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/743
38+
* [2.x] Check Vite manifest before Mix manifest by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/737
39+
* [2.x] Remove IDE helpers by [@ycs77](https://github.com/ycs77) in https://github.com/inertiajs/inertia-laravel/pull/675
40+
* [2.x] Allow deepMerge on custom properties by [@mpociot](https://github.com/mpociot) in https://github.com/inertiajs/inertia-laravel/pull/732
41+
* [2.x] Test helper for partial requests by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/738
42+
* [2.x] Support for a custom URL resolver by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/739
43+
* [2.x] Keep only partial data in mergeProps by [@vinnygambiny](https://github.com/vinnygambiny) in https://github.com/inertiajs/inertia-laravel/pull/745
44+
* [2.x] Refactor `mergeStrategies` argument to `matchOn()` method by [@pascalbaljet](https://github.com/pascalbaljet) in https://github.com/inertiajs/inertia-laravel/pull/747
45+
46+
### New Contributors
47+
48+
* [@ljbw](https://github.com/ljbw) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/731
49+
* [@nshiro](https://github.com/nshiro) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/736
50+
* [@ashokatheheroo](https://github.com/ashokatheheroo) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/700
51+
* [@mpociot](https://github.com/mpociot) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/732
52+
* [@vinnygambiny](https://github.com/vinnygambiny) made their first contribution in https://github.com/inertiajs/inertia-laravel/pull/745
53+
54+
**Full Changelog**: https://github.com/inertiajs/inertia-laravel/compare/v2.0.2...v2.0.3
55+
756
## [v2.0.2](https://github.com/inertiajs/inertia-laravel/compare/v2.0.1...v2.0.2) - 2025-04-10
857

958
### What's Changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
<a href="https://github.com/inertiajs/inertia-laravel/releases">
55
<img src="https://img.shields.io/github/release/inertiajs/inertia-laravel.svg?style=flat-square" alt="Latest Version">
66
</a>
7-
<a href="https://github.com/inertiajs/inertia-laravel/actions/workflows/tests.yml?query=workflow%3Atests+branch%3Amaster">
8-
<img src="https://github.com/inertiajs/inertia-laravel/actions/workflows/tests.yml/badge.svg?branch=master" alt="Build Status">
7+
<a href="https://github.com/inertiajs/inertia-laravel/actions/workflows/tests.yml">
8+
<img src="https://github.com/inertiajs/inertia-laravel/actions/workflows/tests.yml/badge.svg" alt="Build Status">
99
</a>
1010
<a href="https://packagist.org/packages/inertiajs/inertia-laravel">
1111
<img src="https://img.shields.io/packagist/dt/inertiajs/inertia-laravel.svg?style=flat-square" alt="Total Downloads">

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"symfony/console": "^6.2|^7.0"
3535
},
3636
"require-dev": {
37+
"guzzlehttp/guzzle": "^7.2",
3738
"roave/security-advisories": "dev-master",
3839
"orchestra/testbench": "^8.0|^9.2|^10.0",
3940
"mockery/mockery": "^1.3.3",

config/inertia.php

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,45 @@
2525

2626
'url' => env('INERTIA_SSR_URL', 'http://127.0.0.1:13714'),
2727

28+
'ensure_bundle_exists' => (bool) env('INERTIA_SSR_ENSURE_BUNDLE_EXISTS', true),
29+
2830
// 'bundle' => base_path('bootstrap/ssr/ssr.mjs'),
2931

3032
],
3133

34+
/*
35+
|--------------------------------------------------------------------------
36+
| Pages
37+
|--------------------------------------------------------------------------
38+
|
39+
| Set `ensure_pages_exist` to true if you want to enforce that Inertia page
40+
| components exist on disk when rendering a page. This is useful for
41+
| catching missing or misnamed components.
42+
|
43+
| The `page_paths` and `page_extensions` options define where to look
44+
| for page components and which file extensions to consider.
45+
|
46+
*/
47+
48+
'ensure_pages_exist' => false,
49+
50+
'page_paths' => [
51+
52+
resource_path('js/Pages'),
53+
54+
],
55+
56+
'page_extensions' => [
57+
58+
'js',
59+
'jsx',
60+
'svelte',
61+
'ts',
62+
'tsx',
63+
'vue',
64+
65+
],
66+
3267
/*
3368
|--------------------------------------------------------------------------
3469
| Testing
@@ -39,6 +74,10 @@
3974
| attempts to locate the component as a file relative to any of the
4075
| paths AND with any of the extensions specified here.
4176
|
77+
| Note: In a future release, the `page_paths` and `page_extensions`
78+
| options below will be removed. The root-level options above
79+
| will be used for both application and testing purposes.
80+
|
4281
*/
4382

4483
'testing' => [

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
{

src/Commands/CheckSsr.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
3+
namespace Inertia\Commands;
4+
5+
use Illuminate\Console\Command;
6+
use Inertia\Ssr\Gateway;
7+
use Inertia\Ssr\HasHealthCheck;
8+
use Symfony\Component\Console\Attribute\AsCommand;
9+
10+
#[AsCommand(name: 'inertia:check-ssr')]
11+
class CheckSsr extends Command
12+
{
13+
/**
14+
* The console command name.
15+
*
16+
* @var string
17+
*/
18+
protected $signature = 'inertia:check-ssr';
19+
20+
/**
21+
* The console command description.
22+
*
23+
* @var string
24+
*/
25+
protected $description = 'Check the Inertia SSR server health status';
26+
27+
/**
28+
* check the SSR server via a Node process.
29+
*/
30+
public function handle(Gateway $gateway): int
31+
{
32+
if (! $gateway instanceof HasHealthCheck) {
33+
$this->error('The SSR gateway does not support health checks.');
34+
35+
return self::FAILURE;
36+
}
37+
38+
($check = $gateway->isHealthy())
39+
? $this->info('Inertia SSR server is running.')
40+
: $this->error('Inertia SSR server is not running.');
41+
42+
return $check ? self::SUCCESS : self::FAILURE;
43+
}
44+
}

src/ComponentNotFoundException.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace Inertia;
4+
5+
use InvalidArgumentException;
6+
7+
class ComponentNotFoundException extends InvalidArgumentException {}

0 commit comments

Comments
 (0)