Skip to content

Commit 0dcf2aa

Browse files
committed
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
1 parent f9df463 commit 0dcf2aa

File tree

17 files changed

+948
-691
lines changed

17 files changed

+948
-691
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ This project follows [Semantic Versioning](http://semver.org) guidelines.
1515

1616
### Changed
1717
* Revoking the administrative status for an admin will revoke all authentication tokens currently assigned to their account.
18+
* Updated core framework to Laravel 5.5. This includes many dependency updates.
19+
* Certain AWS specific environment keys were changed, this should have minimal impact on users unless you specifically enabled AWS specific features. The renames are: `AWS_KEY -> AWS_ACCESS_KEY_ID`, `AWS_SECRET -> AWS_SECRET_ACCESS_KEY`, `AWS_REGION -> AWS_DEFAULT_REGION`
1820

1921
### Added
2022
* Added star indicators to user listing in Admin CP to indicate users who are set as a root admin.

app/Console/Kernel.php

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,41 +3,17 @@
33
namespace Pterodactyl\Console;
44

55
use Illuminate\Console\Scheduling\Schedule;
6-
use Pterodactyl\Console\Commands\InfoCommand;
7-
use Pterodactyl\Console\Commands\User\MakeUserCommand;
8-
use Pterodactyl\Console\Commands\User\DeleteUserCommand;
96
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
10-
use Pterodactyl\Console\Commands\Server\RebuildServerCommand;
11-
use Pterodactyl\Console\Commands\Location\MakeLocationCommand;
12-
use Pterodactyl\Console\Commands\User\DisableTwoFactorCommand;
13-
use Pterodactyl\Console\Commands\Environment\AppSettingsCommand;
14-
use Pterodactyl\Console\Commands\Location\DeleteLocationCommand;
15-
use Pterodactyl\Console\Commands\Schedule\ProcessRunnableCommand;
16-
use Pterodactyl\Console\Commands\Environment\EmailSettingsCommand;
17-
use Pterodactyl\Console\Commands\Environment\DatabaseSettingsCommand;
18-
use Pterodactyl\Console\Commands\Maintenance\CleanServiceBackupFilesCommand;
197

208
class Kernel extends ConsoleKernel
219
{
2210
/**
23-
* The Artisan commands provided by your application.
24-
*
25-
* @var array
11+
* Register the commands for the application.
2612
*/
27-
protected $commands = [
28-
AppSettingsCommand::class,
29-
CleanServiceBackupFilesCommand::class,
30-
DatabaseSettingsCommand::class,
31-
DeleteLocationCommand::class,
32-
DeleteUserCommand::class,
33-
DisableTwoFactorCommand::class,
34-
EmailSettingsCommand::class,
35-
InfoCommand::class,
36-
MakeLocationCommand::class,
37-
MakeUserCommand::class,
38-
ProcessRunnableCommand::class,
39-
RebuildServerCommand::class,
40-
];
13+
protected function commands()
14+
{
15+
$this->load(__DIR__ . '/Commands');
16+
}
4117

4218
/**
4319
* Define the application's command schedule.

app/Http/Kernel.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
namespace Pterodactyl\Http;
44

5-
use Fideloper\Proxy\TrustProxies;
65
use Illuminate\Auth\Middleware\Authorize;
76
use Illuminate\Auth\Middleware\Authenticate;
87
use Pterodactyl\Http\Middleware\TrimStrings;
8+
use Pterodactyl\Http\Middleware\TrustProxies;
99
use Illuminate\Session\Middleware\StartSession;
1010
use Pterodactyl\Http\Middleware\EncryptCookies;
1111
use Pterodactyl\Http\Middleware\VerifyCsrfToken;
@@ -23,6 +23,7 @@
2323
use Illuminate\Auth\Middleware\AuthenticateWithBasicAuth;
2424
use Pterodactyl\Http\Middleware\API\AuthenticateIPAccess;
2525
use Pterodactyl\Http\Middleware\Daemon\DaemonAuthenticate;
26+
use Illuminate\Foundation\Http\Middleware\ValidatePostSize;
2627
use Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse;
2728
use Pterodactyl\Http\Middleware\API\HasPermissionToResource;
2829
use Pterodactyl\Http\Middleware\Server\AuthenticateAsSubuser;
@@ -31,6 +32,7 @@
3132
use Pterodactyl\Http\Middleware\Server\DatabaseBelongsToServer;
3233
use Pterodactyl\Http\Middleware\Server\ScheduleBelongsToServer;
3334
use Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode;
35+
use Illuminate\Foundation\Http\Middleware\ConvertEmptyStringsToNull;
3436
use Pterodactyl\Http\Middleware\DaemonAuthenticate as OldDaemonAuthenticate;
3537

3638
class Kernel extends HttpKernel
@@ -42,9 +44,9 @@ class Kernel extends HttpKernel
4244
*/
4345
protected $middleware = [
4446
CheckForMaintenanceMode::class,
45-
EncryptCookies::class,
46-
AddQueuedCookiesToResponse::class,
47+
ValidatePostSize::class,
4748
TrimStrings::class,
49+
ConvertEmptyStringsToNull::class,
4850
TrustProxies::class,
4951
];
5052

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
<?php
2+
3+
namespace Pterodactyl\Http\Middleware;
4+
5+
use Illuminate\Http\Request;
6+
use Fideloper\Proxy\TrustProxies as Middleware;
7+
8+
class TrustProxies extends Middleware
9+
{
10+
/**
11+
* The trusted proxies for this application.
12+
*
13+
* @var array
14+
*/
15+
protected $proxies;
16+
17+
/**
18+
* The current proxy header mappings.
19+
*
20+
* @var array
21+
*/
22+
protected $headers = [
23+
Request::HEADER_FORWARDED => 'FORWARDED',
24+
Request::HEADER_X_FORWARDED_FOR => 'X_FORWARDED_FOR',
25+
Request::HEADER_X_FORWARDED_HOST => 'X_FORWARDED_HOST',
26+
Request::HEADER_X_FORWARDED_PORT => 'X_FORWARDED_PORT',
27+
Request::HEADER_X_FORWARDED_PROTO => 'X_FORWARDED_PROTO',
28+
];
29+
}

app/Providers/AppServiceProvider.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use Pterodactyl\Observers\UserObserver;
1313
use Pterodactyl\Observers\ServerObserver;
1414
use Pterodactyl\Observers\SubuserObserver;
15-
use Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider;
16-
use Barryvdh\Debugbar\ServiceProvider as DebugbarServiceProvider;
1715

1816
class AppServiceProvider extends ServiceProvider
1917
{
@@ -32,17 +30,6 @@ public function boot()
3230
View::share('appIsGit', $this->versionData()['is_git'] ?? false);
3331
}
3432

35-
/**
36-
* Register any application services.
37-
*/
38-
public function register()
39-
{
40-
if ($this->app->environment() !== 'production') {
41-
$this->app->register(DebugbarServiceProvider::class);
42-
$this->app->register(IdeHelperServiceProvider::class);
43-
}
44-
}
45-
4633
/**
4734
* Return version information for the footer.
4835
*

app/Providers/EventServiceProvider.php

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,4 @@ class EventServiceProvider extends ServiceProvider
1212
* @var array
1313
*/
1414
protected $listen = [];
15-
16-
/**
17-
* Register any other events for your application.
18-
*/
19-
public function boot()
20-
{
21-
parent::boot();
22-
}
2315
}

composer.json

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,43 +15,40 @@
1515
"ext-mbstring": "*",
1616
"ext-pdo_mysql": "*",
1717
"ext-zip": "*",
18-
"appstract/laravel-blade-directives": "^0.6.0",
19-
"aws/aws-sdk-php": "^3.29",
20-
"daneeveritt/login-notifications": "^1.0",
18+
"appstract/laravel-blade-directives": "^0.7",
19+
"aws/aws-sdk-php": "^3.48",
2120
"doctrine/dbal": "^2.5",
22-
"edvinaskrucas/settings": "^2.0",
2321
"fideloper/proxy": "^3.3",
24-
"guzzlehttp/guzzle": "~6.3.0",
22+
"guzzlehttp/guzzle": "^6.3",
2523
"hashids/hashids": "^2.0",
2624
"igaster/laravel-theme": "^1.16",
2725
"laracasts/utilities": "^3.0",
28-
"laravel/framework": "5.4.27",
29-
"laravel/tinker": "1.0.1",
30-
"lord/laroute": "~2.4.5",
26+
"laravel/framework": "5.5.*",
27+
"laravel/tinker": "^1.0",
28+
"lord/laroute": "^2.4",
3129
"matriphe/iso-639": "^1.2",
3230
"mtdowling/cron-expression": "^1.2",
3331
"nesbot/carbon": "^1.22",
34-
"nicolaslopezj/searchable": "^1.9",
3532
"pragmarx/google2fa": "^2.0",
3633
"predis/predis": "^1.1",
3734
"prologue/alerts": "^0.4",
3835
"ramsey/uuid": "^3.7",
3936
"s1lentium/iptools": "^1.1",
40-
"sofa/eloquence": "~5.4.1",
41-
"spatie/laravel-fractal": "^4.0",
42-
"watson/validating": "^3.0",
37+
"sofa/eloquence-base": "v5.5",
38+
"sofa/eloquence-validable": "v5.5",
39+
"spatie/laravel-fractal": "^5.3",
4340
"webmozart/assert": "^1.2",
44-
"webpatser/laravel-uuid": "^2.0",
4541
"znck/belongs-to-through": "^2.3"
4642
},
4743
"require-dev": {
48-
"barryvdh/laravel-debugbar": "^2.4",
44+
"barryvdh/laravel-debugbar": "^3.1",
4945
"barryvdh/laravel-ide-helper": "^2.4",
46+
"filp/whoops": "^2.1",
5047
"friendsofphp/php-cs-fixer": "^2.8.0",
5148
"fzaninotto/faker": "^1.6",
52-
"mockery/mockery": "^0.9",
53-
"php-mock/php-mock-phpunit": "^1.1",
54-
"phpunit/phpunit": "^5.7"
49+
"mockery/mockery": "^1.0",
50+
"php-mock/php-mock-phpunit": "^2.0",
51+
"phpunit/phpunit": "^6.5"
5552
},
5653
"autoload": {
5754
"classmap": [
@@ -70,13 +67,15 @@
7067
}
7168
},
7269
"scripts": {
73-
"post-install-cmd": [
74-
"Illuminate\\Foundation\\ComposerScripts::postInstall",
75-
"php artisan optimize"
70+
"post-root-package-install": [
71+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
7672
],
77-
"post-update-cmd": [
78-
"Illuminate\\Foundation\\ComposerScripts::postUpdate",
79-
"php artisan optimize"
73+
"post-create-project-cmd": [
74+
"@php artisan key:generate"
75+
],
76+
"post-autoload-dump": [
77+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
78+
"@php artisan package:discover"
8079
]
8180
},
8281
"prefer-stable": true,

0 commit comments

Comments
 (0)