1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2024-11-25 12:22:30 +01:00

Followed Laravel 9 update steps and file changes

This commit is contained in:
Dan Brown 2023-02-06 16:58:29 +00:00
parent 6e6f113336
commit 008e7a4d25
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
604 changed files with 1670 additions and 2507 deletions

View File

@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
php: ['7.4', '8.0', '8.1', '8.2']
php: ['8.0', '8.1', '8.2']
steps:
- uses: actions/checkout@v1

View File

@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
php: ['7.4', '8.0', '8.1', '8.2']
php: ['8.0', '8.1', '8.2']
steps:
- uses: actions/checkout@v1

View File

@ -8,6 +8,8 @@
* Do not edit this file unless you're happy to maintain any changes yourself.
*/
use Illuminate\Support\Facades\Facade;
return [
// The environment to run BookStack in.
@ -98,7 +100,13 @@ return [
// Encryption cipher
'cipher' => 'AES-256-CBC',
// Application Services Provides
// Maintenance Mode Driver
'maintenance' => [
'driver' => 'file',
// 'store' => 'redis',
],
// Application Service Providers
'providers' => [
// Laravel Framework Service Providers...
@ -141,58 +149,9 @@ return [
BookStack\Providers\ViewTweaksServiceProvider::class,
],
/*
|--------------------------------------------------------------------------
| Class Aliases
|--------------------------------------------------------------------------
|
| This array of class aliases will be registered when this application
| is started. However, feel free to register as many as you wish as
| the aliases are "lazy" loaded so they don't hinder performance.
|
*/
// Class aliases, Registered on application start
'aliases' => [
// Laravel
'App' => Illuminate\Support\Facades\App::class,
'Arr' => Illuminate\Support\Arr::class,
'Artisan' => Illuminate\Support\Facades\Artisan::class,
'Auth' => Illuminate\Support\Facades\Auth::class,
'Blade' => Illuminate\Support\Facades\Blade::class,
'Bus' => Illuminate\Support\Facades\Bus::class,
'Cache' => Illuminate\Support\Facades\Cache::class,
'Config' => Illuminate\Support\Facades\Config::class,
'Cookie' => Illuminate\Support\Facades\Cookie::class,
'Crypt' => Illuminate\Support\Facades\Crypt::class,
'Date' => Illuminate\Support\Facades\Date::class,
'DB' => Illuminate\Support\Facades\DB::class,
'Eloquent' => Illuminate\Database\Eloquent\Model::class,
'Event' => Illuminate\Support\Facades\Event::class,
'File' => Illuminate\Support\Facades\File::class,
'Gate' => Illuminate\Support\Facades\Gate::class,
'Hash' => Illuminate\Support\Facades\Hash::class,
'Http' => Illuminate\Support\Facades\Http::class,
'Lang' => Illuminate\Support\Facades\Lang::class,
'Log' => Illuminate\Support\Facades\Log::class,
'Mail' => Illuminate\Support\Facades\Mail::class,
'Notification' => Illuminate\Support\Facades\Notification::class,
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::class,
'RateLimiter' => Illuminate\Support\Facades\RateLimiter::class,
'Redirect' => Illuminate\Support\Facades\Redirect::class,
// 'Redis' => Illuminate\Support\Facades\Redis::class,
'Request' => Illuminate\Support\Facades\Request::class,
'Response' => Illuminate\Support\Facades\Response::class,
'Route' => Illuminate\Support\Facades\Route::class,
'Schema' => Illuminate\Support\Facades\Schema::class,
'Session' => Illuminate\Support\Facades\Session::class,
'Storage' => Illuminate\Support\Facades\Storage::class,
'Str' => Illuminate\Support\Str::class,
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
// Class Aliases
// This array of class aliases to be registered on application start.
'aliases' => Facade::defaultAliases()->merge([
// Laravel Packages
'Socialite' => Laravel\Socialite\Facades\Socialite::class,
@ -202,7 +161,7 @@ return [
// Custom BookStack
'Activity' => BookStack\Facades\Activity::class,
'Theme' => BookStack\Facades\Theme::class,
],
])->toArray(),
// Proxy configuration
'proxies' => env('APP_PROXIES', ''),

View File

@ -14,7 +14,7 @@ return [
// This option controls the default broadcaster that will be used by the
// framework when an event needs to be broadcast. This can be set to
// any of the connections defined in the "connections" array below.
'default' => env('BROADCAST_DRIVER', 'pusher'),
'default' => 'null',
// Broadcast Connections
// Here you may define all of the broadcast connections that will be used
@ -22,21 +22,7 @@ return [
// each available type of connection are provided inside this array.
'connections' => [
'pusher' => [
'driver' => 'pusher',
'key' => env('PUSHER_APP_KEY'),
'secret' => env('PUSHER_APP_SECRET'),
'app_id' => env('PUSHER_APP_ID'),
'options' => [
'cluster' => env('PUSHER_APP_CLUSTER'),
'useTLS' => true,
],
],
'redis' => [
'driver' => 'redis',
'connection' => 'default',
],
// Default options removed since we don't use broadcasting.
'log' => [
'driver' => 'log',

View File

@ -87,6 +87,6 @@ return [
|
*/
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache'),
'prefix' => env('CACHE_PREFIX', Str::slug(env('APP_NAME', 'laravel'), '_') . '_cache_'),
];

View File

@ -33,17 +33,20 @@ return [
'driver' => 'local',
'root' => public_path(),
'visibility' => 'public',
'throw' => true,
],
'local_secure_attachments' => [
'driver' => 'local',
'root' => storage_path('uploads/files/'),
'throw' => true,
],
'local_secure_images' => [
'driver' => 'local',
'root' => storage_path('uploads/images/'),
'visibility' => 'public',
'throw' => true,
],
's3' => [
@ -54,6 +57,7 @@ return [
'bucket' => env('STORAGE_S3_BUCKET', 'your-bucket'),
'endpoint' => env('STORAGE_S3_ENDPOINT', null),
'use_path_style_endpoint' => env('STORAGE_S3_ENDPOINT', null) !== null,
'throw' => true,
],
],

View File

@ -21,6 +21,15 @@ return [
// one of the channels defined in the "channels" configuration array.
'default' => env('LOG_CHANNEL', 'single'),
// Deprecations Log Channel
// This option controls the log channel that should be used to log warnings
// regarding deprecated PHP and library features. This allows you to get
// your application ready for upcoming major versions of dependencies.
'deprecations' => [
'channel' => 'null',
'trace' => false,
],
// Log Channels
// Here you may configure the log channels for your application. Out of
// the box, Laravel uses the Monolog PHP logging library. This gives

View File

@ -14,13 +14,7 @@ return [
// From Laravel 7+ this is MAIL_MAILER in laravel.
// Kept as MAIL_DRIVER in BookStack to prevent breaking change.
// Options: smtp, sendmail, log, array
'driver' => env('MAIL_DRIVER', 'smtp'),
// SMTP host address
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
// SMTP host port
'port' => env('MAIL_PORT', 587),
'default' => env('MAIL_DRIVER', 'smtp'),
// Global "From" address & name
'from' => [
@ -28,17 +22,42 @@ return [
'name' => env('MAIL_FROM_NAME', 'BookStack'),
],
// Email encryption protocol
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
// Mailer Configurations
// Available mailing methods and their settings.
'mailers' => [
'smtp' => [
'transport' => 'smtp',
'host' => env('MAIL_HOST', 'smtp.mailgun.org'),
'port' => env('MAIL_PORT', 587),
'encryption' => env('MAIL_ENCRYPTION', 'tls'),
'username' => env('MAIL_USERNAME'),
'password' => env('MAIL_PASSWORD'),
'timeout' => null,
'local_domain' => env('MAIL_EHLO_DOMAIN'),
],
// SMTP server username
'username' => env('MAIL_USERNAME'),
'sendmail' => [
'transport' => 'sendmail',
'path' => '/usr/sbin/sendmail -bs',
],
// SMTP server password
'password' => env('MAIL_PASSWORD'),
'log' => [
'transport' => 'log',
'channel' => env('MAIL_LOG_CHANNEL'),
],
// Sendmail application path
'sendmail' => '/usr/sbin/sendmail -bs',
'array' => [
'transport' => 'array',
],
'failover' => [
'transport' => 'failover',
'mailers' => [
'smtp',
'log',
],
],
],
// Email markdown configuration
'markdown' => [
@ -47,11 +66,4 @@ return [
resource_path('views/vendor/mail'),
],
],
// Log Channel
// If you are using the "log" driver, you may specify the logging channel
// if you prefer to keep mail messages separate from other log entries
// for simpler reading. Otherwise, the default channel will be used.
'log_channel' => env('MAIL_LOG_CHANNEL'),
];

View File

@ -17,7 +17,7 @@ class Handler extends ExceptionHandler
/**
* A list of the exception types that are not reported.
*
* @var array
* @var array<int, class-string<\Throwable>>
*/
protected $dontReport = [
NotFoundException::class,
@ -25,9 +25,9 @@ class Handler extends ExceptionHandler
];
/**
* A list of the inputs that are never flashed for validation exceptions.
* A list of the inputs that are never flashed to the session on validation exceptions.
*
* @var array
* @var array<int, string>
*/
protected $dontFlash = [
'current_password',

View File

@ -24,11 +24,22 @@ class EventServiceProvider extends ServiceProvider
];
/**
* Register any other events for your application.
* Register any events for your application.
*
* @return void
*/
public function boot()
{
//
}
/**
* Determine if events and listeners should be automatically discovered.
*
* @return bool
*/
public function shouldDiscoverEvents()
{
return false;
}
}

View File

@ -77,7 +77,7 @@ class RouteServiceProvider extends ServiceProvider
protected function configureRateLimiting()
{
RateLimiter::for('api', function (Request $request) {
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
});
}
}

View File

@ -8,7 +8,7 @@
"license": "MIT",
"type": "project",
"require": {
"php": "^7.4|^8.0",
"php": "^8.0.2",
"ext-curl": "*",
"ext-dom": "*",
"ext-fileinfo": "*",
@ -19,36 +19,35 @@
"bacon/bacon-qr-code": "^2.0",
"barryvdh/laravel-dompdf": "^2.0",
"barryvdh/laravel-snappy": "^1.0",
"doctrine/dbal": "^3.1",
"doctrine/dbal": "^3.5",
"filp/whoops": "^2.14",
"guzzlehttp/guzzle": "^7.4",
"intervention/image": "^2.7",
"laravel/framework": "^8.68",
"laravel/framework": "^9.0",
"laravel/socialite": "^5.2",
"laravel/tinker": "^2.6",
"league/commonmark": "^1.6",
"league/flysystem-aws-s3-v3": "^1.0.29",
"league/commonmark": "^2.3",
"league/flysystem-aws-s3-v3": "^3.0",
"league/html-to-markdown": "^5.0.0",
"league/oauth2-client": "^2.6",
"onelogin/php-saml": "^4.0",
"phpseclib/phpseclib": "~3.0",
"phpseclib/phpseclib": "^3.0",
"pragmarx/google2fa": "^8.0",
"predis/predis": "^1.1",
"socialiteproviders/discord": "^4.1",
"socialiteproviders/gitlab": "^4.1",
"socialiteproviders/microsoft-azure": "^5.0.1",
"socialiteproviders/okta": "^4.1",
"socialiteproviders/microsoft-azure": "^5.1",
"socialiteproviders/okta": "^4.2",
"socialiteproviders/slack": "^4.1",
"socialiteproviders/twitch": "^5.3",
"ssddanbrown/htmldiff": "^1.0.2"
},
"require-dev": {
"brianium/paratest": "^6.6",
"fakerphp/faker": "^1.16",
"fakerphp/faker": "^1.21",
"itsgoingd/clockwork": "^5.1",
"mockery/mockery": "^1.4",
"nunomaduro/collision": "^5.10",
"nunomaduro/larastan": "^1.0",
"mockery/mockery": "^1.5",
"nunomaduro/collision": "^6.4",
"nunomaduro/larastan": "^2.4",
"phpunit/phpunit": "^9.5",
"squizlabs/php_codesniffer": "^3.7",
"ssddanbrown/asserthtml": "^1.0"
@ -102,7 +101,7 @@
"preferred-install": "dist",
"sort-packages": true,
"platform": {
"php": "7.4.0"
"php": "8.0.2"
}
},
"extra": {
@ -110,6 +109,6 @@
"dont-discover": []
}
},
"minimum-stability": "dev",
"minimum-stability": "stable",
"prefer-stable": true
}

3648
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -5,6 +5,6 @@ pull_request_title: Updated translations with latest Crowdin changes
pull_request_labels:
- ":earth_africa: Translations"
files:
- source: /resources/lang/en/*.php
translation: /resources/lang/%two_letters_code%/%original_file_name%
- source: /lang/en/*.php
translation: /lang/%two_letters_code%/%original_file_name%
type: php

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateUsersTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -40,4 +40,4 @@ class CreateUsersTable extends Migration
{
Schema::drop('users');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePasswordResetsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -28,4 +28,4 @@ class CreatePasswordResetsTable extends Migration
{
Schema::drop('password_resets');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateBooksTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -30,4 +30,4 @@ class CreateBooksTable extends Migration
{
Schema::drop('books');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePagesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -34,4 +34,4 @@ class CreatePagesTable extends Migration
{
Schema::drop('pages');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateImagesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class CreateImagesTable extends Migration
{
Schema::drop('images');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateChaptersTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -32,4 +32,4 @@ class CreateChaptersTable extends Migration
{
Schema::drop('chapters');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddUsersToEntities extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -54,4 +54,4 @@ class AddUsersToEntities extends Migration
$table->dropColumn('updated_by');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreatePageRevisionsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -32,4 +32,4 @@ class CreatePageRevisionsTable extends Migration
{
Schema::drop('page_revisions');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateActivitiesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -33,4 +33,4 @@ class CreateActivitiesTable extends Migration
{
Schema::drop('activities');
}
}
};

View File

@ -1,8 +1,5 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
/**
* Much of this code has been taken from entrust,
* a role & permission management solution for Laravel.
@ -12,7 +9,11 @@ use Illuminate\Database\Schema\Blueprint;
* @license MIT
* @url https://github.com/Zizaco/entrust
*/
class AddRolesAndPermissions extends Migration
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
return new class extends Migration
{
/**
* Run the migrations.
@ -147,4 +148,4 @@ class AddRolesAndPermissions extends Migration
Schema::drop('role_user');
Schema::drop('roles');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSettingsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -28,4 +28,4 @@ class CreateSettingsTable extends Migration
{
Schema::drop('settings');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddSearchIndexes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -51,4 +51,4 @@ class AddSearchIndexes extends Migration
});
}
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateSocialAccountsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -31,4 +31,4 @@ class CreateSocialAccountsTable extends Migration
{
Schema::drop('social_accounts');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddEmailConfirmationTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -36,4 +36,4 @@ class AddEmailConfirmationTable extends Migration
});
Schema::drop('email_confirmations');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateViewsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -31,4 +31,4 @@ class CreateViewsTable extends Migration
{
Schema::drop('views');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddEntityIndexes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -86,4 +86,4 @@ class AddEntityIndexes extends Migration
$table->dropIndex('views_viewable_id_index');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class FulltextWeighting extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -51,4 +51,4 @@ class FulltextWeighting extends Migration
});
}
}
}
};

View File

@ -4,7 +4,7 @@ use BookStack\Uploads\Image;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddImageUploadTypes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -37,4 +37,4 @@ class AddImageUploadTypes extends Migration
$table->dropColumn('path');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddUserAvatars extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -28,4 +28,4 @@ class AddUserAvatars extends Migration
$table->dropColumn('image_id');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddExternalAuthToUsers extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -28,4 +28,4 @@ class AddExternalAuthToUsers extends Migration
$table->dropColumn('external_auth_id');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddSlugToRevisions extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -32,4 +32,4 @@ class AddSlugToRevisions extends Migration
$table->dropColumn('book_slug');
});
}
}
};

View File

@ -2,7 +2,7 @@
use Illuminate\Database\Migrations\Migration;
class UpdatePermissionsAndRoles extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -113,4 +113,4 @@ class UpdatePermissionsAndRoles extends Migration
}
}
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddEntityAccessControls extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -69,4 +69,4 @@ class AddEntityAccessControls extends Migration
Schema::drop('restrictions');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddPageRevisionTypes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddPageRevisionTypes extends Migration
$table->dropColumn('type');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddPageDrafts extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddPageDrafts extends Migration
$table->dropColumn('draft');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class AddMarkdownSupport extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -36,4 +36,4 @@ class AddMarkdownSupport extends Migration
$table->dropColumn('markdown');
});
}
}
};

View File

@ -2,7 +2,7 @@
use Illuminate\Database\Migrations\Migration;
class AddViewPermissionsToRoles extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -54,4 +54,4 @@ class AddViewPermissionsToRoles extends Migration
}
}
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Str;
class CreateJointPermissionsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -97,4 +97,4 @@ class CreateJointPermissionsTable extends Migration
$table->dropColumn('hidden');
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
class CreateTagsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -37,4 +37,4 @@ class CreateTagsTable extends Migration
{
Schema::drop('tags');
}
}
};

View File

@ -2,7 +2,7 @@
use Illuminate\Database\Migrations\Migration;
class AddSummaryToPageRevisions extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -27,4 +27,4 @@ class AddSummaryToPageRevisions extends Migration
$table->dropColumn('summary');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class RemoveHiddenRoles extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -63,4 +63,4 @@ class RemoveHiddenRoles extends Migration
DB::table('roles')->where('system_name', '=', 'public')->update(['hidden' => true]);
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateAttachmentsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -67,4 +67,4 @@ class CreateAttachmentsTable extends Migration
DB::table('role_permissions')->where('name', '=', $permName)->delete();
}
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCacheTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class CreateCacheTable extends Migration
{
Schema::dropIfExists('cache');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSessionsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -32,4 +32,4 @@ class CreateSessionsTable extends Migration
{
Schema::dropIfExists('sessions');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateSearchIndexTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -73,4 +73,4 @@ class CreateSearchIndexTable extends Migration
Schema::dropIfExists('search_terms');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddRevisionCounts extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -41,4 +41,4 @@ class AddRevisionCounts extends Migration
$table->dropColumn('revision_number');
});
}
}
};

View File

@ -2,7 +2,7 @@
use Illuminate\Database\Migrations\Migration;
class UpdateDbEncodingToUt8mb4 extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -25,4 +25,4 @@ class UpdateDbEncodingToUt8mb4 extends Migration
{
//
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateCommentsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -64,4 +64,4 @@ class CreateCommentsTable extends Migration
DB::table('role_permissions')->where('name', '=', $permName)->delete();
}
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddCoverImageDisplay extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddCoverImageDisplay extends Migration
$table->dropColumn('image_id');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddRoleExternalAuthId extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -30,4 +30,4 @@ class AddRoleExternalAuthId extends Migration
$table->dropColumn('external_auth_id');
});
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class CreateBookshelvesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -128,4 +128,4 @@ class CreateBookshelvesTable extends Migration
DB::table('search_terms')->where('entity_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
DB::table('comments')->where('entity_type', '=', 'BookStack\Entities\Models\Bookshelf')->delete();
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddTemplateSupport extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -51,4 +51,4 @@ class AddTemplateSupport extends Migration
DB::table('permission_role')->where('permission_id', '=', $templatesManagePermission->id)->delete();
DB::table('role_permissions')->where('name', '=', 'templates-manage')->delete();
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddUserInvitesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -30,4 +30,4 @@ class AddUserInvitesTable extends Migration
{
Schema::dropIfExists('user_invites');
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Schema;
class AddApiAuth extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -57,4 +57,4 @@ class AddApiAuth extends Migration
DB::table('permission_role')->where('permission_id', '=', $apiAccessPermission->id)->delete();
DB::table('role_permissions')->where('name', '=', 'access-api')->delete();
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class DropJointPermissionsId extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -34,4 +34,4 @@ class DropJointPermissionsId extends Migration
$table->increments('id')->unsigned();
});
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class RemoveRoleNameField extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -34,4 +34,4 @@ class RemoveRoleNameField extends Migration
'name' => DB::raw("lower(replace(`display_name`, ' ', '-'))"),
]);
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddActivityIndexes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -31,4 +31,4 @@ class AddActivityIndexes extends Migration
$table->dropIndex('activities_created_at_index');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddEntitySoftDeletes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -47,4 +47,4 @@ class AddEntitySoftDeletes extends Migration
$table->dropSoftDeletes();
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateDeletionsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -35,4 +35,4 @@ class CreateDeletionsTable extends Migration
{
Schema::dropIfExists('deletions');
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class SimplifyActivitiesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -55,4 +55,4 @@ class SimplifyActivitiesTable extends Migration
$table->index('book_id');
});
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class AddOwnedByFieldToEntities extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -46,4 +46,4 @@ class AddOwnedByFieldToEntities extends Migration
$table->renameColumn('owned_by', 'created_by');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddSettingsTypeColumn extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddSettingsTypeColumn extends Migration
$table->dropColumn('type');
});
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Str;
class AddUserSlug extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -47,4 +47,4 @@ class AddUserSlug extends Migration
$table->dropColumn('slug');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFavouritesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -33,4 +33,4 @@ class CreateFavouritesTable extends Migration
{
Schema::dropIfExists('favourites');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateMfaValuesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -31,4 +31,4 @@ class CreateMfaValuesTable extends Migration
{
Schema::dropIfExists('mfa_values');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddMfaEnforcedToRolesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddMfaEnforcedToRolesTable extends Migration
$table->dropColumn('mfa_enforced');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Carbon\Carbon;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class AddExportRolePermission extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -46,4 +46,4 @@ class AddExportRolePermission extends Migration
DB::table('permission_role')->where('permission_id', '=', $contentExportPermission->id)->delete();
DB::table('role_permissions')->where('id', '=', 'content-export')->delete();
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddActivitiesIpColumn extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddActivitiesIpColumn extends Migration
$table->dropColumn('ip');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddIndexForUserIp extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -29,4 +29,4 @@ class AddIndexForUserIp extends Migration
$table->dropIndex('activities_ip_index');
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateWebhooksTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -45,4 +45,4 @@ class CreateWebhooksTable extends Migration
Schema::dropIfExists('webhooks');
Schema::dropIfExists('webhook_tracked_events');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateJobsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -33,4 +33,4 @@ class CreateJobsTable extends Migration
{
Schema::dropIfExists('jobs');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateFailedJobsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -33,4 +33,4 @@ class CreateFailedJobsTable extends Migration
{
Schema::dropIfExists('failed_jobs');
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddWebhooksTimeoutErrorColumns extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -35,4 +35,4 @@ class AddWebhooksTimeoutErrorColumns extends Migration
$table->dropColumn('last_errored_at');
});
}
}
};

View File

@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class AddEditorChangeFieldAndPermission extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -59,4 +59,4 @@ class AddEditorChangeFieldAndPermission extends Migration
// Remove traces of the role permission
DB::table('role_permissions')->where('name', '=', 'editor-change')->delete();
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class UpdatePolymorphicTypes extends Migration
return new class extends Migration
{
/**
* Mapping of old polymorphic types to new simpler values.
@ -61,4 +61,4 @@ class UpdatePolymorphicTypes extends Migration
}
}
}
}
};

View File

@ -5,7 +5,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class DropJointPermissionType extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -38,4 +38,4 @@ class DropJointPermissionType extends Migration
$table->primary(['role_id', 'entity_type', 'entity_id', 'action']);
});
}
}
};

View File

@ -4,7 +4,7 @@ use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class CreateReferencesTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -31,4 +31,4 @@ class CreateReferencesTable extends Migration
{
Schema::dropIfExists('references');
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class FixShelfCoverImageTypes extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -41,4 +41,4 @@ class FixShelfCoverImageTypes extends Migration
->where('type', '=', 'cover_bookshelf')
->update(['type' => 'cover_book']);
}
}
};

View File

@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class FlattenEntityPermissionsTable extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -102,4 +102,4 @@ class FlattenEntityPermissionsTable extends Migration
Schema::dropIfExists('entity_permissions');
Schema::rename('old_entity_permissions', 'entity_permissions');
}
}
};

View File

@ -7,7 +7,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class DropEntityRestrictedField extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -90,4 +90,4 @@ class DropEntityRestrictedField extends Migration
// Delete default entity permissions
DB::table('entity_permissions')->where('role_id', '=', 0)->delete();
}
}
};

View File

@ -6,7 +6,7 @@ use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Schema;
class RefactorJointPermissionsStorage extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -49,4 +49,4 @@ class RefactorJointPermissionsStorage extends Migration
$table->unsignedInteger('owned_by')->index();
});
}
}
};

View File

@ -3,7 +3,7 @@
use Illuminate\Database\Migrations\Migration;
use Illuminate\Support\Facades\DB;
class CopyColorSettingsForDarkMode extends Migration
return new class extends Migration
{
/**
* Run the migrations.
@ -66,4 +66,4 @@ class CopyColorSettingsForDarkMode extends Migration
->whereIn('setting_key', $colorSettings)
->delete();
}
}
};

View File

Some files were not shown because too many files have changed in this diff Show More