Upgrade to Laravel 6

This commit is contained in:
Pig Fang 2019-09-10 21:29:14 +08:00
parent 21c28c8b1c
commit deab8be4a8
6 changed files with 245 additions and 225 deletions

View File

@ -4,7 +4,6 @@ namespace App\Http\Controllers;
use Auth;
use Cache;
use Redis;
use Option;
use Notification;
use Carbon\Carbon;
@ -18,6 +17,7 @@ use App\Services\OptionForm;
use Illuminate\Http\Request;
use App\Services\PluginManager;
use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Redis;
class AdminController extends Controller
{
@ -209,11 +209,11 @@ class AdminController extends Controller
$form->text('site_url')
->hint()
->format(function ($url) {
if (ends_with($url, '/')) {
if (Str::endsWith($url, '/')) {
$url = substr($url, 0, -1);
}
if (ends_with($url, '/index.php')) {
if (Str::endsWith($url, '/index.php')) {
$url = substr($url, 0, -10);
}

View File

@ -15,7 +15,7 @@
"ext-json": "*",
"predis/predis": "~1.0",
"doctrine/inflector": "1.1.0",
"laravel/framework": "5.8.*",
"laravel/framework": "^6.0",
"nesbot/carbon": "^2.0",
"composer/semver": "^1.4",
"gregwar/captcha": "1.*",

428
composer.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -212,7 +212,6 @@ return [
'Password' => Illuminate\Support\Facades\Password::class,
'Queue' => Illuminate\Support\Facades\Queue::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,

View File

@ -106,15 +106,34 @@ return [
'redis' => [
'cluster' => false,
// Phpredis is recommended,
// however, most of Blessing Skin users don't use redis,
// so keep `predis` as default value.
// Otherwise, an error will be thrown if phpredis is not installed.
'client' => env('REDIS_CLIENT', 'predis'),
'options' => [
'cluster' => env('REDIS_CLUSTER', 'redis'),
'prefix' => env(
'REDIS_PREFIX',
Illuminate\Support\Str::slug(env('APP_NAME', 'laravel'), '_').'_database_'
),
],
'default' => [
'scheme' => env('REDIS_SCHEME', 'tcp'),
'host' => env('REDIS_HOST', 'localhost'),
'port' => env('REDIS_PORT', 6379),
'path' => env('REDIS_SOCKET_PATH'),
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'database' => 0,
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_DB', 0),
],
'cache' => [
'url' => env('REDIS_URL'),
'host' => env('REDIS_HOST', '127.0.0.1'),
'password' => env('REDIS_PASSWORD', null),
'port' => env('REDIS_PORT', 6379),
'database' => env('REDIS_CACHE_DB', 1),
],
],

View File

@ -3,8 +3,8 @@
namespace Tests;
use Cache;
use Redis;
use Mockery;
use Illuminate\Support\Facades\Redis;
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseTransactions;