Skip to content

Commit d5b2ab1

Browse files
authored
Merge pull request #8 from rw4lll/bump-to-laravel-12
Bump to laravel 12 and php 8.4
2 parents ae31971 + 793dafd commit d5b2ab1

File tree

28 files changed

+4009
-1320
lines changed

28 files changed

+4009
-1320
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ The production image can be deployed to any Docker-compatible hosting environmen
191191

192192
## Technical Details
193193

194-
- **PHP**: Version **8.3 FPM** is used for optimal performance in both development and production environments.
194+
- **PHP**: Version **8.4 FPM** is used for optimal performance in both development and production environments.
195195
- **Node.js**: Version **22.x** is used in the development environment for building frontend assets with Vite.
196196
- **PostgreSQL**: Version **16** is used as the database in the examples, but you can adjust the configuration to use MySQL if preferred.
197197
- **Redis**: Used for caching and session management, integrated into both development and production environments.
@@ -246,4 +246,4 @@ git commit -m "Description of changes"
246246

247247
## License
248248

249-
This project is licensed under the MIT License. See the LICENSE file for more details.
249+
This project is licensed under the MIT License. See the LICENSE file for more details.

app/Models/User.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99

1010
class User extends Authenticatable
1111
{
12+
/** @use HasFactory<\Database\Factories\UserFactory> */
1213
use HasFactory, Notifiable;
1314

1415
/**
1516
* The attributes that are mass assignable.
1617
*
17-
* @var array<int, string>
18+
* @var list<string>
1819
*/
1920
protected $fillable = [
2021
'name',
@@ -25,7 +26,7 @@ class User extends Authenticatable
2526
/**
2627
* The attributes that should be hidden for serialization.
2728
*
28-
* @var array<int, string>
29+
* @var list<string>
2930
*/
3031
protected $hidden = [
3132
'password',

artisan

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4+
use Illuminate\Foundation\Application;
45
use Symfony\Component\Console\Input\ArgvInput;
56

67
define('LARAVEL_START', microtime(true));
@@ -9,7 +10,9 @@ define('LARAVEL_START', microtime(true));
910
require __DIR__.'/vendor/autoload.php';
1011

1112
// Bootstrap Laravel and handle the command...
12-
$status = (require_once __DIR__.'/bootstrap/app.php')
13-
->handleCommand(new ArgvInput);
13+
/** @var Application $app */
14+
$app = require_once __DIR__.'/bootstrap/app.php';
15+
16+
$status = $app->handleCommand(new ArgvInput);
1417

1518
exit($status);

compose.prod.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ services:
1212
# The 'php-fpm' service mounts the same volume without ':ro' to allow write operations.
1313
# -----------------------------------------------------------
1414
- laravel-storage-production:/var/www/storage:ro
15+
- laravel-public-assets:/var/www/public/build:ro
1516
networks:
1617
- laravel-production
1718
ports:
@@ -33,6 +34,7 @@ services:
3334
target: production
3435
restart: unless-stopped
3536
volumes:
37+
- laravel-public-assets:/var/www/public/build # Mount built public assets to ensure the manifest.json and hashed files match between Nginx and PHP-FPM
3638
- laravel-storage-production:/var/www/storage # Mount the storage volume
3739
env_file:
3840
- .env
@@ -103,3 +105,4 @@ networks:
103105
volumes:
104106
postgres-data-production:
105107
laravel-storage-production:
108+
laravel-public-assets:

composer.json

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
11
{
2+
"$schema": "https://getcomposer.org/schema.json",
23
"name": "laravel/laravel",
34
"type": "project",
45
"description": "The skeleton application for the Laravel framework.",
5-
"keywords": ["laravel", "framework"],
6+
"keywords": [
7+
"laravel",
8+
"framework"
9+
],
610
"license": "MIT",
711
"require": {
812
"php": "^8.2",
9-
"laravel/framework": "^11.9",
10-
"laravel/tinker": "^2.9"
13+
"laravel/framework": "^12.0",
14+
"laravel/tinker": "^2.10.1"
1115
},
1216
"require-dev": {
1317
"fakerphp/faker": "^1.23",
18+
"laravel/pail": "^1.2.2",
1419
"laravel/pint": "^1.13",
15-
"laravel/sail": "^1.26",
20+
"laravel/sail": "^1.41",
1621
"mockery/mockery": "^1.6",
17-
"nunomaduro/collision": "^8.0",
18-
"phpunit/phpunit": "^11.0.1"
22+
"nunomaduro/collision": "^8.6",
23+
"pestphp/pest": "^3.8",
24+
"pestphp/pest-plugin-laravel": "^3.2"
1925
},
2026
"autoload": {
2127
"psr-4": {
@@ -44,6 +50,14 @@
4450
"@php artisan key:generate --ansi",
4551
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
4652
"@php artisan migrate --graceful --ansi"
53+
],
54+
"dev": [
55+
"Composer\\Config::disableProcessTimeout",
56+
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php artisan serve\" \"php artisan queue:listen --tries=1\" \"php artisan pail --timeout=0\" \"npm run dev\" --names=server,queue,logs,vite"
57+
],
58+
"test": [
59+
"@php artisan config:clear --ansi",
60+
"@php artisan test"
4761
]
4862
},
4963
"extra": {
@@ -62,4 +76,4 @@
6276
},
6377
"minimum-stability": "stable",
6478
"prefer-stable": true
65-
}
79+
}

0 commit comments

Comments
 (0)