mirror of
https://github.com/flarum/framework.git
synced 2025-02-22 00:00:54 +08:00
Merge pull request #2154 from flarum/fl/2055-l58
Upgrade to Laravel 5.8
This commit is contained in:
commit
b7355db2b7
@ -41,21 +41,21 @@
|
||||
"dflydev/fig-cookies": "^1.0.2",
|
||||
"doctrine/dbal": "^2.7",
|
||||
"franzl/whoops-middleware": "^0.4.0",
|
||||
"illuminate/bus": "5.7.*",
|
||||
"illuminate/cache": "5.7.*",
|
||||
"illuminate/config": "5.7.*",
|
||||
"illuminate/container": "5.7.*",
|
||||
"illuminate/contracts": "5.7.*",
|
||||
"illuminate/database": "5.7.*",
|
||||
"illuminate/events": "5.7.*",
|
||||
"illuminate/filesystem": "5.7.*",
|
||||
"illuminate/hashing": "5.7.*",
|
||||
"illuminate/mail": "5.7.*",
|
||||
"illuminate/queue": "5.7.*",
|
||||
"illuminate/session": "5.7.*",
|
||||
"illuminate/support": "5.7.*",
|
||||
"illuminate/validation": "5.7.*",
|
||||
"illuminate/view": "5.7.*",
|
||||
"illuminate/bus": "5.8.*",
|
||||
"illuminate/cache": "5.8.*",
|
||||
"illuminate/config": "5.8.*",
|
||||
"illuminate/container": "5.8.*",
|
||||
"illuminate/contracts": "5.8.*",
|
||||
"illuminate/database": "5.8.*",
|
||||
"illuminate/events": "5.8.*",
|
||||
"illuminate/filesystem": "5.8.*",
|
||||
"illuminate/hashing": "5.8.*",
|
||||
"illuminate/mail": "5.8.*",
|
||||
"illuminate/queue": "5.8.*",
|
||||
"illuminate/session": "5.8.*",
|
||||
"illuminate/support": "5.8.*",
|
||||
"illuminate/validation": "5.8.*",
|
||||
"illuminate/view": "5.8.*",
|
||||
"intervention/image": "^2.5.0",
|
||||
"laminas/laminas-diactoros": "^1.8.4",
|
||||
"laminas/laminas-httphandlerrunner": "^1.0",
|
||||
|
@ -41,7 +41,7 @@ class HandleErrors implements Middleware
|
||||
*/
|
||||
protected $reporters;
|
||||
|
||||
public function __construct(Registry $registry, HttpFormatter $formatter, array $reporters)
|
||||
public function __construct(Registry $registry, HttpFormatter $formatter, iterable $reporters)
|
||||
{
|
||||
$this->registry = $registry;
|
||||
$this->formatter = $formatter;
|
||||
|
@ -11,7 +11,6 @@ namespace Flarum\Notification;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Database\Query\Expression;
|
||||
|
||||
class NotificationRepository
|
||||
{
|
||||
@ -36,11 +35,8 @@ class NotificationRepository
|
||||
->skip($offset)
|
||||
->take($limit);
|
||||
|
||||
return Notification::select('notifications.*')
|
||||
->selectRaw('p.unread_count')
|
||||
// Expression is necessary until Laravel 5.8.
|
||||
// See https://github.com/laravel/framework/pull/28400
|
||||
->joinSub($primaries, 'p', 'notifications.id', '=', new Expression('p.id'))
|
||||
return Notification::select('notifications.*', 'p.unread_count')
|
||||
->joinSub($primaries, 'p', 'notifications.id', '=', 'p.id')
|
||||
->latest()
|
||||
->get();
|
||||
}
|
||||
|
@ -14,12 +14,12 @@ use Flarum\Install\Installation;
|
||||
|
||||
require __DIR__.'/../../vendor/autoload.php';
|
||||
|
||||
$host = env('DB_HOST', 'localhost');
|
||||
$port = intval(env('DB_PORT', 3306));
|
||||
$name = env('DB_DATABASE', 'flarum_test');
|
||||
$user = env('DB_USERNAME', 'root');
|
||||
$pass = env('DB_PASSWORD', '');
|
||||
$pref = env('DB_PREFIX', '');
|
||||
$host = getenv('DB_HOST') ?: 'localhost';
|
||||
$port = intval(getenv('DB_PORT') ?: 3306);
|
||||
$name = getenv('DB_DATABASE') ?: 'flarum_test';
|
||||
$user = getenv('DB_USERNAME') ?: 'root';
|
||||
$pass = getenv('DB_PASSWORD') ?: '';
|
||||
$pref = getenv('DB_PREFIX') ?: '';
|
||||
|
||||
echo "Connecting to database $name at $host:$port.\n";
|
||||
echo "Logging in as $user with password '$pass'.\n";
|
||||
@ -48,15 +48,9 @@ $pipeline = $installation
|
||||
->configPath('config.php')
|
||||
->debugMode(true)
|
||||
->baseUrl(BaseUrl::fromString('http://localhost'))
|
||||
->databaseConfig(new DatabaseConfig(
|
||||
'mysql',
|
||||
env('DB_HOST', 'localhost'),
|
||||
intval(env('DB_PORT', 3306)),
|
||||
env('DB_DATABASE', 'flarum_test'),
|
||||
env('DB_USERNAME', 'root'),
|
||||
env('DB_PASSWORD', ''),
|
||||
env('DB_PREFIX', '')
|
||||
))
|
||||
->databaseConfig(
|
||||
new DatabaseConfig('mysql', $host, $port, $name, $user, $pass, $pref)
|
||||
)
|
||||
->adminUser(new AdminUser(
|
||||
'admin',
|
||||
'secret',
|
||||
|
Loading…
x
Reference in New Issue
Block a user