Update laravel framework to v8

This commit is contained in:
Daniel Supernault 2020-12-13 14:15:30 -07:00
parent b69aa4af3c
commit 8aa5d42d8b
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
6 changed files with 2128 additions and 1522 deletions

View File

@ -22,6 +22,7 @@ use Auth, Horizon, URL;
use Illuminate\Support\Facades\Blade;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Illuminate\Pagination\Paginator;
class AppServiceProvider extends ServiceProvider
{
@ -35,6 +36,8 @@ class AppServiceProvider extends ServiceProvider
URL::forceScheme('https');
Schema::defaultStringLength(191);
Paginator::useBootstrap();
Avatar::observe(AvatarObserver::class);
Notification::observe(NotificationObserver::class);
ModLog::observe(ModLogObserver::class);
@ -47,17 +50,7 @@ class AppServiceProvider extends ServiceProvider
});
Blade::directive('prettyNumber', function ($expression) {
$num = $expression;
$abbrevs = [12 => 'T', 9 => 'B', 6 => 'M', 3 => 'K', 0 => ''];
foreach ($abbrevs as $exponent => $abbrev) {
if ($expression >= pow(10, $exponent)) {
$display_num = $expression / pow(10, $exponent);
$num = number_format($display_num, 0).$abbrev;
return "<?php echo '$num'; ?>";
}
}
$num = \App\Util\Lexer\PrettyNumber::convert($expression);
return "<?php echo $num; ?>";
});

View File

@ -5,7 +5,7 @@
"license": "AGPL-3.0-only",
"type": "project",
"require": {
"php": "^7.2",
"php": "^7.3",
"ext-bcmath": "*",
"ext-ctype": "*",
"ext-curl": "*",
@ -21,10 +21,10 @@
"fruitcake/laravel-cors": "^2.0",
"intervention/image": "^2.4",
"jenssegers/agent": "^2.6",
"laravel/framework": "^7.0",
"laravel/framework": "^8.0",
"laravel/helpers": "^1.1",
"laravel/horizon": "^4.0",
"laravel/passport": "^8.0",
"laravel/horizon": "^5.0",
"laravel/passport": "^10.0",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.0",
"league/flysystem-aws-s3-v3": "~1.0",
@ -44,11 +44,11 @@
"symfony/http-kernel": "5.1.5"
},
"require-dev": {
"facade/ignition": "^2.0",
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
"nunomaduro/collision": "^5.0",
"phpunit/phpunit": "^9.0"
},
"autoload": {
"classmap": [

3553
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddUuidsToFailedJobsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->string('uuid')->after('id')->nullable()->unique();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('failed_jobs', function (Blueprint $table) {
$table->dropColumn('uuid');
});
}
}

View File

@ -0,0 +1,32 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
class AddProvidersColumnToOauthClientsTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('oauth_clients', function (Blueprint $table) {
$table->string('provider')->after('secret')->nullable();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('oauth_clients', function (Blueprint $table) {
$table->dropColumn('provider');
});
}
}

View File

@ -7,6 +7,10 @@
*/
define('LARAVEL_START', microtime(true));
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
require __DIR__.'/../storage/framework/maintenance.php';
}
/*
|--------------------------------------------------------------------------
| Register The Auto Loader