Skip to content

Commit a043071

Browse files
Update to Laravel 8
Co-authored-by: Matthew Penner <me@matthewp.io>
1 parent 028921b commit a043071

File tree

211 files changed

+4341
-2880
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

211 files changed

+4341
-2880
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
- 3306
2020
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
2121
strategy:
22-
fail-fast: true
22+
fail-fast: false
2323
matrix:
24-
php: [7.3, 7.4]
24+
php: [7.4, 8.0]
2525
name: PHP ${{ matrix.php }}
2626
steps:
2727
- name: checkout
@@ -44,7 +44,7 @@ jobs:
4444
with:
4545
php-version: ${{ matrix.php }}
4646
extensions: cli, openssl, gd, mysql, pdo, mbstring, tokenizer, bcmath, xml, curl, zip
47-
tools: composer:v1
47+
tools: composer:v2
4848
coverage: none
4949
- name: configure
5050
run: cp .env.ci .env

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
/vendor
22
*.DS_Store*
3-
.env
3+
!.env.ci
4+
!.env.dusk
5+
!.env.example
6+
.env*
47
.vagrant/*
58
.vscode/*
69
storage/framework/*

app/Console/Commands/Overrides/SeedCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class SeedCommand extends BaseSeedCommand
1717
*/
1818
public function handle()
1919
{
20-
if (!$this->hasCompletedMigrations()) {
20+
if (! $this->hasCompletedMigrations()) {
2121
return $this->showMigrationWarning();
2222
}
2323

app/Console/Commands/Overrides/UpCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class UpCommand extends BaseUpCommand
1414
*/
1515
public function handle()
1616
{
17-
if (!$this->hasCompletedMigrations()) {
17+
if (! $this->hasCompletedMigrations()) {
1818
return $this->showMigrationWarning();
1919
}
2020

app/Console/Commands/Schedule/ProcessRunnableCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Pterodactyl\Console\Commands\Schedule;
44

5-
use Throwable;
65
use Exception;
6+
use Throwable;
77
use Illuminate\Console\Command;
88
use Pterodactyl\Models\Schedule;
99
use Illuminate\Support\Facades\Log;

app/Console/Commands/Server/BulkPowerActionCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ protected function getQueryBuilder(array $servers, array $nodes)
9999

100100
if (! empty($nodes) && ! empty($servers)) {
101101
$instance->whereIn('id', $servers)->orWhereIn('node_id', $nodes);
102-
} else if (empty($nodes) && ! empty($servers)) {
102+
} elseif (empty($nodes) && ! empty($servers)) {
103103
$instance->whereIn('id', $servers);
104-
} else if (! empty($nodes) && empty($servers)) {
104+
} elseif (! empty($nodes) && empty($servers)) {
105105
$instance->whereIn('node_id', $nodes);
106106
}
107107

app/Console/Commands/User/DeleteUserCommand.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,10 @@
99

1010
namespace Pterodactyl\Console\Commands\User;
1111

12-
use Webmozart\Assert\Assert;
1312
use Pterodactyl\Models\User;
13+
use Webmozart\Assert\Assert;
1414
use Illuminate\Console\Command;
1515
use Pterodactyl\Services\Users\UserDeletionService;
16-
use Pterodactyl\Contracts\Repository\UserRepositoryInterface;
1716

1817
class DeleteUserCommand extends Command
1918
{
@@ -42,7 +41,8 @@ class DeleteUserCommand extends Command
4241
*
4342
* @param \Pterodactyl\Services\Users\UserDeletionService $deletionService
4443
*/
45-
public function __construct(UserDeletionService $deletionService) {
44+
public function __construct(UserDeletionService $deletionService)
45+
{
4646
parent::__construct();
4747

4848
$this->deletionService = $deletionService;
@@ -96,7 +96,5 @@ public function handle()
9696
$this->deletionService->handle($deleteUser);
9797
$this->info(trans('command/messages.user.deleted'));
9898
}
99-
100-
return;
10199
}
102100
}

app/Console/RequiresDatabaseMigrations.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ protected function hasCompletedMigrations(): bool
3939
*/
4040
protected function showMigrationWarning(): int
4141
{
42-
$this->getOutput()->writeln("<options=bold>
42+
$this->getOutput()->writeln('<options=bold>
4343
| @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ |
4444
| |
4545
| Your database has not been properly migrated! |
@@ -52,9 +52,9 @@ protected function showMigrationWarning(): int
5252
5353
You will not be able to use Pterodactyl Panel as expected without fixing your
5454
database state by running the command above.
55-
");
55+
');
5656

57-
$this->getOutput()->error("You must correct the error above before continuing.");
57+
$this->getOutput()->error('You must correct the error above before continuing.');
5858

5959
return 1;
6060
}

app/Contracts/Repository/AllocationRepositoryInterface.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Pterodactyl\Contracts\Repository;
44

5-
use Illuminate\Support\Collection;
6-
75
interface AllocationRepositoryInterface extends RepositoryInterface
86
{
97
/**

app/Contracts/Repository/NodeRepositoryInterface.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44

55
use Pterodactyl\Models\Node;
66
use Illuminate\Support\Collection;
7-
use Illuminate\Support\LazyCollection;
8-
use Illuminate\Contracts\Pagination\LengthAwarePaginator;
9-
use Pterodactyl\Contracts\Repository\Attributes\SearchableInterface;
107

118
interface NodeRepositoryInterface extends RepositoryInterface
129
{

0 commit comments

Comments
 (0)