Skip to content

Commit 9f698a7

Browse files
committed
Support Laravel 12
1 parent cb38959 commit 9f698a7

File tree

4 files changed

+20
-22
lines changed

4 files changed

+20
-22
lines changed

.github/workflows/tests.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: tests
22

33
on:
44
push:
5-
branches: [1.x]
5+
branches: [2.x]
66
pull_request:
7-
branches: [1.x]
7+
branches: [2.x]
88

99
jobs:
1010
tests:
@@ -13,11 +13,11 @@ jobs:
1313
fail-fast: true
1414
matrix:
1515
os: [ubuntu-latest]
16-
php: [8.2, 8.3]
17-
laravel: [11.*]
16+
php: [8.2, 8.3, 8.4]
17+
laravel: [12.*]
1818
include:
19-
- laravel: 11.*
20-
testbench: ^9.0
19+
- laravel: 12.*
20+
testbench: ^10.0
2121

2222
name: P${{ matrix.php }} - L${{ matrix.laravel }}
2323

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Latest Version on Packagist][ico-version]][link-packagist]
44
[![Software License][ico-license]](LICENSE.md)
5+
[![GitHub Tests Action Status][ico-github-action]][link-github-action]
56
[![Style CI Build Status][ico-style-ci]][link-style-ci]
67
[![Total Downloads][ico-downloads]][link-downloads]
78

@@ -19,6 +20,7 @@ Opinionated Inertia.js Laravel & Vue helper library, to scaffolding and extended
1920
| Version | Laravel Version |
2021
| ------- | --------------- |
2122
| 1.x | 11.x |
23+
| 2.x | 12.x |
2224

2325
## Installation
2426

@@ -102,9 +104,11 @@ The MIT License (MIT). Please see [License File](LICENSE.md) for more informatio
102104

103105
[ico-version]: https://img.shields.io/packagist/v/ycs77/inertia-engage?style=flat-square
104106
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen?style=flat-square
107+
[ico-github-action]: https://img.shields.io/github/actions/workflow/status/ycs77/inertia-engage/tests.yml?branch=2.x&label=tests&style=flat-square
105108
[ico-style-ci]: https://github.styleci.io/repos/800696246/shield?style=flat-square
106109
[ico-downloads]: https://img.shields.io/packagist/dt/ycs77/inertia-engage?style=flat-square
107110

108111
[link-packagist]: https://packagist.org/packages/ycs77/inertia-engage
112+
[link-github-action]: https://github.com/ycs77/inertia-engage/actions/workflows/tests.yml?query=branch%3A2.x
109113
[link-style-ci]: https://github.styleci.io/repos/800696246
110114
[link-downloads]: https://packagist.org/packages/ycs77/inertia-engage

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
"require": {
1414
"php": ">=8.2",
1515
"ergebnis/json-printer": "^3.5",
16-
"inertiajs/inertia-laravel": "^1.0|^2.0",
17-
"laravel/framework": ">=11.0",
18-
"laravel/prompts": ">=0.1",
16+
"inertiajs/inertia-laravel": "^2.0",
17+
"laravel/framework": ">=12.0",
18+
"laravel/prompts": ">=0.3",
1919
"symfony/console": ">=7.0"
2020
},
2121
"require-dev": {
22-
"orchestra/testbench": ">=9.0",
22+
"orchestra/testbench": ">=10.0",
2323
"pestphp/pest": "^2.34",
2424
"pestphp/pest-plugin-laravel": "^2.4"
2525
},

src/Console/Concerns/HasInitializeLaravelApp.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ protected function updateEditorConfig(): void
2727
);
2828
}
2929

30-
if (str_contains($editorConfig, '[docker-compose.yml]')) {
30+
if (str_contains($editorConfig, '[compose.yaml]')) {
3131
$editorConfig = str_replace(
32-
"\n[docker-compose.yml]\nindent_size = 4\n",
32+
"\n[compose.yaml]\nindent_size = 4\n",
3333
'',
3434
$editorConfig
3535
);
@@ -45,16 +45,10 @@ protected function updateEditorConfig(): void
4545
*/
4646
protected function updateTimezoneConfig(): void
4747
{
48-
file_put_contents(base_path('.env.example'), str_replace(
49-
'APP_TIMEZONE=UTC',
50-
'APP_TIMEZONE=Asia/Taipei',
51-
file_get_contents(base_path('.env.example'))
52-
));
53-
54-
file_put_contents(base_path('.env'), str_replace(
55-
'APP_TIMEZONE=UTC',
56-
'APP_TIMEZONE=Asia/Taipei',
57-
file_get_contents(base_path('.env'))
48+
file_put_contents(base_path('config/app.php'), str_replace(
49+
"'timezone' => 'UTC',",
50+
"'timezone' => 'Asia/Taipei',",
51+
file_get_contents(base_path('config/app.php'))
5852
));
5953

6054
$this->components->info('Updated timezone config');

0 commit comments

Comments
 (0)