Inital upgrade to 5.5

This simply updates dependencies and gets all of the providers and config files updated based on what  the laravel/laravel currently ships with
This commit is contained in:
Dane Everitt 2017-12-16 12:20:09 -06:00
parent f9df463d32
commit 0dcf2aaed6
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
17 changed files with 936 additions and 679 deletions

View file

@ -3,41 +3,17 @@
namespace Pterodactyl\Console;
use Illuminate\Console\Scheduling\Schedule;
use Pterodactyl\Console\Commands\InfoCommand;
use Pterodactyl\Console\Commands\User\MakeUserCommand;
use Pterodactyl\Console\Commands\User\DeleteUserCommand;
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
use Pterodactyl\Console\Commands\Server\RebuildServerCommand;
use Pterodactyl\Console\Commands\Location\MakeLocationCommand;
use Pterodactyl\Console\Commands\User\DisableTwoFactorCommand;
use Pterodactyl\Console\Commands\Environment\AppSettingsCommand;
use Pterodactyl\Console\Commands\Location\DeleteLocationCommand;
use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand;
use Pterodactyl\Console\Commands\Environment\EmailSettingsCommand;
use Pterodactyl\Console\Commands\Environment\DatabaseSettingsCommand;
use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
class Kernel extends ConsoleKernel
{
/**
* The Artisan commands provided by your application.
*
* @var array
* Register the commands for the application.
*/
protected $commands = [
AppSettingsCommand::class,
CleanServiceBackupFilesCommand::class,
DatabaseSettingsCommand::class,
DeleteLocationCommand::class,
DeleteUserCommand::class,
DisableTwoFactorCommand::class,
EmailSettingsCommand::class,
InfoCommand::class,
MakeLocationCommand::class,
MakeUserCommand::class,
ProcessRunnableCommand::class,
RebuildServerCommand::class,
];
protected function commands()
{
$this->load(__DIR__ . '/Commands');
}
/**
* Define the application's command schedule.

View file

@ -2,10 +2,10 @@
namespace Pterodactyl\Http;
use Fideloper\Proxy\TrustProxies;
use Illuminate\Auth\Middleware\Authorize;
use Illuminate\Auth\Middleware\Authenticate;
use Pterodactyl\Http\Middleware\TrimStrings;
use Pterodactyl\Http\Middleware\TrustProxies;
use Illuminate\Session\Middleware\StartSession;
use Pterodactyl\Http\Middleware\EncryptCookies;
use Pterodactyl\Http\Middleware\VerifyCsrfToken;
@ -23,6 +23,7 @@ use Pterodactyl\Http\Middleware\RedirectIfAuthenticated;
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
use Pterodactyl\Http\Middleware\API\AuthenticateIPAccess;
use Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate;
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
use Pterodactyl\Http\Middleware\API\HasPermissionToResource;
use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser;
@ -31,6 +32,7 @@ use Pterodactyl\Http\Middleware\RequireTwoFactorAuthentication;
use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer;
use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer;
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
use Pterodactyl\Http\Middleware\DaemonAuthenticate as OldDaemonAuthenticate;
class Kernel extends HttpKernel
@ -42,9 +44,9 @@ class Kernel extends HttpKernel
*/
protected $middleware = [
CheckForMaintenanceMode::class,
EncryptCookies::class,
AddQueuedCookiesToResponse::class,
ValidatePostSize::class,
TrimStrings::class,
ConvertEmptyStringsToNull::class,
TrustProxies::class,
];

View file

@ -0,0 +1,29 @@
<?php
namespace Pterodactyl\Http\Middleware;
use Illuminate\Http\Request;
use Fideloper\Proxy\TrustProxies as Middleware;
class TrustProxies extends Middleware
{
/**
* The trusted proxies for this application.
*
* @var array
*/
protected $proxies;
/**
* The current proxy header mappings.
*
* @var array
*/
protected $headers = [
Request::HEADER_FORWARDED => 'FORWARDED',
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
];
}

View file

@ -12,8 +12,6 @@ use Illuminate\Support\ServiceProvider;
use Pterodactyl\Observers\UserObserver;
use Pterodactyl\Observers\ServerObserver;
use Pterodactyl\Observers\SubuserObserver;
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
class AppServiceProvider extends ServiceProvider
{
@ -32,17 +30,6 @@ class AppServiceProvider extends ServiceProvider
View::share('appIsGit', $this->versionData()['is_git'] ?? false);
}
/**
* Register any application services.
*/
public function register()
{
if ($this->app->environment() !== 'production') {
$this->app->register(DebugbarServiceProvider::class);
$this->app->register(IdeHelperServiceProvider::class);
}
}
/**
* Return version information for the footer.
*

View file

@ -12,12 +12,4 @@ class EventServiceProvider extends ServiceProvider
* @var array
*/
protected $listen = [];
/**
* Register any other events for your application.
*/
public function boot()
{
parent::boot();
}
}