Skip to content

Commit 46d5872

Browse files
Upgrade to Laravel 13 (#1860)
1 parent 24bc7f4 commit 46d5872

45 files changed

Lines changed: 2135 additions & 1823 deletions

Some content is hidden

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

app/Models/User.php

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?php
2+
3+
namespace App\Models;
4+
5+
// use Illuminate\Contracts\Auth\MustVerifyEmail;
6+
use Database\Factories\UserFactory;
7+
use Illuminate\Database\Eloquent\Attributes\Fillable;
8+
use Illuminate\Database\Eloquent\Attributes\Hidden;
9+
use Illuminate\Database\Eloquent\Factories\HasFactory;
10+
use Illuminate\Foundation\Auth\User as Authenticatable;
11+
use Illuminate\Notifications\Notifiable;
12+
13+
#[Fillable(['name', 'email', 'password'])]
14+
#[Hidden(['password', 'remember_token'])]
15+
class User extends Authenticatable
16+
{
17+
/** @use HasFactory<UserFactory> */
18+
use HasFactory, Notifiable;
19+
20+
/**
21+
* Get the attributes that should be cast.
22+
*
23+
* @return array<string, string>
24+
*/
25+
protected function casts(): array
26+
{
27+
return [
28+
'email_verified_at' => 'datetime',
29+
'password' => 'hashed',
30+
];
31+
}
32+
}

app/Providers/AppServiceProvider.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,11 @@
77
use App\Search\Listeners\SearchEntriesCreatedListener;
88
use App\Search\Storybook\StorybookSearchProvider;
99
use Illuminate\Support\Facades\Event;
10-
use Illuminate\Support\Facades\Blade;
11-
use Illuminate\Support\Facades\Route;
12-
use Illuminate\Support\Facades\View;
1310
use Illuminate\Support\ServiceProvider;
1411
use League\CommonMark\Extension\Attributes\AttributesExtension;
1512
use League\CommonMark\Extension\DescriptionList\DescriptionListExtension;
1613
use League\CommonMark\Extension\HeadingPermalink\HeadingPermalinkExtension;
1714
use Statamic\Facades\Markdown;
18-
use Statamic\Http\View\Composers\JavascriptComposer;
19-
use Statamic\Statamic;
2015
use Stillat\DocumentationSearch\Events\SearchEntriesCreated;
2116
use Torchlight\Engine\CommonMark\Extension as TorchlightExtension;
2217
use Torchlight\Engine\Options as TorchlightOptions;
@@ -25,20 +20,16 @@ class AppServiceProvider extends ServiceProvider
2520
{
2621
/**
2722
* Register any application services.
28-
*
29-
* @return void
3023
*/
31-
public function register()
24+
public function register(): void
3225
{
3326
//
3427
}
3528

3629
/**
3730
* Bootstrap any application services.
38-
*
39-
* @return void
4031
*/
41-
public function boot()
32+
public function boot(): void
4233
{
4334
Markdown::addExtensions(function () {
4435
return [new DescriptionListExtension, new HintExtension, new TabbedCodeBlockExtension, new AttributesExtension, new HeadingPermalinkExtension];

app/User.php

Lines changed: 0 additions & 38 deletions
This file was deleted.

bootstrap/app.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
11
<?php
22

3-
use App\Providers\AppServiceProvider;
43
use Illuminate\Foundation\Application;
54
use Illuminate\Foundation\Configuration\Exceptions;
65
use Illuminate\Foundation\Configuration\Middleware;
76

87
return Application::configure(basePath: dirname(__DIR__))
9-
->withProviders()
108
->withRouting(
119
web: __DIR__.'/../routes/web.php',
1210
commands: __DIR__.'/../routes/console.php',
1311
health: '/up',
1412
)
15-
->withMiddleware(function (Middleware $middleware) {
13+
->withMiddleware(function (Middleware $middleware): void {
1614
//
1715
})
18-
->withExceptions(function (Exceptions $exceptions) {
16+
->withExceptions(function (Exceptions $exceptions): void {
1917
//
2018
})->create();

bootstrap/providers.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?php
22

3+
use App\Providers\AppServiceProvider;
4+
35
return [
4-
App\Providers\AppServiceProvider::class,
6+
AppServiceProvider::class,
57
];

composer.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99
"license": "MIT",
1010
"require": {
1111
"php": "^8.2",
12-
"laravel/framework": "^12.0",
13-
"laravel/tinker": "^2.0",
14-
"statamic-rad-pack/meilisearch": "^4.0",
12+
"laravel/framework": "^13.0",
13+
"laravel/tinker": "^3.0",
14+
"statamic-rad-pack/meilisearch": "^4.1",
1515
"statamic/cms": "^6.0",
1616
"torchlight/engine": "^0.1.0",
1717
"stillat/documentation-search": "^2.0"
1818
},
1919
"require-dev": {
20-
"barryvdh/laravel-debugbar": "^3.16",
20+
"fruitcake/laravel-debugbar": "^4.0",
2121
"fakerphp/faker": "^1.4",
2222
"mockery/mockery": "^1.0",
2323
"nunomaduro/collision": "^8.0",
24-
"phpunit/phpunit": "^11.0",
24+
"phpunit/phpunit": "^12.0",
2525
"spatie/laravel-ignition": "^2.0",
2626
"spatie/laravel-ray": "^1.37"
2727
},
@@ -42,12 +42,10 @@
4242
},
4343
"autoload": {
4444
"psr-4": {
45-
"App\\": "app/"
46-
},
47-
"classmap": [
48-
"database/seeds",
49-
"database/factories"
50-
]
45+
"App\\": "app/",
46+
"Database\\Factories\\": "database/factories/",
47+
"Database\\Seeders\\": "database/seeders/"
48+
}
5149
},
5250
"autoload-dev": {
5351
"psr-4": {

0 commit comments

Comments
 (0)