Skip to content

Commit 008e7a4

Browse files
committed
Followed Laravel 9 update steps and file changes
1 parent 6e6f113 commit 008e7a4

604 files changed

Lines changed: 1672 additions & 2509 deletions

File tree

Some content is hidden

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

.github/workflows/test-migrations.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-22.04
99
strategy:
1010
matrix:
11-
php: ['7.4', '8.0', '8.1', '8.2']
11+
php: ['8.0', '8.1', '8.2']
1212
steps:
1313
- uses: actions/checkout@v1
1414

.github/workflows/test-php.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
runs-on: ubuntu-22.04
99
strategy:
1010
matrix:
11-
php: ['7.4', '8.0', '8.1', '8.2']
11+
php: ['8.0', '8.1', '8.2']
1212
steps:
1313
- uses: actions/checkout@v1
1414

app/Config/app.php

Lines changed: 13 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
* Do not edit this file unless you're happy to maintain any changes yourself.
99
*/
1010

11+
use Illuminate\Support\Facades\Facade;
12+
1113
return [
1214

1315
// The environment to run BookStack in.
@@ -98,7 +100,13 @@
98100
// Encryption cipher
99101
'cipher' => 'AES-256-CBC',
100102

101-
// Application Services Provides
103+
// Maintenance Mode Driver
104+
'maintenance' => [
105+
'driver' => 'file',
106+
// 'store' => 'redis',
107+
],
108+
109+
// Application Service Providers
102110
'providers' => [
103111

104112
// Laravel Framework Service Providers...
@@ -141,58 +149,9 @@
141149
BookStack\Providers\ViewTweaksServiceProvider::class,
142150
],
143151

144-
/*
145-
|--------------------------------------------------------------------------
146-
| Class Aliases
147-
|--------------------------------------------------------------------------
148-
|
149-
| This array of class aliases will be registered when this application
150-
| is started. However, feel free to register as many as you wish as
151-
| the aliases are "lazy" loaded so they don't hinder performance.
152-
|
153-
*/
154-
155-
// Class aliases, Registered on application start
156-
'aliases' => [
157-
// Laravel
158-
'App' => Illuminate\Support\Facades\App::class,
159-
'Arr' => Illuminate\Support\Arr::class,
160-
'Artisan' => Illuminate\Support\Facades\Artisan::class,
161-
'Auth' => Illuminate\Support\Facades\Auth::class,
162-
'Blade' => Illuminate\Support\Facades\Blade::class,
163-
'Bus' => Illuminate\Support\Facades\Bus::class,
164-
'Cache' => Illuminate\Support\Facades\Cache::class,
165-
'Config' => Illuminate\Support\Facades\Config::class,
166-
'Cookie' => Illuminate\Support\Facades\Cookie::class,
167-
'Crypt' => Illuminate\Support\Facades\Crypt::class,
168-
'Date' => Illuminate\Support\Facades\Date::class,
169-
'DB' => Illuminate\Support\Facades\DB::class,
170-
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
171-
'Event' => Illuminate\Support\Facades\Event::class,
172-
'File' => Illuminate\Support\Facades\File::class,
173-
'Gate' => Illuminate\Support\Facades\Gate::class,
174-
'Hash' => Illuminate\Support\Facades\Hash::class,
175-
'Http' => Illuminate\Support\Facades\Http::class,
176-
'Lang' => Illuminate\Support\Facades\Lang::class,
177-
'Log' => Illuminate\Support\Facades\Log::class,
178-
'Mail' => Illuminate\Support\Facades\Mail::class,
179-
'Notification' => Illuminate\Support\Facades\Notification::class,
180-
'Password' => Illuminate\Support\Facades\Password::class,
181-
'Queue' => Illuminate\Support\Facades\Queue::class,
182-
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
183-
'Redirect' => Illuminate\Support\Facades\Redirect::class,
184-
// 'Redis' => Illuminate\Support\Facades\Redis::class,
185-
'Request' => Illuminate\Support\Facades\Request::class,
186-
'Response' => Illuminate\Support\Facades\Response::class,
187-
'Route' => Illuminate\Support\Facades\Route::class,
188-
'Schema' => Illuminate\Support\Facades\Schema::class,
189-
'Session' => Illuminate\Support\Facades\Session::class,
190-
'Storage' => Illuminate\Support\Facades\Storage::class,
191-
'Str' => Illuminate\Support\Str::class,
192-
'URL' => Illuminate\Support\Facades\URL::class,
193-
'Validator' => Illuminate\Support\Facades\Validator::class,
194-
'View' => Illuminate\Support\Facades\View::class,
195-
152+
// Class Aliases
153+
// This array of class aliases to be registered on application start.
154+
'aliases' => Facade::defaultAliases()->merge([
196155
// Laravel Packages
197156
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
198157

@@ -202,7 +161,7 @@
202161
// Custom BookStack
203162
'Activity' => BookStack\Facades\Activity::class,
204163
'Theme' => BookStack\Facades\Theme::class,
205-
],
164+
])->toArray(),
206165

207166
// Proxy configuration
208167
'proxies' => env('APP_PROXIES', ''),

app/Config/broadcasting.php

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -14,29 +14,15 @@
1414
// This option controls the default broadcaster that will be used by the
1515
// framework when an event needs to be broadcast. This can be set to
1616
// any of the connections defined in the "connections" array below.
17-
'default' => env('BROADCAST_DRIVER', 'pusher'),
17+
'default' => 'null',
1818

1919
// Broadcast Connections
2020
// Here you may define all of the broadcast connections that will be used
2121
// to broadcast events to other systems or over websockets. Samples of
2222
// each available type of connection are provided inside this array.
2323
'connections' => [
2424

25-
'pusher' => [
26-
'driver' => 'pusher',
27-
'key' => env('PUSHER_APP_KEY'),
28-
'secret' => env('PUSHER_APP_SECRET'),
29-
'app_id' => env('PUSHER_APP_ID'),
30-
'options' => [
31-
'cluster' => env('PUSHER_APP_CLUSTER'),
32-
'useTLS' => true,
33-
],
34-
],
35-
36-
'redis' => [
37-
'driver' => 'redis',
38-
'connection' => 'default',
39-
],
25+
// Default options removed since we don't use broadcasting.
4026

4127
'log' => [
4228
'driver' => 'log',

app/Config/cache.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,6 @@
8787
|
8888
*/
8989

90-
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
90+
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),
9191

9292
];

app/Config/filesystems.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,20 @@
3333
'driver' => 'local',
3434
'root' => public_path(),
3535
'visibility' => 'public',
36+
'throw' => true,
3637
],
3738

3839
'local_secure_attachments' => [
3940
'driver' => 'local',
4041
'root' => storage_path('uploads/files/'),
42+
'throw' => true,
4143
],
4244

4345
'local_secure_images' => [
4446
'driver' => 'local',
4547
'root' => storage_path('uploads/images/'),
4648
'visibility' => 'public',
49+
'throw' => true,
4750
],
4851

4952
's3' => [
@@ -54,6 +57,7 @@
5457
'bucket' => env('STORAGE_S3_BUCKET', 'your-bucket'),
5558
'endpoint' => env('STORAGE_S3_ENDPOINT', null),
5659
'use_path_style_endpoint' => env('STORAGE_S3_ENDPOINT', null) !== null,
60+
'throw' => true,
5761
],
5862

5963
],

app/Config/logging.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,15 @@
2121
// one of the channels defined in the "channels" configuration array.
2222
'default' => env('LOG_CHANNEL', 'single'),
2323

24+
// Deprecations Log Channel
25+
// This option controls the log channel that should be used to log warnings
26+
// regarding deprecated PHP and library features. This allows you to get
27+
// your application ready for upcoming major versions of dependencies.
28+
'deprecations' => [
29+
'channel' => 'null',
30+
'trace' => false,
31+
],
32+
2433
// Log Channels
2534
// Here you may configure the log channels for your application. Out of
2635
// the box, Laravel uses the Monolog PHP logging library. This gives

app/Config/mail.php

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -14,31 +14,50 @@
1414
// From Laravel 7+ this is MAIL_MAILER in laravel.
1515
// Kept as MAIL_DRIVER in BookStack to prevent breaking change.
1616
// Options: smtp, sendmail, log, array
17-
'driver' => env('MAIL_DRIVER', 'smtp'),
18-
19-
// SMTP host address
20-
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
21-
22-
// SMTP host port
23-
'port' => env('MAIL_PORT', 587),
17+
'default' => env('MAIL_DRIVER', 'smtp'),
2418

2519
// Global "From" address & name
2620
'from' => [
2721
'address' => env('MAIL_FROM', 'mail@bookstackapp.com'),
2822
'name' => env('MAIL_FROM_NAME', 'BookStack'),
2923
],
3024

31-
// Email encryption protocol
32-
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
25+
// Mailer Configurations
26+
// Available mailing methods and their settings.
27+
'mailers' => [
28+
'smtp' => [
29+
'transport' => 'smtp',
30+
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
31+
'port' => env('MAIL_PORT', 587),
32+
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
33+
'username' => env('MAIL_USERNAME'),
34+
'password' => env('MAIL_PASSWORD'),
35+
'timeout' => null,
36+
'local_domain' => env('MAIL_EHLO_DOMAIN'),
37+
],
3338

34-
// SMTP server username
35-
'username' => env('MAIL_USERNAME'),
39+
'sendmail' => [
40+
'transport' => 'sendmail',
41+
'path' => '/usr/sbin/sendmail -bs',
42+
],
3643

37-
// SMTP server password
38-
'password' => env('MAIL_PASSWORD'),
44+
'log' => [
45+
'transport' => 'log',
46+
'channel' => env('MAIL_LOG_CHANNEL'),
47+
],
3948

40-
// Sendmail application path
41-
'sendmail' => '/usr/sbin/sendmail -bs',
49+
'array' => [
50+
'transport' => 'array',
51+
],
52+
53+
'failover' => [
54+
'transport' => 'failover',
55+
'mailers' => [
56+
'smtp',
57+
'log',
58+
],
59+
],
60+
],
4261

4362
// Email markdown configuration
4463
'markdown' => [
@@ -47,11 +66,4 @@
4766
resource_path('views/vendor/mail'),
4867
],
4968
],
50-
51-
// Log Channel
52-
// If you are using the "log" driver, you may specify the logging channel
53-
// if you prefer to keep mail messages separate from other log entries
54-
// for simpler reading. Otherwise, the default channel will be used.
55-
'log_channel' => env('MAIL_LOG_CHANNEL'),
56-
5769
];

app/Exceptions/Handler.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ class Handler extends ExceptionHandler
1717
/**
1818
* A list of the exception types that are not reported.
1919
*
20-
* @var array
20+
* @var array<int, class-string<\Throwable>>
2121
*/
2222
protected $dontReport = [
2323
NotFoundException::class,
2424
StoppedAuthenticationException::class,
2525
];
2626

2727
/**
28-
* A list of the inputs that are never flashed for validation exceptions.
28+
* A list of the inputs that are never flashed to the session on validation exceptions.
2929
*
30-
* @var array
30+
* @var array<int, string>
3131
*/
3232
protected $dontFlash = [
3333
'current_password',

app/Providers/EventServiceProvider.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,22 @@ class EventServiceProvider extends ServiceProvider
2424
];
2525

2626
/**
27-
* Register any other events for your application.
27+
* Register any events for your application.
2828
*
2929
* @return void
3030
*/
3131
public function boot()
3232
{
33+
//
34+
}
35+
36+
/**
37+
* Determine if events and listeners should be automatically discovered.
38+
*
39+
* @return bool
40+
*/
41+
public function shouldDiscoverEvents()
42+
{
43+
return false;
3344
}
3445
}

0 commit comments

Comments
 (0)