mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-22 07:42:41 +00:00
Update laravel framework to v8
This commit is contained in:
parent
b69aa4af3c
commit
8aa5d42d8b
6 changed files with 2128 additions and 1522 deletions
|
@ -22,6 +22,7 @@ use Auth, Horizon, URL;
|
||||||
use Illuminate\Support\Facades\Blade;
|
use Illuminate\Support\Facades\Blade;
|
||||||
use Illuminate\Support\Facades\Schema;
|
use Illuminate\Support\Facades\Schema;
|
||||||
use Illuminate\Support\ServiceProvider;
|
use Illuminate\Support\ServiceProvider;
|
||||||
|
use Illuminate\Pagination\Paginator;
|
||||||
|
|
||||||
class AppServiceProvider extends ServiceProvider
|
class AppServiceProvider extends ServiceProvider
|
||||||
{
|
{
|
||||||
|
@ -35,6 +36,8 @@ class AppServiceProvider extends ServiceProvider
|
||||||
URL::forceScheme('https');
|
URL::forceScheme('https');
|
||||||
Schema::defaultStringLength(191);
|
Schema::defaultStringLength(191);
|
||||||
|
|
||||||
|
Paginator::useBootstrap();
|
||||||
|
|
||||||
Avatar::observe(AvatarObserver::class);
|
Avatar::observe(AvatarObserver::class);
|
||||||
Notification::observe(NotificationObserver::class);
|
Notification::observe(NotificationObserver::class);
|
||||||
ModLog::observe(ModLogObserver::class);
|
ModLog::observe(ModLogObserver::class);
|
||||||
|
@ -47,17 +50,7 @@ class AppServiceProvider extends ServiceProvider
|
||||||
});
|
});
|
||||||
|
|
||||||
Blade::directive('prettyNumber', function ($expression) {
|
Blade::directive('prettyNumber', function ($expression) {
|
||||||
$num = $expression;
|
$num = \App\Util\Lexer\PrettyNumber::convert($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'; ?>";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return "<?php echo $num; ?>";
|
return "<?php echo $num; ?>";
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"license": "AGPL-3.0-only",
|
"license": "AGPL-3.0-only",
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^7.2",
|
"php": "^7.3",
|
||||||
"ext-bcmath": "*",
|
"ext-bcmath": "*",
|
||||||
"ext-ctype": "*",
|
"ext-ctype": "*",
|
||||||
"ext-curl": "*",
|
"ext-curl": "*",
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
"fruitcake/laravel-cors": "^2.0",
|
"fruitcake/laravel-cors": "^2.0",
|
||||||
"intervention/image": "^2.4",
|
"intervention/image": "^2.4",
|
||||||
"jenssegers/agent": "^2.6",
|
"jenssegers/agent": "^2.6",
|
||||||
"laravel/framework": "^7.0",
|
"laravel/framework": "^8.0",
|
||||||
"laravel/helpers": "^1.1",
|
"laravel/helpers": "^1.1",
|
||||||
"laravel/horizon": "^4.0",
|
"laravel/horizon": "^5.0",
|
||||||
"laravel/passport": "^8.0",
|
"laravel/passport": "^10.0",
|
||||||
"laravel/tinker": "^2.0",
|
"laravel/tinker": "^2.0",
|
||||||
"laravel/ui": "^2.0",
|
"laravel/ui": "^2.0",
|
||||||
"league/flysystem-aws-s3-v3": "~1.0",
|
"league/flysystem-aws-s3-v3": "~1.0",
|
||||||
|
@ -44,11 +44,11 @@
|
||||||
"symfony/http-kernel": "5.1.5"
|
"symfony/http-kernel": "5.1.5"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"facade/ignition": "^2.0",
|
"facade/ignition": "^2.3.6",
|
||||||
"fzaninotto/faker": "^1.4",
|
"fzaninotto/faker": "^1.4",
|
||||||
"mockery/mockery": "^1.0",
|
"mockery/mockery": "^1.0",
|
||||||
"nunomaduro/collision": "^4.1",
|
"nunomaduro/collision": "^5.0",
|
||||||
"phpunit/phpunit": "^8.5"
|
"phpunit/phpunit": "^9.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"classmap": [
|
"classmap": [
|
||||||
|
|
3553
composer.lock
generated
3553
composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -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');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,10 @@
|
||||||
*/
|
*/
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
|
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
||||||
|
require __DIR__.'/../storage/framework/maintenance.php';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register The Auto Loader
|
| Register The Auto Loader
|
||||||
|
|
Loading…
Reference in a new issue