From cdd8eabcc05b140fcb929d5f1ca8a7278e832047 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sat, 30 Oct 2021 13:41:38 -0700 Subject: [PATCH] Add phpstan for static analysis (#3718) --- .env.ci | 1 + .github/workflows/tests.yml | 16 +- .php-cs-fixer.dist.php | 3 + app/Console/Commands/InfoCommand.php | 6 +- .../Location/DeleteLocationCommand.php | 11 +- .../Commands/Overrides/SeedCommand.php | 6 +- app/Console/Commands/Overrides/UpCommand.php | 6 +- .../Schedule/ProcessRunnableCommand.php | 8 +- app/Console/Commands/UpgradeCommand.php | 3 +- .../Commands/User/DeleteUserCommand.php | 19 +- app/Console/Commands/User/MakeUserCommand.php | 2 +- .../DatabaseRepositoryInterface.php | 6 +- .../LocationRepositoryInterface.php | 4 - .../Repository/NestRepositoryInterface.php | 29 +- .../Spatie/Fractalistic/Fractal.php | 6 +- app/Helpers/Time.php | 2 +- .../Databases/DatabaseController.php | 2 +- .../Api/Application/Eggs/EggController.php | 3 +- .../Eggs/EggVariableController.php | 2 +- .../Locations/LocationController.php | 2 +- .../Application/Mounts/MountController.php | 2 +- .../Api/Application/Nests/NestController.php | 4 +- .../Nodes/AllocationController.php | 2 +- .../Api/Application/Nodes/NodeController.php | 2 +- .../Nodes/NodeDeploymentController.php | 2 +- .../Api/Application/Roles/RoleController.php | 2 +- .../Application/Servers/ServerController.php | 2 +- .../Api/Application/Users/UserController.php | 2 +- .../Api/Client/AccountController.php | 6 +- .../Api/Client/ClientController.php | 2 +- .../Api/Client/Servers/StartupController.php | 1 - .../Api/Client/WebauthnController.php | 2 - .../Auth/AbstractLoginController.php | 3 - .../Auth/ForgotPasswordController.php | 1 - .../Auth/LoginCheckpointController.php | 11 +- app/Http/Controllers/Auth/LoginController.php | 13 +- .../Auth/ResetPasswordController.php | 2 +- .../Controllers/Auth/WebauthnController.php | 4 + app/Http/Kernel.php | 2 - .../SubstituteApplicationApiBindings.php | 2 +- .../Client/SubstituteClientApiBindings.php | 4 +- .../RequireTwoFactorAuthentication.php | 3 +- .../Variables/UpdateEggVariablesRequest.php | 1 - .../Servers/StoreServerRequest.php | 3 - .../Servers/Subusers/SubuserRequest.php | 2 - app/Models/AuditLog.php | 2 +- app/Models/DatabaseHost.php | 11 - app/Models/Egg.php | 42 +- app/Models/EggVariable.php | 19 - app/Models/Filters/MultiFieldServerFilter.php | 1 + app/Models/Model.php | 14 +- app/Models/Node.php | 33 +- app/Models/Permission.php | 2 +- app/Models/Server.php | 45 +- app/Notifications/AccountCreated.php | 2 +- app/Notifications/MailTested.php | 2 +- app/Notifications/ServerInstalled.php | 3 + .../Eloquent/BackupRepository.php | 4 +- .../Eloquent/DatabaseRepository.php | 6 +- app/Repositories/Eloquent/EggRepository.php | 6 + .../Eloquent/EloquentRepository.php | 48 +- .../Eloquent/LocationRepository.php | 8 +- app/Repositories/Eloquent/MountRepository.php | 4 +- app/Repositories/Eloquent/NestRepository.php | 46 +- app/Repositories/Eloquent/NodeRepository.php | 31 +- .../Eloquent/ScheduleRepository.php | 2 + .../Eloquent/ServerRepository.php | 2 + app/Repositories/Eloquent/TaskRepository.php | 2 + app/Repositories/Repository.php | 4 +- app/Rules/Username.php | 2 +- .../Allocations/AssignmentService.php | 1 + app/Services/Backups/DeleteBackupService.php | 1 + .../Backups/InitiateBackupService.php | 5 +- .../Databases/DatabaseManagementService.php | 1 + .../Databases/DatabasePasswordService.php | 2 - app/Services/Eggs/EggConfigurationService.php | 2 + .../Eggs/Scripts/InstallScriptService.php | 4 +- .../Eggs/Sharing/EggImporterService.php | 4 +- .../Variables/VariableCreationService.php | 1 + .../Eggs/Variables/VariableUpdateService.php | 3 +- .../Helpers/SoftwareVersionService.php | 1 + app/Services/Nodes/NodeDeletionService.php | 23 +- app/Services/Nodes/NodeJWTService.php | 2 - .../Schedules/ProcessScheduleService.php | 2 +- .../Servers/BuildModificationService.php | 9 +- app/Services/Servers/EnvironmentService.php | 1 + .../Servers/StartupCommandService.php | 1 + app/Services/Servers/TransferService.php | 15 +- app/Services/Users/UserDeletionService.php | 23 +- app/Traits/Helpers/AvailableLanguages.php | 8 +- .../Application/DatabaseHostTransformer.php | 1 + .../Application/ServerVariableTransformer.php | 2 + .../Api/Client/EggVariableTransformer.php | 2 +- app/Transformers/Api/Transformer.php | 11 +- app/helpers.php | 4 +- composer.json | 4 +- composer.lock | 1193 +++++++++++------ ..._202643_update_default_values_for_eggs.php | 4 +- phpstan-baseline.neon | 257 ++++ phpstan.neon | 15 + phpunit.xml | 1 + .../Location/LocationControllerTest.php | 1 - .../Application/Users/UserControllerTest.php | 1 - 103 files changed, 1286 insertions(+), 877 deletions(-) create mode 100644 phpstan-baseline.neon create mode 100644 phpstan.neon diff --git a/.env.ci b/.env.ci index e99f46691..991f47a98 100644 --- a/.env.ci +++ b/.env.ci @@ -5,6 +5,7 @@ APP_THEME=pterodactyl APP_TIMEZONE=America/Los_Angeles APP_URL=http://localhost/ +DB_CONNECTION=testing TESTING_DB_HOST=127.0.0.1 TESTING_DB_DATABASE=panel_test TESTING_DB_USERNAME=root diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3143871b0..46b07fe22 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -37,9 +37,7 @@ jobs: path: | ~/.php_cs.cache ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }} - restore-keys: | - ${{ runner.os }}-cache-${{ matrix.php }}- + key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('composer.lock') }} - name: Setup PHP uses: shivammathur/setup-php@v2 with: @@ -52,16 +50,22 @@ jobs: - name: composer install run: composer install --prefer-dist --no-interaction --no-progress - name: Run cs-fixer - run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php-cs-fixer.dist.php + run: vendor/bin/php-cs-fixer fix --dry-run --diff --format=txt --config .php-cs-fixer.dist.php continue-on-error: true + - name: Static Analysis + if: ${{ matrix.php }} == '8.0' + run: | + php artisan ide-helper:models -N + ./vendor/bin/phpstan analyse --memory-limit=2G + env: + TESTING_DB_PORT: ${{ job.services.database.ports[3306] }} - name: Execute Unit Tests run: php artisan test tests/Unit if: ${{ always() }} env: TESTING_DB_PORT: ${{ job.services.database.ports[3306] }} - TESTING_DB_USERNAME: root - name: Execute Integration Tests run: php artisan test tests/Integration + if: ${{ always() }} env: TESTING_DB_PORT: ${{ job.services.database.ports[3306] }} - TESTING_DB_USERNAME: root diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 9245b7e6e..b2a25ca19 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -10,6 +10,9 @@ $finder = (new Finder()) 'node_modules', 'storage', 'bootstrap/cache', + '.phpstorm.meta.php', + '_ide_helper.php', + '_ide_helper_models.php', ]) ->notName(['_ide_helper*']); diff --git a/app/Console/Commands/InfoCommand.php b/app/Console/Commands/InfoCommand.php index e712fd1e4..6e9a2c827 100644 --- a/app/Console/Commands/InfoCommand.php +++ b/app/Console/Commands/InfoCommand.php @@ -54,15 +54,15 @@ class InfoCommand extends Command $this->output->title('Version Information'); $this->table([], [ ['Panel Version', $this->config->get('app.version')], - ['Latest Version', $this->versionService->getPanel()], + ['Latest Version', $this->versionService->getLatestPanel()], ['Up-to-Date', $this->versionService->isLatestPanel() ? 'Yes' : $this->formatText('No', 'bg=red')], ['Unique Identifier', $this->config->get('pterodactyl.service.author')], ], 'compact'); $this->output->title('Application Configuration'); $this->table([], [ - ['Environment', $this->formatText($this->config->get('app.env'), $this->config->get('app.env') === 'production' ?: 'bg=red')], - ['Debug Mode', $this->formatText($this->config->get('app.debug') ? 'Yes' : 'No', !$this->config->get('app.debug') ?: 'bg=red')], + ['Environment', $this->formatText($this->config->get('app.env'), $this->config->get('app.env') === 'production' ? '' : 'bg=red')], + ['Debug Mode', $this->formatText($this->config->get('app.debug') ? 'Yes' : 'No', !$this->config->get('app.debug') ? '' : 'bg=red')], ['Installation URL', $this->config->get('app.url')], ['Installation Directory', base_path()], ['Timezone', $this->config->get('app.timezone')], diff --git a/app/Console/Commands/Location/DeleteLocationCommand.php b/app/Console/Commands/Location/DeleteLocationCommand.php index 898dbb924..d1fb951d8 100644 --- a/app/Console/Commands/Location/DeleteLocationCommand.php +++ b/app/Console/Commands/Location/DeleteLocationCommand.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Console\Commands\Location; @@ -26,9 +19,9 @@ class DeleteLocationCommand extends Command protected $description = 'Deletes a location from the Panel.'; /** - * @var \Illuminate\Support\Collection + * @var \Illuminate\Support\Collection|null */ - protected $locations; + protected $locations = null; /** * @var \Pterodactyl\Contracts\Repository\LocationRepositoryInterface diff --git a/app/Console/Commands/Overrides/SeedCommand.php b/app/Console/Commands/Overrides/SeedCommand.php index 5f050e340..7b7b5edb7 100644 --- a/app/Console/Commands/Overrides/SeedCommand.php +++ b/app/Console/Commands/Overrides/SeedCommand.php @@ -13,14 +13,14 @@ class SeedCommand extends BaseSeedCommand * Block someone from running this seed command if they have not completed * the migration process. */ - public function handle() + public function handle(): int { if (!$this->hasCompletedMigrations()) { $this->showMigrationWarning(); - return; + return 1; } - parent::handle(); + return parent::handle(); } } diff --git a/app/Console/Commands/Overrides/UpCommand.php b/app/Console/Commands/Overrides/UpCommand.php index 3001edcbe..0a7caaeb7 100644 --- a/app/Console/Commands/Overrides/UpCommand.php +++ b/app/Console/Commands/Overrides/UpCommand.php @@ -13,14 +13,14 @@ class UpCommand extends BaseUpCommand * Block someone from running this up command if they have not completed * the migration process. */ - public function handle() + public function handle(): int { if (!$this->hasCompletedMigrations()) { $this->showMigrationWarning(); - return; + return 1; } - parent::handle(); + return parent::handle(); } } diff --git a/app/Console/Commands/Schedule/ProcessRunnableCommand.php b/app/Console/Commands/Schedule/ProcessRunnableCommand.php index 9e51feaeb..d2a7ec661 100644 --- a/app/Console/Commands/Schedule/ProcessRunnableCommand.php +++ b/app/Console/Commands/Schedule/ProcessRunnableCommand.php @@ -24,7 +24,7 @@ class ProcessRunnableCommand extends Command /** * Handle command execution. */ - public function handle() + public function handle(): int { $schedules = Schedule::query()->with('tasks') ->where('is_active', true) @@ -35,7 +35,7 @@ class ProcessRunnableCommand extends Command if ($schedules->count() < 1) { $this->line('There are no scheduled tasks for servers that need to be run.'); - return; + return 0; } $bar = $this->output->createProgressBar(count($schedules)); @@ -47,6 +47,8 @@ class ProcessRunnableCommand extends Command } $this->line(''); + + return 0; } /** @@ -69,7 +71,7 @@ class ProcessRunnableCommand extends Command 'schedule' => $schedule->name, 'hash' => $schedule->hashid, ])); - } catch (Throwable | Exception $exception) { + } catch (Throwable|Exception $exception) { Log::error($exception, ['schedule_id' => $schedule->id]); $this->error("An error was encountered while processing Schedule #{$schedule->id}: " . $exception->getMessage()); diff --git a/app/Console/Commands/UpgradeCommand.php b/app/Console/Commands/UpgradeCommand.php index 224329869..3636c778d 100644 --- a/app/Console/Commands/UpgradeCommand.php +++ b/app/Console/Commands/UpgradeCommand.php @@ -87,11 +87,12 @@ class UpgradeCommand extends Command if (!$this->confirm('Are you sure you want to run the upgrade process for your Panel?')) { $this->warn('Upgrade process terminated by user.'); + return; } } - ini_set('output_buffering', 0); + ini_set('output_buffering', '0'); $bar = $this->output->createProgressBar($skipDownload ? 9 : 10); $bar->start(); diff --git a/app/Console/Commands/User/DeleteUserCommand.php b/app/Console/Commands/User/DeleteUserCommand.php index 4c847257e..57916da13 100644 --- a/app/Console/Commands/User/DeleteUserCommand.php +++ b/app/Console/Commands/User/DeleteUserCommand.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Console\Commands\User; @@ -47,11 +40,9 @@ class DeleteUserCommand extends Command } /** - * @return bool - * * @throws \Pterodactyl\Exceptions\DisplayException */ - public function handle() + public function handle(): int { $search = $this->option('user') ?? $this->ask(trans('command/messages.user.search_users')); Assert::notEmpty($search, 'Search term should be an email address, got: %s.'); @@ -68,13 +59,13 @@ class DeleteUserCommand extends Command return $this->handle(); } - return false; + return 1; } if ($this->input->isInteractive()) { $tableValues = []; foreach ($results as $user) { - $tableValues[] = [$user->id, $user->email, $user->name]; + $tableValues[] = [$user->id, $user->email, $user->name_first]; } $this->table(['User ID', 'Email', 'Name'], $tableValues); @@ -85,7 +76,7 @@ class DeleteUserCommand extends Command if (count($results) > 1) { $this->error(trans('command/messages.user.multiple_found')); - return false; + return 1; } $deleteUser = $results->first(); @@ -95,5 +86,7 @@ class DeleteUserCommand extends Command $this->deletionService->handle($deleteUser); $this->info(trans('command/messages.user.deleted')); } + + return 0; } } diff --git a/app/Console/Commands/User/MakeUserCommand.php b/app/Console/Commands/User/MakeUserCommand.php index a3fefd965..73a2e0fa4 100644 --- a/app/Console/Commands/User/MakeUserCommand.php +++ b/app/Console/Commands/User/MakeUserCommand.php @@ -62,7 +62,7 @@ class MakeUserCommand extends Command ['UUID', $user->uuid], ['Email', $user->email], ['Username', $user->username], - ['Name', $user->name], + ['Name', $user->name_first], ['Admin', $user->root_admin ? 'Yes' : 'No'], ]); } diff --git a/app/Contracts/Repository/DatabaseRepositoryInterface.php b/app/Contracts/Repository/DatabaseRepositoryInterface.php index 622072203..4a1d0eb9f 100644 --- a/app/Contracts/Repository/DatabaseRepositoryInterface.php +++ b/app/Contracts/Repository/DatabaseRepositoryInterface.php @@ -39,10 +39,8 @@ interface DatabaseRepositoryInterface extends RepositoryInterface /** * Create a new database user on a given connection. - * - * @param $max_connections */ - public function createUser(string $username, string $remote, string $password, string $max_connections): bool; + public function createUser(string $username, string $remote, string $password, int $max_connections): bool; /** * Give a specific user access to a given database. @@ -61,8 +59,6 @@ interface DatabaseRepositoryInterface extends RepositoryInterface /** * Drop a given user on a specific connection. - * - * @return mixed */ public function dropUser(string $username, string $remote): bool; } diff --git a/app/Contracts/Repository/LocationRepositoryInterface.php b/app/Contracts/Repository/LocationRepositoryInterface.php index d24cee5bd..4a1b4ab12 100644 --- a/app/Contracts/Repository/LocationRepositoryInterface.php +++ b/app/Contracts/Repository/LocationRepositoryInterface.php @@ -20,8 +20,6 @@ interface LocationRepositoryInterface extends RepositoryInterface /** * Return all of the nodes and their respective count of servers for a location. * - * @return mixed - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function getWithNodes(int $id): Location; @@ -29,8 +27,6 @@ interface LocationRepositoryInterface extends RepositoryInterface /** * Return a location and the count of nodes in that location. * - * @return mixed - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function getWithNodeCount(int $id): Location; diff --git a/app/Contracts/Repository/NestRepositoryInterface.php b/app/Contracts/Repository/NestRepositoryInterface.php index 1f430dbf8..8556200d7 100644 --- a/app/Contracts/Repository/NestRepositoryInterface.php +++ b/app/Contracts/Repository/NestRepositoryInterface.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Contracts\Repository; @@ -16,27 +9,7 @@ interface NestRepositoryInterface extends RepositoryInterface /** * Return a nest or all nests with their associated eggs and variables. * - * @param int $id - * - * @return \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Nest - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ - public function getWithEggs(int $id = null); - - /** - * Return a nest or all nests and the count of eggs and servers for that nest. - * - * @return \Pterodactyl\Models\Nest|\Illuminate\Database\Eloquent\Collection - * - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function getWithCounts(int $id = null); - - /** - * Return a nest along with its associated eggs and the servers relation on those eggs. - * - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function getWithEggServers(int $id): Nest; + public function getWithEggs(int $id = null): Nest; } diff --git a/app/Extensions/Spatie/Fractalistic/Fractal.php b/app/Extensions/Spatie/Fractalistic/Fractal.php index adb3c96a9..e2e6d2442 100644 --- a/app/Extensions/Spatie/Fractalistic/Fractal.php +++ b/app/Extensions/Spatie/Fractalistic/Fractal.php @@ -21,20 +21,20 @@ class Fractal extends SpatieFractal public function createData() { // Set the serializer by default. - if (is_null($this->serializer)) { + if (is_null($this->serializer)) { // @phpstan-ignore-line $this->serializer = new PterodactylSerializer(); } // Automatically set the paginator on the response object if the // data being provided implements a paginator. - if (is_null($this->paginator) && $this->data instanceof LengthAwarePaginator) { + if (is_null($this->paginator) && $this->data instanceof LengthAwarePaginator) { // @phpstan-ignore-line $this->paginator = new IlluminatePaginatorAdapter($this->data); } // If the resource name is not set attempt to pull it off the transformer // itself and set it automatically. $class = is_string($this->transformer) ? new $this->transformer() : $this->transformer; - if (is_null($this->resourceName) && $class instanceof Transformer) { + if (is_null($this->resourceName) && $class instanceof Transformer) { // @phpstan-ignore-line $this->resourceName = $class->getResourceName(); } diff --git a/app/Helpers/Time.php b/app/Helpers/Time.php index fd9a265a3..e8e585c2b 100644 --- a/app/Helpers/Time.php +++ b/app/Helpers/Time.php @@ -17,6 +17,6 @@ final class Time { $offset = round(CarbonImmutable::now($timezone)->getTimezone()->getOffset(CarbonImmutable::now('UTC')) / 3600); - return sprintf('%s%s:00', $offset > 0 ? '+' : '-', str_pad(abs($offset), 2, '0', STR_PAD_LEFT)); + return sprintf('%s%s:00', $offset > 0 ? '+' : '-', str_pad((string) abs($offset), 2, '0', STR_PAD_LEFT)); } } diff --git a/app/Http/Controllers/Api/Application/Databases/DatabaseController.php b/app/Http/Controllers/Api/Application/Databases/DatabaseController.php index 3398572a3..31a90bafc 100644 --- a/app/Http/Controllers/Api/Application/Databases/DatabaseController.php +++ b/app/Http/Controllers/Api/Application/Databases/DatabaseController.php @@ -40,7 +40,7 @@ class DatabaseController extends ApplicationApiController */ public function index(GetDatabasesRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Eggs/EggController.php b/app/Http/Controllers/Api/Application/Eggs/EggController.php index 34ad80a15..673df896f 100644 --- a/app/Http/Controllers/Api/Application/Eggs/EggController.php +++ b/app/Http/Controllers/Api/Application/Eggs/EggController.php @@ -36,11 +36,12 @@ class EggController extends ApplicationApiController */ public function index(GetEggsRequest $request, Nest $nest): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } + // @phpstan-ignore-next-line $eggs = QueryBuilder::for(Egg::query()) ->where('nest_id', '=', $nest->id) ->allowedFilters(['id', 'name', 'author']) diff --git a/app/Http/Controllers/Api/Application/Eggs/EggVariableController.php b/app/Http/Controllers/Api/Application/Eggs/EggVariableController.php index 682c4359c..c67089a48 100644 --- a/app/Http/Controllers/Api/Application/Eggs/EggVariableController.php +++ b/app/Http/Controllers/Api/Application/Eggs/EggVariableController.php @@ -55,7 +55,7 @@ class EggVariableController extends ApplicationApiController { $validated = $request->validated(); - $this->connection->transaction(function () use($egg, $validated) { + $this->connection->transaction(function () use ($egg, $validated) { foreach ($validated as $data) { $this->variableUpdateService->handle($egg, $data); } diff --git a/app/Http/Controllers/Api/Application/Locations/LocationController.php b/app/Http/Controllers/Api/Application/Locations/LocationController.php index a3a4af6e7..e7b7b7a38 100644 --- a/app/Http/Controllers/Api/Application/Locations/LocationController.php +++ b/app/Http/Controllers/Api/Application/Locations/LocationController.php @@ -46,7 +46,7 @@ class LocationController extends ApplicationApiController */ public function index(GetLocationsRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Mounts/MountController.php b/app/Http/Controllers/Api/Application/Mounts/MountController.php index 9a5ddfc1b..6fb6e6d16 100644 --- a/app/Http/Controllers/Api/Application/Mounts/MountController.php +++ b/app/Http/Controllers/Api/Application/Mounts/MountController.php @@ -34,7 +34,7 @@ class MountController extends ApplicationApiController */ public function index(GetMountsRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Nests/NestController.php b/app/Http/Controllers/Api/Application/Nests/NestController.php index 8f2b68905..34e42804c 100644 --- a/app/Http/Controllers/Api/Application/Nests/NestController.php +++ b/app/Http/Controllers/Api/Application/Nests/NestController.php @@ -13,8 +13,8 @@ use Pterodactyl\Transformers\Api\Application\EggTransformer; use Pterodactyl\Transformers\Api\Application\NestTransformer; use Pterodactyl\Exceptions\Http\QueryValueOutOfRangeHttpException; use Pterodactyl\Http\Requests\Api\Application\Nests\GetNestRequest; -use Pterodactyl\Http\Requests\Api\Application\Nests\GetNestsRequest; use Pterodactyl\Http\Requests\Api\Application\Eggs\ImportEggRequest; +use Pterodactyl\Http\Requests\Api\Application\Nests\GetNestsRequest; use Pterodactyl\Http\Requests\Api\Application\Nests\StoreNestRequest; use Pterodactyl\Http\Requests\Api\Application\Nests\DeleteNestRequest; use Pterodactyl\Http\Requests\Api\Application\Nests\UpdateNestRequest; @@ -51,7 +51,7 @@ class NestController extends ApplicationApiController */ public function index(GetNestsRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Nodes/AllocationController.php b/app/Http/Controllers/Api/Application/Nodes/AllocationController.php index 9845a4c62..8f0455c21 100644 --- a/app/Http/Controllers/Api/Application/Nodes/AllocationController.php +++ b/app/Http/Controllers/Api/Application/Nodes/AllocationController.php @@ -42,7 +42,7 @@ class AllocationController extends ApplicationApiController */ public function index(GetAllocationsRequest $request, Node $node): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Nodes/NodeController.php b/app/Http/Controllers/Api/Application/Nodes/NodeController.php index c9cfbb857..5d9dc5b91 100644 --- a/app/Http/Controllers/Api/Application/Nodes/NodeController.php +++ b/app/Http/Controllers/Api/Application/Nodes/NodeController.php @@ -50,7 +50,7 @@ class NodeController extends ApplicationApiController */ public function index(GetNodesRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Nodes/NodeDeploymentController.php b/app/Http/Controllers/Api/Application/Nodes/NodeDeploymentController.php index cebf5a8a0..9633bc8fe 100644 --- a/app/Http/Controllers/Api/Application/Nodes/NodeDeploymentController.php +++ b/app/Http/Controllers/Api/Application/Nodes/NodeDeploymentController.php @@ -35,7 +35,7 @@ class NodeDeploymentController extends ApplicationApiController $nodes = $this->viableNodesService->setLocations($data['location_ids'] ?? []) ->setMemory($data['memory']) ->setDisk($data['disk']) - ->handle($request->query('per_page'), $request->query('page')); + ->handle($request->query('per_page'), $request->query('page')); // @phpstan-ignore-line return $this->fractal->collection($nodes) ->transformWith(NodeTransformer::class) diff --git a/app/Http/Controllers/Api/Application/Roles/RoleController.php b/app/Http/Controllers/Api/Application/Roles/RoleController.php index aab08f276..253e070fe 100644 --- a/app/Http/Controllers/Api/Application/Roles/RoleController.php +++ b/app/Http/Controllers/Api/Application/Roles/RoleController.php @@ -32,7 +32,7 @@ class RoleController extends ApplicationApiController */ public function index(GetRolesRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Servers/ServerController.php b/app/Http/Controllers/Api/Application/Servers/ServerController.php index b426e1fd8..93260f321 100644 --- a/app/Http/Controllers/Api/Application/Servers/ServerController.php +++ b/app/Http/Controllers/Api/Application/Servers/ServerController.php @@ -52,7 +52,7 @@ class ServerController extends ApplicationApiController */ public function index(GetServersRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Application/Users/UserController.php b/app/Http/Controllers/Api/Application/Users/UserController.php index 8cb40cc88..44e765d4c 100644 --- a/app/Http/Controllers/Api/Application/Users/UserController.php +++ b/app/Http/Controllers/Api/Application/Users/UserController.php @@ -52,7 +52,7 @@ class UserController extends ApplicationApiController */ public function index(GetUsersRequest $request): array { - $perPage = $request->query('per_page', 10); + $perPage = (int) $request->query('per_page', '10'); if ($perPage < 1 || $perPage > 100) { throw new QueryValueOutOfRangeHttpException('per_page', 1, 100); } diff --git a/app/Http/Controllers/Api/Client/AccountController.php b/app/Http/Controllers/Api/Client/AccountController.php index f125141e9..4a2873f79 100644 --- a/app/Http/Controllers/Api/Client/AccountController.php +++ b/app/Http/Controllers/Api/Client/AccountController.php @@ -15,7 +15,7 @@ class AccountController extends ClientApiController private UserUpdateService $updateService; /** - * @var \Illuminate\Auth\SessionGuard + * @var \Illuminate\Auth\AuthManager */ private $sessionGuard; @@ -64,7 +64,9 @@ class AccountController extends ClientApiController // cached copy of the user that does not include the updated password. Do this // to correctly store the new user details in the guard and allow the logout // other devices functionality to work. - $this->sessionGuard->setUser($user); + if (method_exists($this->sessionGuard, 'setUser')) { + $this->sessionGuard->setUser($user); + } // TODO: Find another way to do this, function doesn't exist due to API changes. //$this->sessionGuard->logoutOtherDevices($request->input('password')); diff --git a/app/Http/Controllers/Api/Client/ClientController.php b/app/Http/Controllers/Api/Client/ClientController.php index 67b15555d..caf99e2f1 100644 --- a/app/Http/Controllers/Api/Client/ClientController.php +++ b/app/Http/Controllers/Api/Client/ClientController.php @@ -66,7 +66,7 @@ class ClientController extends ClientApiController $builder = $builder->whereIn('servers.id', $user->accessibleServers()->pluck('id')->all()); } - $servers = $builder->paginate(min($request->query('per_page', 50), 100))->appends($request->query()); + $servers = $builder->paginate(min((int) $request->query('per_page', '50'), 100))->appends($request->query()); return $this->fractal->transformWith(new ServerTransformer())->collection($servers)->toArray(); } diff --git a/app/Http/Controllers/Api/Client/Servers/StartupController.php b/app/Http/Controllers/Api/Client/Servers/StartupController.php index 856bae29d..f9328264d 100644 --- a/app/Http/Controllers/Api/Client/Servers/StartupController.php +++ b/app/Http/Controllers/Api/Client/Servers/StartupController.php @@ -61,7 +61,6 @@ class StartupController extends ClientApiController */ public function update(UpdateStartupVariableRequest $request, Server $server): array { - /** @var \Pterodactyl\Models\EggVariable $variable */ $variable = $server->variables()->where('env_variable', $request->input('key'))->first(); if (is_null($variable) || !$variable->user_viewable) { diff --git a/app/Http/Controllers/Api/Client/WebauthnController.php b/app/Http/Controllers/Api/Client/WebauthnController.php index bc4eb82ef..3e3aad679 100644 --- a/app/Http/Controllers/Api/Client/WebauthnController.php +++ b/app/Http/Controllers/Api/Client/WebauthnController.php @@ -87,8 +87,6 @@ class WebauthnController extends ClientApiController $request->input('name'), ); - - return $this->fractal->item($webauthnKey) ->transformWith(WebauthnKeyTransformer::class) ->toArray(); diff --git a/app/Http/Controllers/Auth/AbstractLoginController.php b/app/Http/Controllers/Auth/AbstractLoginController.php index 2aced9b0c..7a12ad665 100644 --- a/app/Http/Controllers/Auth/AbstractLoginController.php +++ b/app/Http/Controllers/Auth/AbstractLoginController.php @@ -91,9 +91,6 @@ abstract class AbstractLoginController extends Controller /** * Determine if the user is logging in using an email or username,. - * - * @param string|null $input - * @return string */ protected function getField(string $input = null): string { diff --git a/app/Http/Controllers/Auth/ForgotPasswordController.php b/app/Http/Controllers/Auth/ForgotPasswordController.php index 7b409e519..bb272f58f 100644 --- a/app/Http/Controllers/Auth/ForgotPasswordController.php +++ b/app/Http/Controllers/Auth/ForgotPasswordController.php @@ -16,7 +16,6 @@ class ForgotPasswordController extends Controller /** * Get the response for a failed password reset link. * - * @param \Illuminate\Http\Request * @param string $response */ protected function sendResetLinkFailedResponse(Request $request, $response): JsonResponse diff --git a/app/Http/Controllers/Auth/LoginCheckpointController.php b/app/Http/Controllers/Auth/LoginCheckpointController.php index b9265884b..865377b7b 100644 --- a/app/Http/Controllers/Auth/LoginCheckpointController.php +++ b/app/Http/Controllers/Auth/LoginCheckpointController.php @@ -2,8 +2,8 @@ namespace Pterodactyl\Http\Controllers\Auth; -use Carbon\CarbonInterface; use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; use Pterodactyl\Models\User; use PragmaRX\Google2FA\Google2FA; use Illuminate\Contracts\Encryption\Encrypter; @@ -50,17 +50,20 @@ class LoginCheckpointController extends AbstractLoginController { if ($this->hasTooManyLoginAttempts($request)) { $this->sendLockoutResponse($request); + return; } $details = $request->session()->get('auth_confirmation_token'); if (!$this->hasValidSessionData($details)) { $this->sendFailedLoginResponse($request, null, self::TOKEN_EXPIRED_MESSAGE); + return; } if (!hash_equals($request->input('confirmation_token') ?? '', $details['token_value'])) { $this->sendFailedLoginResponse($request); + return; } @@ -69,6 +72,7 @@ class LoginCheckpointController extends AbstractLoginController $user = User::query()->findOrFail($details['user_id']); } catch (ModelNotFoundException $exception) { $this->sendFailedLoginResponse($request, null, self::TOKEN_EXPIRED_MESSAGE); + return; } @@ -91,8 +95,6 @@ class LoginCheckpointController extends AbstractLoginController /** * Determines if a given recovery token is valid for the user account. If we find a matching token * it will be deleted from the database. - * - * @return bool */ protected function isValidRecoveryToken(User $user, string $value): bool { @@ -116,9 +118,6 @@ class LoginCheckpointController extends AbstractLoginController * Determines if the data provided from the session is valid or not. This * will return false if the data is invalid, or if more time has passed than * was configured when the session was written. - * - * @param array $data - * @return bool */ public static function isValidSessionData(ValidationFactory $validation, array $data): bool { diff --git a/app/Http/Controllers/Auth/LoginController.php b/app/Http/Controllers/Auth/LoginController.php index d540469e1..4ed326623 100644 --- a/app/Http/Controllers/Auth/LoginController.php +++ b/app/Http/Controllers/Auth/LoginController.php @@ -10,7 +10,6 @@ use Illuminate\Http\JsonResponse; use Illuminate\Contracts\View\View; use LaravelWebauthn\Facades\Webauthn; use Illuminate\Contracts\View\Factory as ViewFactory; -use Illuminate\Database\Eloquent\ModelNotFoundException; class LoginController extends AbstractLoginController { @@ -24,7 +23,8 @@ class LoginController extends AbstractLoginController /** * LoginController constructor. */ - public function __construct(ViewFactory $view) { + public function __construct(ViewFactory $view) + { parent::__construct(); $this->view = $view; @@ -57,12 +57,11 @@ class LoginController extends AbstractLoginController return; } - try { - $username = $request->input('user'); + $username = $request->input('user'); - /** @var \Pterodactyl\Models\User $user */ - $user = User::query()->where($this->getField($username), $username)->firstOrFail(); - } catch (ModelNotFoundException $exception) { + /** @var \Pterodactyl\Models\User|null $user */ + $user = User::query()->where($this->getField($username), $username)->first(); + if (is_null($user)) { $this->sendFailedLoginResponse($request); } diff --git a/app/Http/Controllers/Auth/ResetPasswordController.php b/app/Http/Controllers/Auth/ResetPasswordController.php index 1107510a8..d074c0353 100644 --- a/app/Http/Controllers/Auth/ResetPasswordController.php +++ b/app/Http/Controllers/Auth/ResetPasswordController.php @@ -87,7 +87,7 @@ class ResetPasswordController extends Controller * account do not automatically log them in. In those cases, send the user back to the login * form with a note telling them their password was changed and to log back in. * - * @param \Illuminate\Contracts\Auth\CanResetPassword|\Pterodactyl\Models\User $user + * @param \Pterodactyl\Models\User $user * @param string $password * * @throws \Pterodactyl\Exceptions\Model\DataValidationException diff --git a/app/Http/Controllers/Auth/WebauthnController.php b/app/Http/Controllers/Auth/WebauthnController.php index 42c104d14..7f1b74881 100644 --- a/app/Http/Controllers/Auth/WebauthnController.php +++ b/app/Http/Controllers/Auth/WebauthnController.php @@ -38,17 +38,20 @@ class WebauthnController extends AbstractLoginController { if ($this->hasTooManyLoginAttempts($request)) { $this->sendLockoutResponse($request); + return; } $details = $request->session()->get('auth_confirmation_token'); if (!LoginCheckpointController::isValidSessionData($this->validation, $details)) { $this->sendFailedLoginResponse($request, null, LoginCheckpointController::TOKEN_EXPIRED_MESSAGE); + return; } if (!hash_equals($request->input('confirmation_token') ?? '', $details['token_value'])) { $this->sendFailedLoginResponse($request); + return; } @@ -57,6 +60,7 @@ class WebauthnController extends AbstractLoginController $user = User::query()->findOrFail($details['user_id']); } catch (ModelNotFoundException $exception) { $this->sendFailedLoginResponse($request, null, LoginCheckpointController::TOKEN_EXPIRED_MESSAGE); + return; } diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index 78accbc08..fd3cf0b95 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -109,7 +109,5 @@ class Kernel extends HttpKernel 'bindings' => SubstituteBindings::class, 'recaptcha' => VerifyReCaptcha::class, 'node.maintenance' => MaintenanceMiddleware::class, - // API Specific Middleware - 'api..key' => AuthenticateKey::class, ]; } diff --git a/app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php b/app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php index 4ae63ff4a..e629f6ca6 100644 --- a/app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php +++ b/app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php @@ -54,7 +54,7 @@ class SubstituteApplicationApiBindings try { $this->router->substituteImplicitBindings($route = $request->route()); } catch (ModelNotFoundException $exception) { - if (isset($route) && $route->getMissing()) { + if (!empty($route) && $route->getMissing()) { $route->getMissing()($request); } diff --git a/app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php b/app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php index 3a1a80f49..954f1e0f5 100644 --- a/app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php +++ b/app/Http/Middleware/Api/Client/SubstituteClientApiBindings.php @@ -25,7 +25,7 @@ class SubstituteClientApiBindings /** * Perform substitution of route parameters for the Client API. * - * @param \Illuminate\Http\Request + * @param \Illuminate\Http\Request $request * * @return mixed */ @@ -76,7 +76,7 @@ class SubstituteClientApiBindings /* @var \Illuminate\Routing\Route $route */ $this->router->substituteBindings($route = $request->route()); } catch (ModelNotFoundException $exception) { - if (isset($route) && $route->getMissing()) { + if (!empty($route) && $route->getMissing()) { $route->getMissing()($request); } diff --git a/app/Http/Middleware/RequireTwoFactorAuthentication.php b/app/Http/Middleware/RequireTwoFactorAuthentication.php index 724a11eb1..57c4dfc51 100644 --- a/app/Http/Middleware/RequireTwoFactorAuthentication.php +++ b/app/Http/Middleware/RequireTwoFactorAuthentication.php @@ -41,7 +41,7 @@ class RequireTwoFactorAuthentication */ public function handle(Request $request, Closure $next) { - /** @var \Pterodactyl\Models\User $user */ + /** @var \Pterodactyl\Models\User|null $user */ $user = $request->user(); $uri = rtrim($request->getRequestUri(), '/') . '/'; $current = $request->route()->getName(); @@ -66,6 +66,7 @@ class RequireTwoFactorAuthentication throw new TwoFactorAuthRequiredException(); } + // @phpstan-ignore-next-line $this->alert->danger(trans('auth.2fa_must_be_enabled'))->flash(); return redirect()->to($this->redirectRoute); diff --git a/app/Http/Requests/Api/Application/Eggs/Variables/UpdateEggVariablesRequest.php b/app/Http/Requests/Api/Application/Eggs/Variables/UpdateEggVariablesRequest.php index 363a2fece..c15de2ce3 100644 --- a/app/Http/Requests/Api/Application/Eggs/Variables/UpdateEggVariablesRequest.php +++ b/app/Http/Requests/Api/Application/Eggs/Variables/UpdateEggVariablesRequest.php @@ -3,7 +3,6 @@ namespace Pterodactyl\Http\Requests\Api\Application\Eggs\Variables; use Pterodactyl\Models\EggVariable; -use Illuminate\Validation\Validator; use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest; class UpdateEggVariablesRequest extends ApplicationApiRequest diff --git a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php index 063785a44..452909abe 100644 --- a/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php +++ b/app/Http/Requests/Api/Application/Servers/StoreServerRequest.php @@ -3,9 +3,6 @@ namespace Pterodactyl\Http\Requests\Api\Application\Servers; use Pterodactyl\Models\Server; -use Illuminate\Validation\Rule; -use Illuminate\Contracts\Validation\Validator; -use Pterodactyl\Models\Objects\DeploymentObject; use Pterodactyl\Http\Requests\Api\Application\ApplicationApiRequest; class StoreServerRequest extends ApplicationApiRequest diff --git a/app/Http/Requests/Api/Client/Servers/Subusers/SubuserRequest.php b/app/Http/Requests/Api/Client/Servers/Subusers/SubuserRequest.php index 5a20084d3..af16d4113 100644 --- a/app/Http/Requests/Api/Client/Servers/Subusers/SubuserRequest.php +++ b/app/Http/Requests/Api/Client/Servers/Subusers/SubuserRequest.php @@ -65,8 +65,6 @@ abstract class SubuserRequest extends ClientApiRequest // Otherwise, get the current subuser's permission set, and ensure that the // permissions they are trying to assign are not _more_ than the ones they // already have. - /** @var \Pterodactyl\Models\Subuser|null $subuser */ - /** @var \Pterodactyl\Services\Servers\GetUserPermissionsService $service */ $service = $this->container->make(GetUserPermissionsService::class); if (count(array_diff($permissions, $service->handle($server, $user))) > 0) { diff --git a/app/Models/AuditLog.php b/app/Models/AuditLog.php index 3a25d7a77..7d64ad5f0 100644 --- a/app/Models/AuditLog.php +++ b/app/Models/AuditLog.php @@ -101,7 +101,7 @@ class AuditLog extends Model * currently authenticated user if available. This model is not saved at this point, so * you can always make modifications to it as needed before saving. * - * @return $this + * @return self */ public static function instance(string $action, array $metadata, bool $isSystem = false) { diff --git a/app/Models/DatabaseHost.php b/app/Models/DatabaseHost.php index 31dad3865..814032425 100644 --- a/app/Models/DatabaseHost.php +++ b/app/Models/DatabaseHost.php @@ -2,17 +2,6 @@ namespace Pterodactyl\Models; -/** - * @property int $id - * @property string $name - * @property string $host - * @property int $port - * @property string $username - * @property string $password - * @property int|null $max_databases - * @property \Carbon\CarbonImmutable $created_at - * @property \Carbon\CarbonImmutable $updated_at - */ class DatabaseHost extends Model { /** diff --git a/app/Models/Egg.php b/app/Models/Egg.php index a45f07f4b..f6efde05e 100644 --- a/app/Models/Egg.php +++ b/app/Models/Egg.php @@ -2,44 +2,6 @@ namespace Pterodactyl\Models; -/** - * @property int $id - * @property string $uuid - * @property int $nest_id - * @property string $author - * @property string $name - * @property string|null $description - * @property array|null $features - * @property string $docker_image -- deprecated, use $docker_images - * @property string $update_url - * @property array $docker_images - * @property array|null $file_denylist - * @property string|null $config_files - * @property string|null $config_startup - * @property string|null $config_stop - * @property int|null $config_from - * @property string|null $startup - * @property bool $script_is_privileged - * @property string|null $script_install - * @property string $script_entry - * @property string $script_container - * @property int|null $copy_script_from - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property string|null $copy_script_install - * @property string $copy_script_entry - * @property string $copy_script_container - * @property string|null $inherit_config_files - * @property string|null $inherit_config_startup - * @property string|null $inherit_config_stop - * @property string $inherit_file_denylist - * @property array|null $inherit_features - * @property \Pterodactyl\Models\Nest $nest - * @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Server[] $servers - * @property \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\EggVariable[] $variables - * @property \Pterodactyl\Models\Egg|null $scriptFrom - * @property \Pterodactyl\Models\Egg|null $configFrom - */ class Egg extends Model { /** @@ -162,10 +124,12 @@ class Egg extends Model */ public function getCopyScriptEntryAttribute() { + // @phpstan-ignore-next-line if (!is_null($this->script_entry) || is_null($this->copy_script_from)) { return $this->script_entry; } + // @phpstan-ignore-next-line return $this->scriptFrom->script_entry; } @@ -177,10 +141,12 @@ class Egg extends Model */ public function getCopyScriptContainerAttribute() { + // @phpstan-ignore-next-line if (!is_null($this->script_container) || is_null($this->copy_script_from)) { return $this->script_container; } + // @phpstan-ignore-next-line return $this->scriptFrom->script_container; } diff --git a/app/Models/EggVariable.php b/app/Models/EggVariable.php index bb5938292..43d550ebf 100644 --- a/app/Models/EggVariable.php +++ b/app/Models/EggVariable.php @@ -2,25 +2,6 @@ namespace Pterodactyl\Models; -/** - * @property int $id - * @property int $egg_id - * @property string $name - * @property string $description - * @property string $env_variable - * @property string $default_value - * @property bool $user_viewable - * @property bool $user_editable - * @property string $rules - * @property \Carbon\CarbonImmutable $created_at - * @property \Carbon\CarbonImmutable $updated_at - * @property \Pterodactyl\Models\Egg $egg - * @property \Pterodactyl\Models\ServerVariable $serverVariable - * - * The "server_value" variable is only present on the object if you've loaded this model - * using the server relationship. - * @property string|null $server_value - */ class EggVariable extends Model { /** diff --git a/app/Models/Filters/MultiFieldServerFilter.php b/app/Models/Filters/MultiFieldServerFilter.php index 2aac64e81..b3bdcc830 100644 --- a/app/Models/Filters/MultiFieldServerFilter.php +++ b/app/Models/Filters/MultiFieldServerFilter.php @@ -48,6 +48,7 @@ class MultiFieldServerFilter implements Filter } }, // Otherwise, just try to search for that specific port in the allocations. + // @phpstan-ignore-next-line function (Builder $builder) use ($value) { $builder->orWhere('allocations.port', 'LIKE', substr($value, 1) . '%'); } diff --git a/app/Models/Model.php b/app/Models/Model.php index 8e762801a..a62dec655 100644 --- a/app/Models/Model.php +++ b/app/Models/Model.php @@ -23,22 +23,15 @@ abstract class Model extends IlluminateModel /** * Determines if the model should undergo data validation before it is saved * to the database. - * - * @var bool */ - protected $skipValidation = false; + protected bool $skipValidation = false; /** * The validator instance used by this model. - * - * @var \Illuminate\Validation\Validator */ - protected $validator; + protected ?Validator $validator = null; - /** - * @var \Illuminate\Contracts\Validation\Factory - */ - protected static $validatorFactory; + protected static Factory $validatorFactory; public static array $validationRules = []; @@ -82,6 +75,7 @@ abstract class Model extends IlluminateModel { $rules = $this->getKey() ? static::getRulesForUpdate($this) : static::getRules(); + // @phpstan-ignore-next-line return $this->validator ?: $this->validator = static::$validatorFactory->make( [], $rules, diff --git a/app/Models/Node.php b/app/Models/Node.php index f0bee4d67..51af2697c 100644 --- a/app/Models/Node.php +++ b/app/Models/Node.php @@ -8,38 +8,6 @@ use Illuminate\Container\Container; use Illuminate\Notifications\Notifiable; use Illuminate\Contracts\Encryption\Encrypter; -/** - * @property int $id - * @property string $uuid - * @property bool $public - * @property string $name - * @property string|null $description - * @property int $location_id - * @property int|null $database_host_id - * @property string $fqdn - * @property int $listen_port_http - * @property int $public_port_http - * @property int $listen_port_sftp - * @property int $public_port_sftp - * @property string $scheme - * @property bool $behind_proxy - * @property bool $maintenance_mode - * @property int $memory - * @property int $memory_overallocate - * @property int $disk - * @property int $disk_overallocate - * @property int $upload_size - * @property string $daemon_token_id - * @property string $daemon_token - * @property string $daemon_base - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Pterodactyl\Models\Location $location - * @property \Pterodactyl\Models\Mount[]|\Illuminate\Database\Eloquent\Collection $mounts - * @property \Pterodactyl\Models\Server[]|\Illuminate\Database\Eloquent\Collection $servers - * @property \Pterodactyl\Models\Allocation[]|\Illuminate\Database\Eloquent\Collection $allocations - * @property \Pterodactyl\Models\DatabaseHost $databaseHost - */ class Node extends Model { use Notifiable; @@ -275,6 +243,7 @@ class Node extends Model $memoryLimit = $this->memory * (1 + ($this->memory_overallocate / 100)); $diskLimit = $this->disk * (1 + ($this->disk_overallocate / 100)); + // @phpstan-ignore-next-line return ($this->sum_memory + $memory) <= $memoryLimit && ($this->sum_disk + $disk) <= $diskLimit; } } diff --git a/app/Models/Permission.php b/app/Models/Permission.php index b3b127486..7f2c31f81 100644 --- a/app/Models/Permission.php +++ b/app/Models/Permission.php @@ -213,7 +213,7 @@ class Permission extends Model * Returns all of the permissions available on the system for a user to * have when controlling a server. * - * @return \Illuminate\Database\Eloquent\Collection + * @phpstan-return \Illuminate\Support\Collection}> */ public static function permissions(): Collection { diff --git a/app/Models/Server.php b/app/Models/Server.php index dca0e20d5..010040f5b 100644 --- a/app/Models/Server.php +++ b/app/Models/Server.php @@ -8,50 +8,6 @@ use Illuminate\Database\Query\JoinClause; use Znck\Eloquent\Traits\BelongsToThrough; use Pterodactyl\Exceptions\Http\Server\ServerStateConflictException; -/** - * @property int $id - * @property string|null $external_id - * @property string $uuid - * @property string $uuidShort - * @property int $node_id - * @property string $name - * @property string $description - * @property string|null $status - * @property bool $skip_scripts - * @property int $owner_id - * @property int $memory - * @property int $swap - * @property int $disk - * @property int $io - * @property int $cpu - * @property string $threads - * @property bool $oom_disabled - * @property int $allocation_id - * @property int $nest_id - * @property int $egg_id - * @property string $startup - * @property string $image - * @property int $allocation_limit - * @property int $database_limit - * @property int $backup_limit - * @property \Carbon\Carbon $created_at - * @property \Carbon\Carbon $updated_at - * @property \Pterodactyl\Models\User $user - * @property \Pterodactyl\Models\Subuser[]|\Illuminate\Database\Eloquent\Collection $subusers - * @property \Pterodactyl\Models\Allocation $allocation - * @property \Pterodactyl\Models\Allocation[]|\Illuminate\Database\Eloquent\Collection $allocations - * @property \Pterodactyl\Models\Node $node - * @property \Pterodactyl\Models\Nest $nest - * @property \Pterodactyl\Models\Egg $egg - * @property \Pterodactyl\Models\EggVariable[]|\Illuminate\Database\Eloquent\Collection $variables - * @property \Pterodactyl\Models\Schedule[]|\Illuminate\Database\Eloquent\Collection $schedule - * @property \Pterodactyl\Models\Database[]|\Illuminate\Database\Eloquent\Collection $databases - * @property \Pterodactyl\Models\Location $location - * @property \Pterodactyl\Models\ServerTransfer $transfer - * @property \Pterodactyl\Models\Backup[]|\Illuminate\Database\Eloquent\Collection $backups - * @property \Pterodactyl\Models\Mount[]|\Illuminate\Database\Eloquent\Collection $mounts - * @property \Pterodactyl\Models\AuditLog[] $audits - */ class Server extends Model { use BelongsToThrough; @@ -239,6 +195,7 @@ class Server extends Model * Gets information for the service variables associated with this server. * * @return \Illuminate\Database\Eloquent\Relations\HasMany + * @phpstan-return \Illuminate\Database\Eloquent\Relations\HasMany<\Pterodactyl\Models\EggVariable> */ public function variables() { diff --git a/app/Notifications/AccountCreated.php b/app/Notifications/AccountCreated.php index e52bed5fe..c2fd145d3 100644 --- a/app/Notifications/AccountCreated.php +++ b/app/Notifications/AccountCreated.php @@ -58,7 +58,7 @@ class AccountCreated extends Notification implements ShouldQueue public function toMail($notifiable) { $message = (new MailMessage()) - ->greeting('Hello ' . $this->user->name . '!') + ->greeting('Hello ' . $this->user->name_first . '!') ->line('You are receiving this email because an account has been created for you on ' . config('app.name') . '.') ->line('Username: ' . $this->user->username) ->line('Email: ' . $this->user->email); diff --git a/app/Notifications/MailTested.php b/app/Notifications/MailTested.php index d0f083acc..ab2cc7a71 100644 --- a/app/Notifications/MailTested.php +++ b/app/Notifications/MailTested.php @@ -27,7 +27,7 @@ class MailTested extends Notification { return (new MailMessage()) ->subject('Pterodactyl Test Message') - ->greeting('Hello ' . $this->user->name . '!') + ->greeting('Hello ' . $this->user->name_first . '!') ->line('This is a test of the Pterodactyl mail system. You\'re good to go!'); } } diff --git a/app/Notifications/ServerInstalled.php b/app/Notifications/ServerInstalled.php index cc5a94313..a115633ac 100644 --- a/app/Notifications/ServerInstalled.php +++ b/app/Notifications/ServerInstalled.php @@ -2,6 +2,7 @@ namespace Pterodactyl\Notifications; +use Webmozart\Assert\Assert; use Illuminate\Bus\Queueable; use Pterodactyl\Events\Event; use Illuminate\Container\Container; @@ -33,6 +34,8 @@ class ServerInstalled extends Notification implements ShouldQueue, ReceivesEvent */ public function handle(Event $event): void { + Assert::propertyExists($event, 'server'); + $event->server->loadMissing('user'); $this->server = $event->server; diff --git a/app/Repositories/Eloquent/BackupRepository.php b/app/Repositories/Eloquent/BackupRepository.php index 051d0ce42..ef4a1d792 100644 --- a/app/Repositories/Eloquent/BackupRepository.php +++ b/app/Repositories/Eloquent/BackupRepository.php @@ -20,10 +20,12 @@ class BackupRepository extends EloquentRepository /** * Determines if too many backups have been generated by the server. * - * @return \Pterodactyl\Models\Backup[]|\Illuminate\Support\Collection + * @return \Illuminate\Support\Collection + * @phpstan-return \Illuminate\Support\Collection<\Pterodactyl\Models\Backup> */ public function getBackupsGeneratedDuringTimespan(int $server, int $seconds = 600) { + // @phpstan-ignore-next-line return $this->getBuilder() ->withTrashed() ->where('server_id', $server) diff --git a/app/Repositories/Eloquent/DatabaseRepository.php b/app/Repositories/Eloquent/DatabaseRepository.php index c42cb91b2..16e024ea6 100644 --- a/app/Repositories/Eloquent/DatabaseRepository.php +++ b/app/Repositories/Eloquent/DatabaseRepository.php @@ -89,10 +89,8 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor /** * Create a new database user on a given connection. - * - * @param $max_connections */ - public function createUser(string $username, string $remote, string $password, $max_connections): bool + public function createUser(string $username, string $remote, string $password, int $max_connections): bool { if (!$max_connections) { return $this->run(sprintf('CREATE USER `%s`@`%s` IDENTIFIED BY \'%s\'', $username, $remote, $password)); @@ -132,8 +130,6 @@ class DatabaseRepository extends EloquentRepository implements DatabaseRepositor /** * Drop a given user on a specific connection. - * - * @return mixed */ public function dropUser(string $username, string $remote): bool { diff --git a/app/Repositories/Eloquent/EggRepository.php b/app/Repositories/Eloquent/EggRepository.php index 98b7db453..29307b396 100644 --- a/app/Repositories/Eloquent/EggRepository.php +++ b/app/Repositories/Eloquent/EggRepository.php @@ -29,6 +29,8 @@ class EggRepository extends EloquentRepository implements EggRepositoryInterface public function getWithVariables(int $id): Egg { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('variables')->findOrFail($id, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); @@ -55,6 +57,8 @@ class EggRepository extends EloquentRepository implements EggRepositoryInterface Assert::true((is_digit($value) || is_string($value)), 'First argument passed to getWithCopyAttributes must be an integer or string, received %s.'); try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('scriptFrom', 'configFrom')->where($column, '=', $value)->firstOrFail($this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); @@ -69,6 +73,8 @@ class EggRepository extends EloquentRepository implements EggRepositoryInterface public function getWithExportAttributes(int $id): Egg { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('scriptFrom', 'configFrom', 'variables')->findOrFail($id, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); diff --git a/app/Repositories/Eloquent/EloquentRepository.php b/app/Repositories/Eloquent/EloquentRepository.php index 3d3e09cdc..25a7ae8e4 100644 --- a/app/Repositories/Eloquent/EloquentRepository.php +++ b/app/Repositories/Eloquent/EloquentRepository.php @@ -4,6 +4,7 @@ namespace Pterodactyl\Repositories\Eloquent; use Illuminate\Http\Request; use Webmozart\Assert\Assert; +use Pterodactyl\Models\Model; use Illuminate\Support\Collection; use Pterodactyl\Repositories\Repository; use Illuminate\Database\Eloquent\Builder; @@ -25,12 +26,8 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf * Determines if the repository function should use filters off the request object * present when returning results. This allows repository methods to be called in API * context's such that we can pass through ?filter[name]=Dane&sort=desc for example. - * - * @param bool $usingFilters - * - * @return $this */ - public function usingRequestFilters($usingFilters = true) + public function usingRequestFilters(bool $usingFilters = true): self { $this->useRequestFilters = $usingFilters; @@ -39,26 +36,22 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf /** * Returns the request instance. - * - * @return \Illuminate\Http\Request */ - protected function request() + protected function request(): Request { return $this->app->make(Request::class); } /** * Paginate the response data based on the page para. - * - * @return \Illuminate\Contracts\Pagination\LengthAwarePaginator */ - protected function paginate(Builder $instance, int $default = 50) + protected function paginate(Builder $instance, int $default = 50): LengthAwarePaginator { if (!$this->useRequestFilters) { return $instance->paginate($default); } - return $instance->paginate($this->request()->query('per_page', $default)); + return $instance->paginate((int) $this->request()->query('per_page', (string) $default)); } /** @@ -91,15 +84,20 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf */ public function create(array $fields, bool $validate = true, bool $force = false) { + /** @phpstan-var \Illuminate\Database\Eloquent\Model $instance */ $instance = $this->getBuilder()->newModelInstance(); ($force) ? $instance->forceFill($fields) : $instance->fill($fields); - if (!$validate) { - $saved = $instance->skipValidation()->save(); - } else { - if (!$saved = $instance->save()) { - throw new DataValidationException($instance->getValidator()); + if ($instance instanceof Model) { + if (!$validate) { + $saved = $instance->skipValidation()->save(); + } else { + if (!$saved = $instance->save()) { + throw new DataValidationException($instance->getValidator()); + } } + } else { + $saved = $instance->save(); } return ($this->withFresh) ? $instance->fresh() : $saved; @@ -150,6 +148,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf */ public function findCountWhere(array $fields): int { + // @phpstan-ignore-next-line return $this->getBuilder()->where($fields)->count($this->getColumns()); } @@ -191,12 +190,16 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf ($force) ? $instance->forceFill($fields) : $instance->fill($fields); - if (!$validate) { - $saved = $instance->skipValidation()->save(); - } else { - if (!$saved = $instance->save()) { - throw new DataValidationException($instance->getValidator()); + if ($instance instanceof Model) { + if (!$validate) { + $saved = $instance->skipValidation()->save(); + } else { + if (!$saved = $instance->save()) { + throw new DataValidationException($instance->getValidator()); + } } + } else { + $saved = $instance->save(); } return ($this->withFresh) ? $instance->fresh() : $saved; @@ -245,6 +248,7 @@ abstract class EloquentRepository extends Repository implements RepositoryInterf return $this->create(array_merge($where, $fields), $validate, $force); } + // @phpstan-ignore-next-line return $this->update($instance->id, $fields, $validate, $force); } diff --git a/app/Repositories/Eloquent/LocationRepository.php b/app/Repositories/Eloquent/LocationRepository.php index c06d10a9f..151c72bcf 100644 --- a/app/Repositories/Eloquent/LocationRepository.php +++ b/app/Repositories/Eloquent/LocationRepository.php @@ -39,13 +39,13 @@ class LocationRepository extends EloquentRepository implements LocationRepositor /** * Return all of the nodes and their respective count of servers for a location. * - * @return mixed - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function getWithNodes(int $id): Location { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('nodes.servers')->findOrFail($id, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); @@ -55,13 +55,13 @@ class LocationRepository extends EloquentRepository implements LocationRepositor /** * Return a location and the count of nodes in that location. * - * @return mixed - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function getWithNodeCount(int $id): Location { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->withCount('nodes')->findOrFail($id, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); diff --git a/app/Repositories/Eloquent/MountRepository.php b/app/Repositories/Eloquent/MountRepository.php index 490f76b64..58d870ecd 100644 --- a/app/Repositories/Eloquent/MountRepository.php +++ b/app/Repositories/Eloquent/MountRepository.php @@ -31,13 +31,13 @@ class MountRepository extends EloquentRepository /** * Return all of the mounts and their respective relations. * - * @return mixed - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ public function getWithRelations(string $id): Mount { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('eggs', 'nodes')->findOrFail($id, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); diff --git a/app/Repositories/Eloquent/NestRepository.php b/app/Repositories/Eloquent/NestRepository.php index 7e4884255..131a0d862 100644 --- a/app/Repositories/Eloquent/NestRepository.php +++ b/app/Repositories/Eloquent/NestRepository.php @@ -28,15 +28,14 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa /** * Return a nest or all nests with their associated eggs and variables. * - * @return \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Nest - * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException */ - public function getWithEggs(int $id = null) + public function getWithEggs(int $id = null): Nest { $instance = $this->getBuilder()->with('eggs', 'eggs.variables'); if (!is_null($id)) { + /** @var \Pterodactyl\Models\Nest|null $instance */ $instance = $instance->find($id, $this->getColumns()); if (!$instance) { throw new RecordNotFoundException(); @@ -45,45 +44,8 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa return $instance; } + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $instance->get($this->getColumns()); } - - /** - * Return a nest or all nests and the count of eggs and servers for that nest. - * - * @return \Pterodactyl\Models\Nest|\Illuminate\Database\Eloquent\Collection - * - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function getWithCounts(int $id = null) - { - $instance = $this->getBuilder()->withCount(['eggs', 'servers']); - - if (!is_null($id)) { - $instance = $instance->find($id, $this->getColumns()); - if (!$instance) { - throw new RecordNotFoundException(); - } - - return $instance; - } - - return $instance->get($this->getColumns()); - } - - /** - * Return a nest along with its associated eggs and the servers relation on those eggs. - * - * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException - */ - public function getWithEggServers(int $id): Nest - { - $instance = $this->getBuilder()->with('eggs.servers')->find($id, $this->getColumns()); - if (!$instance) { - throw new RecordNotFoundException(); - } - - /* @var Nest $instance */ - return $instance; - } } diff --git a/app/Repositories/Eloquent/NodeRepository.php b/app/Repositories/Eloquent/NodeRepository.php index 125a21fb3..39a1beac2 100644 --- a/app/Repositories/Eloquent/NodeRepository.php +++ b/app/Repositories/Eloquent/NodeRepository.php @@ -59,7 +59,10 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa $this->getBuilder()->raw('IFNULL(SUM(servers.memory), 0) as sum_memory, IFNULL(SUM(servers.disk), 0) as sum_disk') )->join('servers', 'servers.node_id', '=', 'nodes.id')->where('node_id', $node->id)->first(); - return collect(['disk' => $stats->sum_disk, 'memory' => $stats->sum_memory])->mapWithKeys(function ($value, $key) use ($node) { + return collect([ + 'disk' => $stats->sum_disk, + 'memory' => $stats->sum_memory, + ])->mapWithKeys(function ($value, $key) use ($node) { $maxUsage = $node->{$key}; if ($node->{$key . '_overallocate'} > 0) { $maxUsage = $node->{$key} * (1 + ($node->{$key . '_overallocate'} / 100)); @@ -85,6 +88,7 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa // This is quite ugly and can probably be improved down the road. // And by probably, I mean it should. + // @phpstan-ignore-next-line if (is_null($node->servers_count) || $refresh) { $node->load('servers'); $node->setRelation('servers_count', count($node->getRelation('servers'))); @@ -118,22 +122,28 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa */ public function getNodesForServerCreation(): Collection { - return $this->getBuilder()->with('allocations')->get()->map(function (Node $item) { + /** @phpstan-var \Illuminate\Database\Eloquent\Collection<\Pterodactyl\Models\Node> $collection */ + $collection = $this->getBuilder()->with('allocations')->get(); + + return $collection->map(function (Node $item) { + /** @phpstan-var \Illuminate\Support\Collection $filtered */ $filtered = $item->getRelation('allocations')->where('server_id', null)->map(function ($map) { return collect($map)->only(['id', 'ip', 'port']); }); - $item->ports = $filtered->map(function ($map) { + $ports = $filtered->map(function ($map) { return [ 'id' => $map['id'], 'text' => sprintf('%s:%s', $map['ip'], $map['port']), ]; })->values(); + $item->setAttribute('ports', $ports); + return [ 'id' => $item->id, 'text' => $item->name, - 'allocations' => $item->ports, + 'allocations' => $ports, ]; })->values(); } @@ -144,11 +154,22 @@ class NodeRepository extends EloquentRepository implements NodeRepositoryInterfa public function getNodeWithResourceUsage(int $node_id): Node { $instance = $this->getBuilder() - ->select(['nodes.id', 'nodes.fqdn', 'nodes.public_port_http', 'nodes.scheme', 'nodes.daemon_token', 'nodes.memory', 'nodes.disk', 'nodes.memory_overallocate', 'nodes.disk_overallocate']) + ->select([ + 'nodes.id', + 'nodes.fqdn', + 'nodes.public_port_http', + 'nodes.scheme', + 'nodes.daemon_token', + 'nodes.memory', + 'nodes.disk', + 'nodes.memory_overallocate', + 'nodes.disk_overallocate', + ]) ->selectRaw('IFNULL(SUM(servers.memory), 0) as sum_memory, IFNULL(SUM(servers.disk), 0) as sum_disk') ->leftJoin('servers', 'servers.node_id', '=', 'nodes.id') ->where('nodes.id', $node_id); + /* @noinspection PhpIncompatibleReturnTypeInspection */ return $instance->first(); } } diff --git a/app/Repositories/Eloquent/ScheduleRepository.php b/app/Repositories/Eloquent/ScheduleRepository.php index 5c999df87..b39343bda 100644 --- a/app/Repositories/Eloquent/ScheduleRepository.php +++ b/app/Repositories/Eloquent/ScheduleRepository.php @@ -36,6 +36,8 @@ class ScheduleRepository extends EloquentRepository implements ScheduleRepositor public function getScheduleWithTasks(int $schedule): Schedule { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('tasks')->findOrFail($schedule, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); diff --git a/app/Repositories/Eloquent/ServerRepository.php b/app/Repositories/Eloquent/ServerRepository.php index 8bb79c10f..8caeeaee1 100644 --- a/app/Repositories/Eloquent/ServerRepository.php +++ b/app/Repositories/Eloquent/ServerRepository.php @@ -74,6 +74,8 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt public function findWithVariables(int $id): Server { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('egg.variables', 'variables') ->where($this->getModel()->getKeyName(), '=', $id) ->firstOrFail($this->getColumns()); diff --git a/app/Repositories/Eloquent/TaskRepository.php b/app/Repositories/Eloquent/TaskRepository.php index 718f99490..35a24e8ac 100644 --- a/app/Repositories/Eloquent/TaskRepository.php +++ b/app/Repositories/Eloquent/TaskRepository.php @@ -27,6 +27,8 @@ class TaskRepository extends EloquentRepository implements TaskRepositoryInterfa public function getTaskForJobProcess(int $id): Task { try { + /* @noinspection PhpIncompatibleReturnTypeInspection */ + // @phpstan-ignore-next-line return $this->getBuilder()->with('server.user', 'schedule')->findOrFail($id, $this->getColumns()); } catch (ModelNotFoundException $exception) { throw new RecordNotFoundException(); diff --git a/app/Repositories/Repository.php b/app/Repositories/Repository.php index a80051942..2b13e4874 100644 --- a/app/Repositories/Repository.php +++ b/app/Repositories/Repository.php @@ -118,7 +118,8 @@ abstract class Repository implements RepositoryInterface /** * Take the provided model and make it accessible to the rest of the repository. * - * @param array $model + * @param string[] $model + * @phpstan-param class-string<\Illuminate\Database\Eloquent\Model> $model * * @return mixed */ @@ -128,6 +129,7 @@ abstract class Repository implements RepositoryInterface case 1: return $this->model = $this->app->make($model[0]); case 2: + // @phpstan-ignore-next-line return $this->model = call_user_func([$this->app->make($model[0]), $model[1]]); default: throw new InvalidArgumentException('Model must be a FQDN or an array with a count of two.'); diff --git a/app/Rules/Username.php b/app/Rules/Username.php index bae204952..a466d3cb2 100644 --- a/app/Rules/Username.php +++ b/app/Rules/Username.php @@ -22,7 +22,7 @@ class Username implements Rule */ public function passes($attribute, $value): bool { - return preg_match(self::VALIDATION_REGEX, mb_strtolower($value)); + return preg_match(self::VALIDATION_REGEX, mb_strtolower($value)) === 1; } /** diff --git a/app/Services/Allocations/AssignmentService.php b/app/Services/Allocations/AssignmentService.php index 878c7307a..f18ccb922 100644 --- a/app/Services/Allocations/AssignmentService.php +++ b/app/Services/Allocations/AssignmentService.php @@ -64,6 +64,7 @@ class AssignmentService $parsed = Network::parse($underlying); } catch (Exception $exception) { /* @noinspection PhpUndefinedVariableInspection */ + // @phpstan-ignore-next-line throw new DisplayException("Could not parse provided allocation IP address ({$underlying}): {$exception->getMessage()}", $exception); } diff --git a/app/Services/Backups/DeleteBackupService.php b/app/Services/Backups/DeleteBackupService.php index 66eefe675..6ca87ebbb 100644 --- a/app/Services/Backups/DeleteBackupService.php +++ b/app/Services/Backups/DeleteBackupService.php @@ -102,6 +102,7 @@ class DeleteBackupService /** @var \League\Flysystem\AwsS3v3\AwsS3Adapter $adapter */ $adapter = $this->manager->adapter(Backup::ADAPTER_AWS_S3); + // @phpstan-ignore-next-line this is defined on the actual S3Client class, just not on the interface. $adapter->getClient()->deleteObject([ 'Bucket' => $adapter->getBucket(), 'Key' => sprintf('%s/%s.tar.gz', $backup->server->uuid, $backup->uuid), diff --git a/app/Services/Backups/InitiateBackupService.php b/app/Services/Backups/InitiateBackupService.php index d368fb609..d3f0480bc 100644 --- a/app/Services/Backups/InitiateBackupService.php +++ b/app/Services/Backups/InitiateBackupService.php @@ -9,6 +9,7 @@ use Pterodactyl\Models\Backup; use Pterodactyl\Models\Server; use Illuminate\Database\ConnectionInterface; use Pterodactyl\Extensions\Backups\BackupManager; +use Illuminate\Database\Eloquent\Relations\HasMany; use Pterodactyl\Repositories\Eloquent\BackupRepository; use Pterodactyl\Repositories\Wings\DaemonBackupRepository; use Pterodactyl\Exceptions\Service\Backup\TooManyBackupsException; @@ -53,8 +54,6 @@ class InitiateBackupService /** * InitiateBackupService constructor. - * - * @param \Pterodactyl\Services\Backups\DeleteBackupService $deleteBackupService */ public function __construct( BackupRepository $repository, @@ -140,7 +139,7 @@ class InitiateBackupService // Get the oldest backup the server has that is not "locked" (indicating a backup that should // never be automatically purged). If we find a backup we will delete it and then continue with // this process. If no backup is found that can be used an exception is thrown. - /** @var \Pterodactyl\Models\Backup $oldest */ + /** @var \Pterodactyl\Models\Backup|null $oldest */ $oldest = $successful->where('is_locked', false)->orderBy('created_at')->first(); if (!$oldest) { throw new TooManyBackupsException($server->backup_limit); diff --git a/app/Services/Databases/DatabaseManagementService.php b/app/Services/Databases/DatabaseManagementService.php index a10b22719..ed2c9e148 100644 --- a/app/Services/Databases/DatabaseManagementService.php +++ b/app/Services/Databases/DatabaseManagementService.php @@ -152,6 +152,7 @@ class DatabaseManagementService }); } catch (Exception $exception) { try { + // @phpstan-ignore-next-line doesn't understand the pass-by-reference above if ($database instanceof Database) { $this->repository->dropDatabase($database->database); $this->repository->dropUser($database->username, $database->remote); diff --git a/app/Services/Databases/DatabasePasswordService.php b/app/Services/Databases/DatabasePasswordService.php index aabe98388..882b1c124 100644 --- a/app/Services/Databases/DatabasePasswordService.php +++ b/app/Services/Databases/DatabasePasswordService.php @@ -49,8 +49,6 @@ class DatabasePasswordService /** * Updates a password for a given database. * - * @param \Pterodactyl\Models\Database|int $database - * * @throws \Throwable */ public function handle(Database $database): string diff --git a/app/Services/Eggs/EggConfigurationService.php b/app/Services/Eggs/EggConfigurationService.php index 4dce8fd25..ebe119c1f 100644 --- a/app/Services/Eggs/EggConfigurationService.php +++ b/app/Services/Eggs/EggConfigurationService.php @@ -205,6 +205,7 @@ class EggConfigurationService // Replace anything starting with "server." with the value out of the server configuration // array that used to be created for the old daemon. if (Str::startsWith($key, 'server.')) { + // @phpstan-ignore-next-line $plucked = Arr::get($structure, preg_replace('/^server\./', '', $key), ''); $value = str_replace("{{{$key}}}", $plucked, $value); @@ -215,6 +216,7 @@ class EggConfigurationService // variable from the server configuration. $plucked = Arr::get( $structure, + // @phpstan-ignore-next-line preg_replace('/^env\./', 'build.env.', $key), '' ); diff --git a/app/Services/Eggs/Scripts/InstallScriptService.php b/app/Services/Eggs/Scripts/InstallScriptService.php index ecd1dc1f3..5273698fe 100644 --- a/app/Services/Eggs/Scripts/InstallScriptService.php +++ b/app/Services/Eggs/Scripts/InstallScriptService.php @@ -24,13 +24,11 @@ class InstallScriptService /** * Modify the install script for a given Egg. * - * @param int|\Pterodactyl\Models\Egg $egg - * * @throws \Pterodactyl\Exceptions\Model\DataValidationException * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException * @throws \Pterodactyl\Exceptions\Service\Egg\InvalidCopyFromException */ - public function handle(Egg $egg, array $data) + public function handle(Egg $egg, array $data): void { if (!is_null(array_get($data, 'copy_script_from'))) { if (!$this->repository->isCopyableScript(array_get($data, 'copy_script_from'), $egg->nest_id)) { diff --git a/app/Services/Eggs/Sharing/EggImporterService.php b/app/Services/Eggs/Sharing/EggImporterService.php index 4e71867c4..a9c750ba0 100644 --- a/app/Services/Eggs/Sharing/EggImporterService.php +++ b/app/Services/Eggs/Sharing/EggImporterService.php @@ -14,8 +14,8 @@ use Symfony\Component\Yaml\Exception\ParseException; use Pterodactyl\Contracts\Repository\EggRepositoryInterface; use Pterodactyl\Contracts\Repository\NestRepositoryInterface; use Pterodactyl\Exceptions\Service\Egg\BadJsonFormatException; -use Pterodactyl\Exceptions\Service\InvalidFileUploadException; use Pterodactyl\Exceptions\Service\Egg\BadYamlFormatException; +use Pterodactyl\Exceptions\Service\InvalidFileUploadException; use Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface; class EggImporterService @@ -58,7 +58,7 @@ class EggImporterService /** * Take an uploaded JSON file and parse it into a new egg. * - * @deprecated Use `handleFile` or `handleContent` instead. + * @deprecated use `handleFile` or `handleContent` instead * * @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException * @throws \Pterodactyl\Exceptions\Service\Egg\BadJsonFormatException diff --git a/app/Services/Eggs/Variables/VariableCreationService.php b/app/Services/Eggs/Variables/VariableCreationService.php index 11fafb44b..4f866c8c9 100644 --- a/app/Services/Eggs/Variables/VariableCreationService.php +++ b/app/Services/Eggs/Variables/VariableCreationService.php @@ -59,6 +59,7 @@ class VariableCreationService 'user_editable' => in_array('user_editable', $options), 'rules' => $data['rules'] ?? '', ]); + return $model; } } diff --git a/app/Services/Eggs/Variables/VariableUpdateService.php b/app/Services/Eggs/Variables/VariableUpdateService.php index 866f2157f..49abb0f13 100644 --- a/app/Services/Eggs/Variables/VariableUpdateService.php +++ b/app/Services/Eggs/Variables/VariableUpdateService.php @@ -8,7 +8,6 @@ use Pterodactyl\Models\EggVariable; use Illuminate\Contracts\Validation\Factory; use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Traits\Services\ValidatesValidationRules; -use Pterodactyl\Contracts\Repository\EggVariableRepositoryInterface; use Pterodactyl\Exceptions\Service\Egg\Variable\ReservedVariableNameException; class VariableUpdateService @@ -51,7 +50,7 @@ class VariableUpdateService } $count = $egg->variables() - ->where('egg_variables.env_variable',$data['env_variable']) + ->where('egg_variables.env_variable', $data['env_variable']) ->where('egg_variables.id', '!=', $data['id']) ->count(); diff --git a/app/Services/Helpers/SoftwareVersionService.php b/app/Services/Helpers/SoftwareVersionService.php index f601e6f20..83a47c510 100644 --- a/app/Services/Helpers/SoftwareVersionService.php +++ b/app/Services/Helpers/SoftwareVersionService.php @@ -6,6 +6,7 @@ use Exception; use GuzzleHttp\Client; use Carbon\CarbonImmutable; use Illuminate\Support\Arr; +use Illuminate\Support\Str; use Illuminate\Contracts\Cache\Repository as CacheRepository; use Pterodactyl\Exceptions\Service\Helper\CdnVersionFetchingException; diff --git a/app/Services/Nodes/NodeDeletionService.php b/app/Services/Nodes/NodeDeletionService.php index 30483a826..e8a1dc887 100644 --- a/app/Services/Nodes/NodeDeletionService.php +++ b/app/Services/Nodes/NodeDeletionService.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Services\Nodes; @@ -48,23 +41,15 @@ class NodeDeletionService /** * Delete a node from the panel if no servers are attached to it. * - * @param int|\Pterodactyl\Models\Node $node - * - * @return bool|null - * * @throws \Pterodactyl\Exceptions\Service\HasActiveServersException */ - public function handle($node) + public function handle(Node $node): void { - if ($node instanceof Node) { - $node = $node->id; - } - - $servers = $this->serverRepository->setColumns('id')->findCountWhere([['node_id', '=', $node]]); + $servers = $this->serverRepository->setColumns('id')->findCountWhere([['node_id', '=', $node->id]]); if ($servers > 0) { - throw new HasActiveServersException($this->translator->trans('exceptions.node.servers_attached')); + throw new HasActiveServersException($this->translator->get('exceptions.node.servers_attached')); } - return $this->repository->delete($node); + $this->repository->delete($node->id); } } diff --git a/app/Services/Nodes/NodeJWTService.php b/app/Services/Nodes/NodeJWTService.php index 1b52479ba..9a72bf21d 100644 --- a/app/Services/Nodes/NodeJWTService.php +++ b/app/Services/Nodes/NodeJWTService.php @@ -63,8 +63,6 @@ class NodeJWTService /** * Generate a new JWT for a given node. * - * @param string|null $identifiedBy - * * @return \Lcobucci\JWT\Token\Plain */ public function handle(Node $node, string $identifiedBy, string $algo = 'md5') diff --git a/app/Services/Schedules/ProcessScheduleService.php b/app/Services/Schedules/ProcessScheduleService.php index a131ad573..9559dc129 100644 --- a/app/Services/Schedules/ProcessScheduleService.php +++ b/app/Services/Schedules/ProcessScheduleService.php @@ -45,7 +45,7 @@ class ProcessScheduleService */ public function handle(Schedule $schedule, bool $now = false) { - /** @var \Pterodactyl\Models\Task $task */ + /** @var \Pterodactyl\Models\Task|null $task */ $task = $schedule->tasks()->orderBy('sequence_id')->first(); if (is_null($task)) { diff --git a/app/Services/Servers/BuildModificationService.php b/app/Services/Servers/BuildModificationService.php index 66eb52235..152ea9d6e 100644 --- a/app/Services/Servers/BuildModificationService.php +++ b/app/Services/Servers/BuildModificationService.php @@ -33,8 +33,6 @@ class BuildModificationService * BuildModificationService constructor. * * @param \Pterodactyl\Services\Servers\ServerConfigurationStructureService $structureService - * @param \Illuminate\Database\ConnectionInterface $connection - * @param \Pterodactyl\Repositories\Wings\DaemonServerRepository $daemonServerRepository */ public function __construct( ServerConfigurationStructureService $structureService, @@ -57,7 +55,7 @@ class BuildModificationService public function handle(Server $server, array $data) { /** @var \Pterodactyl\Models\Server $server */ - $server = $this->connection->transaction(function() use ($server, $data) { + $server = $this->connection->transaction(function () use ($server, $data) { $this->processAllocations($server, $data); if (isset($data['allocation_id']) && $data['allocation_id'] != $server->allocation_id) { @@ -115,11 +113,12 @@ class BuildModificationService $query = Allocation::query() ->where('node_id', $server->node_id) ->whereIn('id', $data['add_allocations']) - ->whereNull('server_id'); + ->whereNull('server_id') + ->first(); // Keep track of all the allocations we're just now adding so that we can use the first // one to reset the default allocation to. - $freshlyAllocated = $query->pluck('id')->first(); + $freshlyAllocated = optional($query)->id; $query->update(['server_id' => $server->id, 'notes' => null]); } diff --git a/app/Services/Servers/EnvironmentService.php b/app/Services/Servers/EnvironmentService.php index 54b82bab3..18593e2c2 100644 --- a/app/Services/Servers/EnvironmentService.php +++ b/app/Services/Servers/EnvironmentService.php @@ -36,6 +36,7 @@ class EnvironmentService public function handle(Server $server): array { $variables = $server->variables->toBase()->mapWithKeys(function (EggVariable $variable) { + // @phpstan-ignore-next-line return [$variable->env_variable => $variable->server_value ?? $variable->default_value]; }); diff --git a/app/Services/Servers/StartupCommandService.php b/app/Services/Servers/StartupCommandService.php index efdbbc5c4..62c06c94f 100644 --- a/app/Services/Servers/StartupCommandService.php +++ b/app/Services/Servers/StartupCommandService.php @@ -16,6 +16,7 @@ class StartupCommandService foreach ($server->variables as $variable) { $find[] = '{{' . $variable->env_variable . '}}'; + // @phpstan-ignore-next-line $replace[] = ($variable->user_viewable && !$hideAllValues) ? ($variable->server_value ?? $variable->default_value) : '[hidden]'; } diff --git a/app/Services/Servers/TransferService.php b/app/Services/Servers/TransferService.php index 35aed0659..c2db504c3 100644 --- a/app/Services/Servers/TransferService.php +++ b/app/Services/Servers/TransferService.php @@ -4,15 +4,9 @@ namespace Pterodactyl\Services\Servers; use Pterodactyl\Models\Server; use Pterodactyl\Repositories\Wings\DaemonServerRepository; -use Pterodactyl\Contracts\Repository\ServerRepositoryInterface; class TransferService { - /** - * @var \Pterodactyl\Contracts\Repository\ServerRepositoryInterface - */ - private $repository; - /** * @var \Pterodactyl\Repositories\Wings\DaemonServerRepository */ @@ -21,19 +15,14 @@ class TransferService /** * TransferService constructor. */ - public function __construct( - DaemonServerRepository $daemonServerRepository, - ServerRepositoryInterface $repository - ) { - $this->repository = $repository; + public function __construct(DaemonServerRepository $daemonServerRepository) + { $this->daemonServerRepository = $daemonServerRepository; } /** * Requests an archive from the daemon. * - * @param int|\Pterodactyl\Models\Server $server - * * @throws \Throwable */ public function requestArchive(Server $server) diff --git a/app/Services/Users/UserDeletionService.php b/app/Services/Users/UserDeletionService.php index 87459773e..f00b57341 100644 --- a/app/Services/Users/UserDeletionService.php +++ b/app/Services/Users/UserDeletionService.php @@ -1,11 +1,4 @@ . - * - * This software is licensed under the terms of the MIT license. - * https://opensource.org/licenses/MIT - */ namespace Pterodactyl\Services\Users; @@ -48,23 +41,15 @@ class UserDeletionService /** * Delete a user from the panel only if they have no servers attached to their account. * - * @param int|\Pterodactyl\Models\User $user - * - * @return bool|null - * * @throws \Pterodactyl\Exceptions\DisplayException */ - public function handle($user) + public function handle(User $user): void { - if ($user instanceof User) { - $user = $user->id; - } - - $servers = $this->serverRepository->setColumns('id')->findCountWhere([['owner_id', '=', $user]]); + $servers = $this->serverRepository->setColumns('id')->findCountWhere([['owner_id', '=', $user->id]]); if ($servers > 0) { - throw new DisplayException($this->translator->trans('admin/user.exceptions.user_has_servers')); + throw new DisplayException($this->translator->get('admin/user.exceptions.user_has_servers')); } - return $this->repository->delete($user); + $this->repository->delete($user->id); } } diff --git a/app/Traits/Helpers/AvailableLanguages.php b/app/Traits/Helpers/AvailableLanguages.php index 479722976..e9884dbc0 100644 --- a/app/Traits/Helpers/AvailableLanguages.php +++ b/app/Traits/Helpers/AvailableLanguages.php @@ -8,14 +8,14 @@ use Illuminate\Filesystem\Filesystem; trait AvailableLanguages { /** - * @var \Illuminate\Filesystem\Filesystem + * @var \Illuminate\Filesystem\Filesystem|null; */ - private $filesystem; + private $filesystem = null; /** - * @var \Matriphe\ISO639\ISO639 + * @var \Matriphe\ISO639\ISO639|null */ - private $iso639; + private $iso639 = null; /** * Return all of the available languages on the Panel based on those diff --git a/app/Transformers/Api/Application/DatabaseHostTransformer.php b/app/Transformers/Api/Application/DatabaseHostTransformer.php index dd45c3614..dd272a7ea 100644 --- a/app/Transformers/Api/Application/DatabaseHostTransformer.php +++ b/app/Transformers/Api/Application/DatabaseHostTransformer.php @@ -28,6 +28,7 @@ class DatabaseHostTransformer extends Transformer 'host' => $model->host, 'port' => $model->port, 'username' => $model->username, + // @phpstan-ignore-next-line no clue why it can't find this. 'node' => $model->node_id, 'created_at' => self::formatTimestamp($model->created_at), 'updated_at' => self::formatTimestamp($model->updated_at), diff --git a/app/Transformers/Api/Application/ServerVariableTransformer.php b/app/Transformers/Api/Application/ServerVariableTransformer.php index 8a9b910db..172519f11 100644 --- a/app/Transformers/Api/Application/ServerVariableTransformer.php +++ b/app/Transformers/Api/Application/ServerVariableTransformer.php @@ -40,6 +40,8 @@ class ServerVariableTransformer extends Transformer return $this->null(); } + // TODO: confirm this code? + // @phpstan-ignore-next-line This might actually be wrong, not sure? return $this->item($variable->variable, new EggVariableTransformer()); } } diff --git a/app/Transformers/Api/Client/EggVariableTransformer.php b/app/Transformers/Api/Client/EggVariableTransformer.php index f37153e7a..50635e3df 100644 --- a/app/Transformers/Api/Client/EggVariableTransformer.php +++ b/app/Transformers/Api/Client/EggVariableTransformer.php @@ -27,7 +27,7 @@ class EggVariableTransformer extends Transformer 'description' => $variable->description, 'env_variable' => $variable->env_variable, 'default_value' => $variable->default_value, - 'server_value' => $variable->server_value, + 'server_value' => property_exists($variable, 'server_value') ? $variable->server_value : null, 'is_editable' => $variable->user_editable, 'rules' => $variable->rules, ]; diff --git a/app/Transformers/Api/Transformer.php b/app/Transformers/Api/Transformer.php index 91fdc0a3e..413d61de5 100644 --- a/app/Transformers/Api/Transformer.php +++ b/app/Transformers/Api/Transformer.php @@ -5,6 +5,7 @@ namespace Pterodactyl\Transformers\Api; use Closure; use DateTimeInterface; use Carbon\CarbonImmutable; +use Carbon\CarbonInterface; use Illuminate\Http\Request; use Pterodactyl\Models\User; use Webmozart\Assert\Assert; @@ -64,7 +65,7 @@ abstract class Transformer extends TransformerAbstract * * @param mixed $data * @param callable|\League\Fractal\TransformerAbstract $transformer - * @param null $resourceKey + * @param string|null $resourceKey * * @return \League\Fractal\Resource\Item */ @@ -76,7 +77,7 @@ abstract class Transformer extends TransformerAbstract $item = parent::item($data, $transformer, $resourceKey); - if (!$item->getResourceKey()) { + if (!$item->getResourceKey() && method_exists($transformer, 'getResourceName')) { $item->setResourceKey($transformer->getResourceName()); } @@ -88,7 +89,7 @@ abstract class Transformer extends TransformerAbstract * * @param mixed $data * @param callable|\League\Fractal\TransformerAbstract $transformer - * @param null $resourceKey + * @param string|null $resourceKey * * @return \League\Fractal\Resource\Collection */ @@ -100,7 +101,7 @@ abstract class Transformer extends TransformerAbstract $collection = parent::collection($data, $transformer, $resourceKey); - if (!$collection->getResourceKey()) { + if (!$collection->getResourceKey() && method_exists($transformer, 'getResourceName')) { $collection->setResourceKey($transformer->getResourceName()); } @@ -151,7 +152,7 @@ abstract class Transformer extends TransformerAbstract if ($timestamp instanceof DateTimeInterface) { $value = CarbonImmutable::instance($timestamp); } else { - $value = CarbonImmutable::createFromFormat(CarbonImmutable::DEFAULT_TO_STRING_FORMAT, $timestamp); + $value = CarbonImmutable::createFromFormat(CarbonInterface::DEFAULT_TO_STRING_FORMAT, $timestamp); } return $value->setTimezone($tz ?? self::$timezone)->toIso8601String(); diff --git a/app/helpers.php b/app/helpers.php index 9c1b4ed1b..484aacec6 100644 --- a/app/helpers.php +++ b/app/helpers.php @@ -21,8 +21,8 @@ if (!function_exists('object_get_strict')) { * and will not trigger the response of a default value (unlike object_get). * * @param object $object - * @param string $key - * @param null $default + * @param string|null $key + * @param mixed|null $default * * @return mixed */ diff --git a/composer.json b/composer.json index 24bc5936b..469a1e0e2 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ "guzzlehttp/guzzle": "^7.3", "hashids/hashids": "^4.1", "laracasts/utilities": "^3.2", - "laravel/framework": "^8.58", + "laravel/framework": "^8.68", "laravel/helpers": "^1.4", "laravel/sanctum": "^2.11", "laravel/tinker": "^2.6", @@ -53,7 +53,9 @@ "laravel/dusk": "^6.18", "mockery/mockery": "^1.4", "nunomaduro/collision": "^5.9", + "nunomaduro/larastan": "^0.7.15", "php-mock/php-mock-phpunit": "^2.6", + "phpstan/phpstan-webmozart-assert": "^0.12.16", "phpunit/phpunit": "^9.5" }, "autoload": { diff --git a/composer.lock b/composer.lock index 9875d30af..b7f06d4f1 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "e33e2f1c67ffd0f166a97917dfacd63a", + "content-hash": "cd99dc7fcdf315ee4d87650ec0903da3", "packages": [ { "name": "asbiin/laravel-webauthn", @@ -147,26 +147,26 @@ }, { "name": "aws/aws-sdk-php", - "version": "3.192.0", + "version": "3.199.7", "source": { "type": "git", "url": "https://github.com/aws/aws-sdk-php.git", - "reference": "3f3026ecd3ef534701499ce98c8e3393604fca8b" + "reference": "fda176884d2952cffc7e67209470bff49609339c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/3f3026ecd3ef534701499ce98c8e3393604fca8b", - "reference": "3f3026ecd3ef534701499ce98c8e3393604fca8b", + "url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/fda176884d2952cffc7e67209470bff49609339c", + "reference": "fda176884d2952cffc7e67209470bff49609339c", "shasum": "" }, "require": { - "aws/aws-crt-php": "^1.0.1", + "aws/aws-crt-php": "^1.0.2", "ext-json": "*", "ext-pcre": "*", "ext-simplexml": "*", "guzzlehttp/guzzle": "^5.3.3|^6.2.1|^7.0", "guzzlehttp/promises": "^1.4.0", - "guzzlehttp/psr7": "^1.7.0", + "guzzlehttp/psr7": "^1.7.0|^2.0", "mtdowling/jmespath.php": "^2.6", "php": ">=5.5" }, @@ -232,9 +232,9 @@ "support": { "forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80", "issues": "https://github.com/aws/aws-sdk-php/issues", - "source": "https://github.com/aws/aws-sdk-php/tree/3.192.0" + "source": "https://github.com/aws/aws-sdk-php/tree/3.199.7" }, - "time": "2021-09-03T18:13:44+00:00" + "time": "2021-10-29T18:25:02+00:00" }, { "name": "beberlei/assert", @@ -431,16 +431,16 @@ }, { "name": "composer/package-versions-deprecated", - "version": "1.11.99.3", + "version": "1.11.99.4", "source": { "type": "git", "url": "https://github.com/composer/package-versions-deprecated.git", - "reference": "fff576ac850c045158a250e7e27666e146e78d18" + "reference": "b174585d1fe49ceed21928a945138948cb394600" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/fff576ac850c045158a250e7e27666e146e78d18", - "reference": "fff576ac850c045158a250e7e27666e146e78d18", + "url": "https://api.github.com/repos/composer/package-versions-deprecated/zipball/b174585d1fe49ceed21928a945138948cb394600", + "reference": "b174585d1fe49ceed21928a945138948cb394600", "shasum": "" }, "require": { @@ -484,7 +484,7 @@ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)", "support": { "issues": "https://github.com/composer/package-versions-deprecated/issues", - "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.3" + "source": "https://github.com/composer/package-versions-deprecated/tree/1.11.99.4" }, "funding": [ { @@ -500,7 +500,7 @@ "type": "tidelift" } ], - "time": "2021-08-17T13:49:14+00:00" + "time": "2021-09-13T08:41:34+00:00" }, { "name": "dflydev/dot-access-data", @@ -678,16 +678,16 @@ }, { "name": "doctrine/dbal", - "version": "3.1.1", + "version": "3.1.3", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "8e0fde2b90e3f61361013d1e928621beeea07bc0" + "reference": "96b0053775a544b4a6ab47654dac0621be8b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/8e0fde2b90e3f61361013d1e928621beeea07bc0", - "reference": "8e0fde2b90e3f61361013d1e928621beeea07bc0", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/96b0053775a544b4a6ab47654dac0621be8b4cf8", + "reference": "96b0053775a544b4a6ab47654dac0621be8b4cf8", "shasum": "" }, "require": { @@ -699,15 +699,15 @@ }, "require-dev": { "doctrine/coding-standard": "9.0.0", - "jetbrains/phpstorm-stubs": "2020.2", - "phpstan/phpstan": "0.12.81", - "phpstan/phpstan-strict-rules": "^0.12.2", - "phpunit/phpunit": "9.5.5", - "psalm/plugin-phpunit": "0.13.0", + "jetbrains/phpstorm-stubs": "2021.1", + "phpstan/phpstan": "0.12.99", + "phpstan/phpstan-strict-rules": "^0.12.11", + "phpunit/phpunit": "9.5.10", + "psalm/plugin-phpunit": "0.16.1", "squizlabs/php_codesniffer": "3.6.0", "symfony/cache": "^5.2|^6.0", "symfony/console": "^2.0.5|^3.0|^4.0|^5.0|^6.0", - "vimeo/psalm": "4.6.4" + "vimeo/psalm": "4.10.0" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -767,7 +767,7 @@ ], "support": { "issues": "https://github.com/doctrine/dbal/issues", - "source": "https://github.com/doctrine/dbal/tree/3.1.1" + "source": "https://github.com/doctrine/dbal/tree/3.1.3" }, "funding": [ { @@ -783,7 +783,7 @@ "type": "tidelift" } ], - "time": "2021-06-19T17:59:55+00:00" + "time": "2021-10-02T16:15:05+00:00" }, { "name": "doctrine/deprecations", @@ -924,34 +924,30 @@ }, { "name": "doctrine/inflector", - "version": "2.0.3", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210" + "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/9cf661f4eb38f7c881cac67c75ea9b00bf97b210", - "reference": "9cf661f4eb38f7c881cac67c75ea9b00bf97b210", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", + "reference": "8b7ff3e4b7de6b2c84da85637b59fd2880ecaa89", "shasum": "" }, "require": { "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/coding-standard": "^7.0", - "phpstan/phpstan": "^0.11", - "phpstan/phpstan-phpunit": "^0.11", - "phpstan/phpstan-strict-rules": "^0.11", - "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0" + "doctrine/coding-standard": "^8.2", + "phpstan/phpstan": "^0.12", + "phpstan/phpstan-phpunit": "^0.12", + "phpstan/phpstan-strict-rules": "^0.12", + "phpunit/phpunit": "^7.0 || ^8.0 || ^9.0", + "vimeo/psalm": "^4.10" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, "autoload": { "psr-4": { "Doctrine\\Inflector\\": "lib/Doctrine/Inflector" @@ -999,7 +995,7 @@ ], "support": { "issues": "https://github.com/doctrine/inflector/issues", - "source": "https://github.com/doctrine/inflector/tree/2.0.x" + "source": "https://github.com/doctrine/inflector/tree/2.0.4" }, "funding": [ { @@ -1015,7 +1011,7 @@ "type": "tidelift" } ], - "time": "2020-05-29T15:13:26+00:00" + "time": "2021-10-22T20:16:43+00:00" }, { "name": "doctrine/lexer", @@ -1361,16 +1357,16 @@ }, { "name": "graham-campbell/result-type", - "version": "v1.0.2", + "version": "v1.0.3", "source": { "type": "git", "url": "https://github.com/GrahamCampbell/Result-Type.git", - "reference": "84afea85c6841deeea872f36249a206e878a5de0" + "reference": "296c015dc30ec4322168c5ad3ee5cc11dae827ac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/84afea85c6841deeea872f36249a206e878a5de0", - "reference": "84afea85c6841deeea872f36249a206e878a5de0", + "url": "https://api.github.com/repos/GrahamCampbell/Result-Type/zipball/296c015dc30ec4322168c5ad3ee5cc11dae827ac", + "reference": "296c015dc30ec4322168c5ad3ee5cc11dae827ac", "shasum": "" }, "require": { @@ -1406,7 +1402,7 @@ ], "support": { "issues": "https://github.com/GrahamCampbell/Result-Type/issues", - "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.2" + "source": "https://github.com/GrahamCampbell/Result-Type/tree/v1.0.3" }, "funding": [ { @@ -1418,28 +1414,29 @@ "type": "tidelift" } ], - "time": "2021-08-28T21:34:50+00:00" + "time": "2021-10-17T19:48:54+00:00" }, { "name": "guzzlehttp/guzzle", - "version": "7.3.0", + "version": "7.4.0", "source": { "type": "git", "url": "https://github.com/guzzle/guzzle.git", - "reference": "7008573787b430c1c1f650e3722d9bba59967628" + "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle/zipball/7008573787b430c1c1f650e3722d9bba59967628", - "reference": "7008573787b430c1c1f650e3722d9bba59967628", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/868b3571a039f0ebc11ac8f344f4080babe2cb94", + "reference": "868b3571a039f0ebc11ac8f344f4080babe2cb94", "shasum": "" }, "require": { "ext-json": "*", - "guzzlehttp/promises": "^1.4", - "guzzlehttp/psr7": "^1.7 || ^2.0", + "guzzlehttp/promises": "^1.5", + "guzzlehttp/psr7": "^1.8.3 || ^2.1", "php": "^7.2.5 || ^8.0", - "psr/http-client": "^1.0" + "psr/http-client": "^1.0", + "symfony/deprecation-contracts": "^2.2" }, "provide": { "psr/http-client-implementation": "1.0" @@ -1449,7 +1446,7 @@ "ext-curl": "*", "php-http/client-integration-tests": "^3.0", "phpunit/phpunit": "^8.5.5 || ^9.3.5", - "psr/log": "^1.1" + "psr/log": "^1.1 || ^2.0 || ^3.0" }, "suggest": { "ext-curl": "Required for CURL handler support", @@ -1459,7 +1456,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.3-dev" + "dev-master": "7.4-dev" } }, "autoload": { @@ -1475,19 +1472,43 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "Jeremy Lindblom", + "email": "jeremeamia@gmail.com", + "homepage": "https://github.com/jeremeamia" + }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, { "name": "Márk Sági-Kazár", "email": "mark.sagikazar@gmail.com", - "homepage": "https://sagikazarmark.hu" + "homepage": "https://github.com/sagikazarmark" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle is a PHP HTTP client library", - "homepage": "http://guzzlephp.org/", "keywords": [ "client", "curl", @@ -1501,7 +1522,7 @@ ], "support": { "issues": "https://github.com/guzzle/guzzle/issues", - "source": "https://github.com/guzzle/guzzle/tree/7.3.0" + "source": "https://github.com/guzzle/guzzle/tree/7.4.0" }, "funding": [ { @@ -1513,28 +1534,24 @@ "type": "github" }, { - "url": "https://github.com/alexeyshockov", - "type": "github" - }, - { - "url": "https://github.com/gmponos", - "type": "github" + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/guzzle", + "type": "tidelift" } ], - "time": "2021-03-23T11:33:13+00:00" + "time": "2021-10-18T09:52:00+00:00" }, { "name": "guzzlehttp/promises", - "version": "1.4.1", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/guzzle/promises.git", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", - "reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", + "url": "https://api.github.com/repos/guzzle/promises/zipball/fe752aedc9fd8fcca3fe7ad05d419d32998a06da", + "reference": "fe752aedc9fd8fcca3fe7ad05d419d32998a06da", "shasum": "" }, "require": { @@ -1546,7 +1563,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.5-dev" } }, "autoload": { @@ -1562,10 +1579,25 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", + "homepage": "https://github.com/Tobion" } ], "description": "Guzzle promises library", @@ -1574,22 +1606,36 @@ ], "support": { "issues": "https://github.com/guzzle/promises/issues", - "source": "https://github.com/guzzle/promises/tree/1.4.1" + "source": "https://github.com/guzzle/promises/tree/1.5.1" }, - "time": "2021-03-07T09:25:29+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises", + "type": "tidelift" + } + ], + "time": "2021-10-22T20:56:57+00:00" }, { "name": "guzzlehttp/psr7", - "version": "1.8.2", + "version": "1.8.3", "source": { "type": "git", "url": "https://github.com/guzzle/psr7.git", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91" + "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", - "reference": "dc960a912984efb74d0a90222870c72c87f10c91", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", + "reference": "1afdd860a2566ed3c2b0b4a3de6e23434a79ec85", "shasum": "" }, "require": { @@ -1626,13 +1672,34 @@ "MIT" ], "authors": [ + { + "name": "Graham Campbell", + "email": "hello@gjcampbell.co.uk", + "homepage": "https://github.com/GrahamCampbell" + }, { "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" }, + { + "name": "George Mponos", + "email": "gmponos@gmail.com", + "homepage": "https://github.com/gmponos" + }, + { + "name": "Tobias Nyholm", + "email": "tobias.nyholm@gmail.com", + "homepage": "https://github.com/Nyholm" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://github.com/sagikazarmark" + }, { "name": "Tobias Schultze", + "email": "webmaster@tubo-world.de", "homepage": "https://github.com/Tobion" } ], @@ -1649,9 +1716,23 @@ ], "support": { "issues": "https://github.com/guzzle/psr7/issues", - "source": "https://github.com/guzzle/psr7/tree/1.8.2" + "source": "https://github.com/guzzle/psr7/tree/1.8.3" }, - "time": "2021-04-26T09:17:50+00:00" + "funding": [ + { + "url": "https://github.com/GrahamCampbell", + "type": "github" + }, + { + "url": "https://github.com/Nyholm", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/guzzlehttp/psr7", + "type": "tidelift" + } + ], + "time": "2021-10-05T13:56:00+00:00" }, { "name": "hashids/hashids", @@ -1786,16 +1867,16 @@ }, { "name": "laravel/framework", - "version": "v8.58.0", + "version": "v8.68.1", "source": { "type": "git", "url": "https://github.com/laravel/framework.git", - "reference": "1b819bf99d87bd543a4d4895e5b3350f61ea7a23" + "reference": "abe985ff1fb82dd04aab03bc1dc56e83fe61a59f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/framework/zipball/1b819bf99d87bd543a4d4895e5b3350f61ea7a23", - "reference": "1b819bf99d87bd543a4d4895e5b3350f61ea7a23", + "url": "https://api.github.com/repos/laravel/framework/zipball/abe985ff1fb82dd04aab03bc1dc56e83fe61a59f", + "reference": "abe985ff1fb82dd04aab03bc1dc56e83fe61a59f", "shasum": "" }, "require": { @@ -1805,16 +1886,18 @@ "ext-json": "*", "ext-mbstring": "*", "ext-openssl": "*", - "league/commonmark": "^1.3|^2.0", + "laravel/serializable-closure": "^1.0", + "league/commonmark": "^1.3|^2.0.2", "league/flysystem": "^1.1", "monolog/monolog": "^2.0", - "nesbot/carbon": "^2.31", + "nesbot/carbon": "^2.53.1", "opis/closure": "^3.6", "php": "^7.3|^8.0", "psr/container": "^1.0", + "psr/log": "^1.0 || ^2.0", "psr/simple-cache": "^1.0", - "ramsey/uuid": "^4.0", - "swiftmailer/swiftmailer": "^6.0", + "ramsey/uuid": "^4.2.2", + "swiftmailer/swiftmailer": "^6.3", "symfony/console": "^5.1.4", "symfony/error-handler": "^5.1.4", "symfony/finder": "^5.1.4", @@ -1832,7 +1915,8 @@ "tightenco/collect": "<5.5.33" }, "provide": { - "psr/container-implementation": "1.0" + "psr/container-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "replace": { "illuminate/auth": "self.version", @@ -1868,22 +1952,23 @@ "illuminate/view": "self.version" }, "require-dev": { - "aws/aws-sdk-php": "^3.189.0", - "doctrine/dbal": "^2.6|^3.0", - "filp/whoops": "^2.8", + "aws/aws-sdk-php": "^3.198.1", + "doctrine/dbal": "^2.13.3|^3.1.2", + "filp/whoops": "^2.14.3", "guzzlehttp/guzzle": "^6.5.5|^7.0.1", "league/flysystem-cached-adapter": "^1.0", - "mockery/mockery": "^1.4.2", + "mockery/mockery": "^1.4.4", "orchestra/testbench-core": "^6.23", "pda/pheanstalk": "^4.0", - "phpunit/phpunit": "^8.5.8|^9.3.3", - "predis/predis": "^1.1.2", + "phpunit/phpunit": "^8.5.19|^9.5.8", + "predis/predis": "^1.1.9", "symfony/cache": "^5.1.4" }, "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.189.0).", + "aws/aws-sdk-php": "Required to use the SQS queue driver, DynamoDb failed job storage and SES mail driver (^3.198.1).", "brianium/paratest": "Required to run tests in parallel (^6.0).", - "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.6|^3.0).", + "doctrine/dbal": "Required to rename columns and drop SQLite columns (^2.13.3|^3.1.2).", + "ext-bcmath": "Required to use the multiple_of validation rule.", "ext-ftp": "Required to use the Flysystem FTP driver.", "ext-gd": "Required to use Illuminate\\Http\\Testing\\FileFactory::image().", "ext-memcached": "Required to use the memcache cache driver.", @@ -1891,17 +1976,17 @@ "ext-posix": "Required to use all features of the queue worker.", "ext-redis": "Required to use the Redis cache and queue drivers (^4.0|^5.0).", "fakerphp/faker": "Required to use the eloquent factory builder (^1.9.1).", - "filp/whoops": "Required for friendly error pages in development (^2.8).", + "filp/whoops": "Required for friendly error pages in development (^2.14.3).", "guzzlehttp/guzzle": "Required to use the HTTP Client, Mailgun mail driver and the ping methods on schedules (^6.5.5|^7.0.1).", "laravel/tinker": "Required to use the tinker console command (^2.0).", "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (^1.0).", "league/flysystem-cached-adapter": "Required to use the Flysystem cache (^1.0).", "league/flysystem-sftp": "Required to use the Flysystem SFTP driver (^1.0).", - "mockery/mockery": "Required to use mocking (^1.4.2).", + "mockery/mockery": "Required to use mocking (^1.4.4).", "nyholm/psr7": "Required to use PSR-7 bridging features (^1.2).", "pda/pheanstalk": "Required to use the beanstalk queue driver (^4.0).", - "phpunit/phpunit": "Required to use assertions and run tests (^8.5.8|^9.3.3).", - "predis/predis": "Required to use the predis connector (^1.1.2).", + "phpunit/phpunit": "Required to use assertions and run tests (^8.5.19|^9.5.8).", + "predis/predis": "Required to use the predis connector (^1.1.9).", "psr/http-message": "Required to allow Storage::put to accept a StreamInterface (^1.0).", "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (^4.0|^5.0|^6.0).", "symfony/cache": "Required to PSR-6 cache bridge (^5.1.4).", @@ -1950,7 +2035,7 @@ "issues": "https://github.com/laravel/framework/issues", "source": "https://github.com/laravel/framework" }, - "time": "2021-08-31T13:55:57+00:00" + "time": "2021-10-27T12:31:46+00:00" }, { "name": "laravel/helpers", @@ -2010,16 +2095,16 @@ }, { "name": "laravel/sanctum", - "version": "v2.11.2", + "version": "v2.12.1", "source": { "type": "git", "url": "https://github.com/laravel/sanctum.git", - "reference": "b21e65cbe13896946986cb0868180cd69e1bd5d3" + "reference": "e610647b04583ace6b30c8eb74cee0a866040420" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/sanctum/zipball/b21e65cbe13896946986cb0868180cd69e1bd5d3", - "reference": "b21e65cbe13896946986cb0868180cd69e1bd5d3", + "url": "https://api.github.com/repos/laravel/sanctum/zipball/e610647b04583ace6b30c8eb74cee0a866040420", + "reference": "e610647b04583ace6b30c8eb74cee0a866040420", "shasum": "" }, "require": { @@ -2070,20 +2155,79 @@ "issues": "https://github.com/laravel/sanctum/issues", "source": "https://github.com/laravel/sanctum" }, - "time": "2021-06-15T15:56:21+00:00" + "time": "2021-10-26T18:23:26+00:00" }, { - "name": "laravel/tinker", - "version": "v2.6.1", + "name": "laravel/serializable-closure", + "version": "v1.0.3", "source": { "type": "git", - "url": "https://github.com/laravel/tinker.git", - "reference": "04ad32c1a3328081097a181875733fa51f402083" + "url": "https://github.com/laravel/serializable-closure.git", + "reference": "6cfc678735f22ccedad761b8cae2bab14c3d8e5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/tinker/zipball/04ad32c1a3328081097a181875733fa51f402083", - "reference": "04ad32c1a3328081097a181875733fa51f402083", + "url": "https://api.github.com/repos/laravel/serializable-closure/zipball/6cfc678735f22ccedad761b8cae2bab14c3d8e5b", + "reference": "6cfc678735f22ccedad761b8cae2bab14c3d8e5b", + "shasum": "" + }, + "require": { + "php": "^7.3|^8.0" + }, + "require-dev": { + "pestphp/pest": "^1.18", + "phpstan/phpstan": "^0.12.98", + "symfony/var-dumper": "^5.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Laravel\\SerializableClosure\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylor@laravel.com" + }, + { + "name": "Nuno Maduro", + "email": "nuno@laravel.com" + } + ], + "description": "Laravel Serializable Closure provides an easy and secure way to serialize closures in PHP.", + "keywords": [ + "closure", + "laravel", + "serializable" + ], + "support": { + "issues": "https://github.com/laravel/serializable-closure/issues", + "source": "https://github.com/laravel/serializable-closure" + }, + "time": "2021-10-07T14:00:57+00:00" + }, + { + "name": "laravel/tinker", + "version": "v2.6.2", + "source": { + "type": "git", + "url": "https://github.com/laravel/tinker.git", + "reference": "c808a7227f97ecfd9219fbf913bad842ea854ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/laravel/tinker/zipball/c808a7227f97ecfd9219fbf913bad842ea854ddc", + "reference": "c808a7227f97ecfd9219fbf913bad842ea854ddc", "shasum": "" }, "require": { @@ -2136,9 +2280,9 @@ ], "support": { "issues": "https://github.com/laravel/tinker/issues", - "source": "https://github.com/laravel/tinker/tree/v2.6.1" + "source": "https://github.com/laravel/tinker/tree/v2.6.2" }, - "time": "2021-03-02T16:53:12+00:00" + "time": "2021-09-28T15:47:34+00:00" }, { "name": "laravel/ui", @@ -2261,16 +2405,16 @@ }, { "name": "lcobucci/jwt", - "version": "4.1.4", + "version": "4.1.5", "source": { "type": "git", "url": "https://github.com/lcobucci/jwt.git", - "reference": "71cf170102c8371ccd933fa4df6252086d144de6" + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/lcobucci/jwt/zipball/71cf170102c8371ccd933fa4df6252086d144de6", - "reference": "71cf170102c8371ccd933fa4df6252086d144de6", + "url": "https://api.github.com/repos/lcobucci/jwt/zipball/fe2d89f2eaa7087af4aa166c6f480ef04e000582", + "reference": "fe2d89f2eaa7087af4aa166c6f480ef04e000582", "shasum": "" }, "require": { @@ -2286,7 +2430,7 @@ "infection/infection": "^0.21", "lcobucci/coding-standard": "^6.0", "mikey179/vfsstream": "^1.6.7", - "phpbench/phpbench": "^1.0@alpha", + "phpbench/phpbench": "^1.0", "phpstan/extension-installer": "^1.0", "phpstan/phpstan": "^0.12", "phpstan/phpstan-deprecation-rules": "^0.12", @@ -2319,7 +2463,7 @@ ], "support": { "issues": "https://github.com/lcobucci/jwt/issues", - "source": "https://github.com/lcobucci/jwt/tree/4.1.4" + "source": "https://github.com/lcobucci/jwt/tree/4.1.5" }, "funding": [ { @@ -2331,7 +2475,7 @@ "type": "patreon" } ], - "time": "2021-03-23T23:53:08+00:00" + "time": "2021-09-28T19:34:56+00:00" }, { "name": "league/commonmark", @@ -2796,16 +2940,16 @@ }, { "name": "league/mime-type-detection", - "version": "1.7.0", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/mime-type-detection.git", - "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3" + "reference": "b38b25d7b372e9fddb00335400467b223349fd7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", - "reference": "3b9dff8aaf7323590c1d2e443db701eb1f9aa0d3", + "url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/b38b25d7b372e9fddb00335400467b223349fd7e", + "reference": "b38b25d7b372e9fddb00335400467b223349fd7e", "shasum": "" }, "require": { @@ -2836,7 +2980,7 @@ "description": "Mime-type detection for Flysystem", "support": { "issues": "https://github.com/thephpleague/mime-type-detection/issues", - "source": "https://github.com/thephpleague/mime-type-detection/tree/1.7.0" + "source": "https://github.com/thephpleague/mime-type-detection/tree/1.8.0" }, "funding": [ { @@ -2848,7 +2992,7 @@ "type": "tidelift" } ], - "time": "2021-01-18T20:58:21+00:00" + "time": "2021-09-25T08:23:19+00:00" }, { "name": "league/uri", @@ -3067,24 +3211,24 @@ }, { "name": "monolog/monolog", - "version": "2.3.2", + "version": "2.3.5", "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "71312564759a7db5b789296369c1a264efc43aad" + "reference": "fd4380d6fc37626e2f799f29d91195040137eba9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/71312564759a7db5b789296369c1a264efc43aad", - "reference": "71312564759a7db5b789296369c1a264efc43aad", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/fd4380d6fc37626e2f799f29d91195040137eba9", + "reference": "fd4380d6fc37626e2f799f29d91195040137eba9", "shasum": "" }, "require": { "php": ">=7.2", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "provide": { - "psr/log-implementation": "1.0.0" + "psr/log-implementation": "1.0.0 || 2.0.0 || 3.0.0" }, "require-dev": { "aws/aws-sdk-php": "^2.4.9 || ^3.0", @@ -3092,14 +3236,14 @@ "elasticsearch/elasticsearch": "^7", "graylog2/gelf-php": "^1.4.2", "mongodb/mongodb": "^1.8", - "php-amqplib/php-amqplib": "~2.4", + "php-amqplib/php-amqplib": "~2.4 || ^3", "php-console/php-console": "^3.1.3", "phpspec/prophecy": "^1.6.1", "phpstan/phpstan": "^0.12.91", "phpunit/phpunit": "^8.5", "predis/predis": "^1.1", "rollbar/rollbar": "^1.3", - "ruflin/elastica": ">=0.90 <7.0.1", + "ruflin/elastica": ">=0.90@dev", "swiftmailer/swiftmailer": "^5.3|^6.0" }, "suggest": { @@ -3107,8 +3251,11 @@ "doctrine/couchdb": "Allow sending log messages to a CouchDB server", "elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client", "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", + "ext-curl": "Required to send log messages using the IFTTTHandler, the LogglyHandler, the SendGridHandler, the SlackWebhookHandler or the TelegramBotHandler", "ext-mbstring": "Allow to work properly with unicode symbols", "ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)", + "ext-openssl": "Required to send log messages using SSL", + "ext-sockets": "Allow sending log messages to a Syslog server (via UDP driver)", "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", "mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)", "php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib", @@ -3147,7 +3294,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/2.3.2" + "source": "https://github.com/Seldaek/monolog/tree/2.3.5" }, "funding": [ { @@ -3159,7 +3306,7 @@ "type": "tidelift" } ], - "time": "2021-07-23T07:42:52+00:00" + "time": "2021-10-01T21:08:31+00:00" }, { "name": "mtdowling/jmespath.php", @@ -3224,16 +3371,16 @@ }, { "name": "nesbot/carbon", - "version": "2.52.0", + "version": "2.53.1", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "369c0e2737c56a0f39c946dd261855255a6fccbe" + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/369c0e2737c56a0f39c946dd261855255a6fccbe", - "reference": "369c0e2737c56a0f39c946dd261855255a6fccbe", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/f4655858a784988f880c1b8c7feabbf02dfdf045", + "reference": "f4655858a784988f880c1b8c7feabbf02dfdf045", "shasum": "" }, "require": { @@ -3245,7 +3392,7 @@ }, "require-dev": { "doctrine/orm": "^2.7", - "friendsofphp/php-cs-fixer": "^2.14 || ^3.0", + "friendsofphp/php-cs-fixer": "^3.0", "kylekatarnls/multi-tester": "^2.0", "phpmd/phpmd": "^2.9", "phpstan/extension-installer": "^1.0", @@ -3314,25 +3461,25 @@ "type": "tidelift" } ], - "time": "2021-08-14T19:10:52+00:00" + "time": "2021-09-06T09:29:23+00:00" }, { "name": "nette/schema", - "version": "v1.2.1", + "version": "v1.2.2", "source": { "type": "git", "url": "https://github.com/nette/schema.git", - "reference": "f5ed39fc96358f922cedfd1e516f0dadf5d2be0d" + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/schema/zipball/f5ed39fc96358f922cedfd1e516f0dadf5d2be0d", - "reference": "f5ed39fc96358f922cedfd1e516f0dadf5d2be0d", + "url": "https://api.github.com/repos/nette/schema/zipball/9a39cef03a5b34c7de64f551538cbba05c2be5df", + "reference": "9a39cef03a5b34c7de64f551538cbba05c2be5df", "shasum": "" }, "require": { - "nette/utils": "^3.1.4 || ^4.0", - "php": ">=7.1 <8.1" + "nette/utils": "^2.5.7 || ^3.1.5 || ^4.0", + "php": ">=7.1 <8.2" }, "require-dev": { "nette/tester": "^2.3 || ^2.4", @@ -3374,26 +3521,26 @@ ], "support": { "issues": "https://github.com/nette/schema/issues", - "source": "https://github.com/nette/schema/tree/v1.2.1" + "source": "https://github.com/nette/schema/tree/v1.2.2" }, - "time": "2021-03-04T17:51:11+00:00" + "time": "2021-10-15T11:40:02+00:00" }, { "name": "nette/utils", - "version": "v3.2.3", + "version": "v3.2.5", "source": { "type": "git", "url": "https://github.com/nette/utils.git", - "reference": "5c36cc1ba9bb6abb8a9e425cf054e0c3fd5b9822" + "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nette/utils/zipball/5c36cc1ba9bb6abb8a9e425cf054e0c3fd5b9822", - "reference": "5c36cc1ba9bb6abb8a9e425cf054e0c3fd5b9822", + "url": "https://api.github.com/repos/nette/utils/zipball/9cd80396ca58d7969ab44fc7afcf03624dfa526e", + "reference": "9cd80396ca58d7969ab44fc7afcf03624dfa526e", "shasum": "" }, "require": { - "php": ">=7.2 <8.1" + "php": ">=7.2 <8.2" }, "conflict": { "nette/di": "<3.0.6" @@ -3459,22 +3606,22 @@ ], "support": { "issues": "https://github.com/nette/utils/issues", - "source": "https://github.com/nette/utils/tree/v3.2.3" + "source": "https://github.com/nette/utils/tree/v3.2.5" }, - "time": "2021-08-16T21:05:00+00:00" + "time": "2021-09-20T10:50:11+00:00" }, { "name": "nikic/php-parser", - "version": "v4.12.0", + "version": "v4.13.0", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143" + "reference": "50953a2691a922aa1769461637869a0a2faa3f53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/6608f01670c3cc5079e18c1dab1104e002579143", - "reference": "6608f01670c3cc5079e18c1dab1104e002579143", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/50953a2691a922aa1769461637869a0a2faa3f53", + "reference": "50953a2691a922aa1769461637869a0a2faa3f53", "shasum": "" }, "require": { @@ -3515,9 +3662,9 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.12.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.13.0" }, - "time": "2021-07-21T10:44:31+00:00" + "time": "2021-09-20T12:20:58+00:00" }, { "name": "opis/closure", @@ -3653,16 +3800,16 @@ }, { "name": "php-http/discovery", - "version": "1.14.0", + "version": "1.14.1", "source": { "type": "git", "url": "https://github.com/php-http/discovery.git", - "reference": "778f722e29250c1fac0bbdef2c122fa5d038c9eb" + "reference": "de90ab2b41d7d61609f504e031339776bc8c7223" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-http/discovery/zipball/778f722e29250c1fac0bbdef2c122fa5d038c9eb", - "reference": "778f722e29250c1fac0bbdef2c122fa5d038c9eb", + "url": "https://api.github.com/repos/php-http/discovery/zipball/de90ab2b41d7d61609f504e031339776bc8c7223", + "reference": "de90ab2b41d7d61609f504e031339776bc8c7223", "shasum": "" }, "require": { @@ -3715,9 +3862,9 @@ ], "support": { "issues": "https://github.com/php-http/discovery/issues", - "source": "https://github.com/php-http/discovery/tree/1.14.0" + "source": "https://github.com/php-http/discovery/tree/1.14.1" }, - "time": "2021-06-01T14:30:21+00:00" + "time": "2021-09-18T07:57:46+00:00" }, { "name": "php-http/httplug", @@ -4089,16 +4236,16 @@ }, { "name": "predis/predis", - "version": "v1.1.7", + "version": "v1.1.9", "source": { "type": "git", "url": "https://github.com/predis/predis.git", - "reference": "b240daa106d4e02f0c5b7079b41e31ddf66fddf8" + "reference": "c50c3393bb9f47fa012d0cdfb727a266b0818259" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/predis/predis/zipball/b240daa106d4e02f0c5b7079b41e31ddf66fddf8", - "reference": "b240daa106d4e02f0c5b7079b41e31ddf66fddf8", + "url": "https://api.github.com/repos/predis/predis/zipball/c50c3393bb9f47fa012d0cdfb727a266b0818259", + "reference": "c50c3393bb9f47fa012d0cdfb727a266b0818259", "shasum": "" }, "require": { @@ -4143,7 +4290,7 @@ ], "support": { "issues": "https://github.com/predis/predis/issues", - "source": "https://github.com/predis/predis/tree/v1.1.7" + "source": "https://github.com/predis/predis/tree/v1.1.9" }, "funding": [ { @@ -4151,7 +4298,7 @@ "type": "github" } ], - "time": "2021-04-04T19:34:46+00:00" + "time": "2021-10-05T19:02:38+00:00" }, { "name": "prologue/alerts", @@ -4633,16 +4780,16 @@ }, { "name": "psy/psysh", - "version": "v0.10.8", + "version": "v0.10.9", "source": { "type": "git", "url": "https://github.com/bobthecow/psysh.git", - "reference": "e4573f47750dd6c92dca5aee543fa77513cbd8d3" + "reference": "01281336c4ae557fe4a994544f30d3a1bc204375" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/bobthecow/psysh/zipball/e4573f47750dd6c92dca5aee543fa77513cbd8d3", - "reference": "e4573f47750dd6c92dca5aee543fa77513cbd8d3", + "url": "https://api.github.com/repos/bobthecow/psysh/zipball/01281336c4ae557fe4a994544f30d3a1bc204375", + "reference": "01281336c4ae557fe4a994544f30d3a1bc204375", "shasum": "" }, "require": { @@ -4702,9 +4849,9 @@ ], "support": { "issues": "https://github.com/bobthecow/psysh/issues", - "source": "https://github.com/bobthecow/psysh/tree/v0.10.8" + "source": "https://github.com/bobthecow/psysh/tree/v0.10.9" }, - "time": "2021-04-10T16:23:39+00:00" + "time": "2021-10-10T13:37:39+00:00" }, { "name": "ralouphie/getallheaders", @@ -4752,16 +4899,16 @@ }, { "name": "ramsey/collection", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/ramsey/collection.git", - "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa" + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/collection/zipball/eaca1dc1054ddd10cbd83c1461907bee6fb528fa", - "reference": "eaca1dc1054ddd10cbd83c1461907bee6fb528fa", + "url": "https://api.github.com/repos/ramsey/collection/zipball/cccc74ee5e328031b15640b51056ee8d3bb66c0a", + "reference": "cccc74ee5e328031b15640b51056ee8d3bb66c0a", "shasum": "" }, "require": { @@ -4815,7 +4962,7 @@ ], "support": { "issues": "https://github.com/ramsey/collection/issues", - "source": "https://github.com/ramsey/collection/tree/1.2.1" + "source": "https://github.com/ramsey/collection/tree/1.2.2" }, "funding": [ { @@ -4827,28 +4974,29 @@ "type": "tidelift" } ], - "time": "2021-08-06T03:41:06+00:00" + "time": "2021-10-10T03:01:02+00:00" }, { "name": "ramsey/uuid", - "version": "4.2.1", + "version": "4.2.3", "source": { "type": "git", "url": "https://github.com/ramsey/uuid.git", - "reference": "fe665a03df4f056aa65af552a96e1976df8c8dae" + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/fe665a03df4f056aa65af552a96e1976df8c8dae", - "reference": "fe665a03df4f056aa65af552a96e1976df8c8dae", + "url": "https://api.github.com/repos/ramsey/uuid/zipball/fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", + "reference": "fc9bb7fb5388691fd7373cd44dcb4d63bbcf24df", "shasum": "" }, "require": { "brick/math": "^0.8 || ^0.9", "ext-json": "*", - "php": "^7.2 || ^8", + "php": "^7.2 || ^8.0", "ramsey/collection": "^1.0", - "symfony/polyfill-ctype": "^1.8" + "symfony/polyfill-ctype": "^1.8", + "symfony/polyfill-php80": "^1.14" }, "replace": { "rhumsaa/uuid": "self.version" @@ -4912,7 +5060,7 @@ ], "support": { "issues": "https://github.com/ramsey/uuid/issues", - "source": "https://github.com/ramsey/uuid/tree/4.2.1" + "source": "https://github.com/ramsey/uuid/tree/4.2.3" }, "funding": [ { @@ -4924,7 +5072,7 @@ "type": "tidelift" } ], - "time": "2021-08-11T01:06:55+00:00" + "time": "2021-09-25T23:10:38+00:00" }, { "name": "s1lentium/iptools", @@ -5122,16 +5270,16 @@ }, { "name": "spatie/laravel-query-builder", - "version": "3.5.0", + "version": "3.6.0", "source": { "type": "git", "url": "https://github.com/spatie/laravel-query-builder.git", - "reference": "4e5257be24139836dc092f618d7c73bcb1c00302" + "reference": "03d8e1307dcb58b16fcc9c4947633fc60ae74802" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/4e5257be24139836dc092f618d7c73bcb1c00302", - "reference": "4e5257be24139836dc092f618d7c73bcb1c00302", + "url": "https://api.github.com/repos/spatie/laravel-query-builder/zipball/03d8e1307dcb58b16fcc9c4947633fc60ae74802", + "reference": "03d8e1307dcb58b16fcc9c4947633fc60ae74802", "shasum": "" }, "require": { @@ -5188,7 +5336,7 @@ "type": "custom" } ], - "time": "2021-07-05T14:17:44+00:00" + "time": "2021-09-06T08:03:10+00:00" }, { "name": "spomky-labs/base64url", @@ -5379,16 +5527,16 @@ }, { "name": "swiftmailer/swiftmailer", - "version": "v6.2.7", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/swiftmailer/swiftmailer.git", - "reference": "15f7faf8508e04471f666633addacf54c0ab5933" + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/15f7faf8508e04471f666633addacf54c0ab5933", - "reference": "15f7faf8508e04471f666633addacf54c0ab5933", + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/8a5d5072dca8f48460fce2f4131fcc495eec654c", + "reference": "8a5d5072dca8f48460fce2f4131fcc495eec654c", "shasum": "" }, "require": { @@ -5400,7 +5548,7 @@ }, "require-dev": { "mockery/mockery": "^1.0", - "symfony/phpunit-bridge": "^4.4|^5.0" + "symfony/phpunit-bridge": "^4.4|^5.4" }, "suggest": { "ext-intl": "Needed to support internationalized email addresses" @@ -5438,7 +5586,7 @@ ], "support": { "issues": "https://github.com/swiftmailer/swiftmailer/issues", - "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.2.7" + "source": "https://github.com/swiftmailer/swiftmailer/tree/v6.3.0" }, "funding": [ { @@ -5450,20 +5598,20 @@ "type": "tidelift" } ], - "time": "2021-03-09T12:30:35+00:00" + "time": "2021-10-18T15:26:12+00:00" }, { "name": "symfony/console", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a" + "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8b1008344647462ae6ec57559da166c2bfa5e16a", - "reference": "8b1008344647462ae6ec57559da166c2bfa5e16a", + "url": "https://api.github.com/repos/symfony/console/zipball/d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", + "reference": "d4e409d9fbcfbf71af0e5a940abb7b0b4bad0bd3", "shasum": "" }, "require": { @@ -5533,7 +5681,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.3.7" + "source": "https://github.com/symfony/console/tree/v5.3.10" }, "funding": [ { @@ -5549,7 +5697,7 @@ "type": "tidelift" } ], - "time": "2021-08-25T20:02:16+00:00" + "time": "2021-10-26T09:30:15+00:00" }, { "name": "symfony/css-selector", @@ -6058,16 +6206,16 @@ }, { "name": "symfony/http-foundation", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5" + "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", - "reference": "e36c8e5502b4f3f0190c675f1c1f1248a64f04e5", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", + "reference": "9f34f02e8a5fdc7a56bafe011cea1ce97300e54c", "shasum": "" }, "require": { @@ -6111,7 +6259,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v5.3.7" + "source": "https://github.com/symfony/http-foundation/tree/v5.3.10" }, "funding": [ { @@ -6127,20 +6275,20 @@ "type": "tidelift" } ], - "time": "2021-08-27T11:20:35+00:00" + "time": "2021-10-11T15:41:55+00:00" }, { "name": "symfony/http-kernel", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "a3a78e37935a527b50376c22ac1cec35b57fe787" + "reference": "703e4079920468e9522b72cf47fd76ce8d795e86" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a3a78e37935a527b50376c22ac1cec35b57fe787", - "reference": "a3a78e37935a527b50376c22ac1cec35b57fe787", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/703e4079920468e9522b72cf47fd76ce8d795e86", + "reference": "703e4079920468e9522b72cf47fd76ce8d795e86", "shasum": "" }, "require": { @@ -6223,7 +6371,7 @@ "description": "Provides a structured process for converting a Request into a Response", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-kernel/tree/v5.3.7" + "source": "https://github.com/symfony/http-kernel/tree/v5.3.10" }, "funding": [ { @@ -6239,20 +6387,20 @@ "type": "tidelift" } ], - "time": "2021-08-30T12:37:19+00:00" + "time": "2021-10-29T08:36:48+00:00" }, { "name": "symfony/mime", - "version": "v5.3.7", + "version": "v5.3.8", "source": { "type": "git", "url": "https://github.com/symfony/mime.git", - "reference": "ae887cb3b044658676129f5e97aeb7e9eb69c2d8" + "reference": "a756033d0a7e53db389618653ae991eba5a19a11" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/mime/zipball/ae887cb3b044658676129f5e97aeb7e9eb69c2d8", - "reference": "ae887cb3b044658676129f5e97aeb7e9eb69c2d8", + "url": "https://api.github.com/repos/symfony/mime/zipball/a756033d0a7e53db389618653ae991eba5a19a11", + "reference": "a756033d0a7e53db389618653ae991eba5a19a11", "shasum": "" }, "require": { @@ -6306,7 +6454,7 @@ "mime-type" ], "support": { - "source": "https://github.com/symfony/mime/tree/v5.3.7" + "source": "https://github.com/symfony/mime/tree/v5.3.8" }, "funding": [ { @@ -6322,7 +6470,7 @@ "type": "tidelift" } ], - "time": "2021-08-20T11:40:01+00:00" + "time": "2021-09-10T12:30:38+00:00" }, { "name": "symfony/polyfill-ctype", @@ -7365,16 +7513,16 @@ }, { "name": "symfony/string", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5" + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/8d224396e28d30f81969f083a58763b8b9ceb0a5", - "reference": "8d224396e28d30f81969f083a58763b8b9ceb0a5", + "url": "https://api.github.com/repos/symfony/string/zipball/d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", + "reference": "d70c35bb20bbca71fc4ab7921e3c6bda1a82a60c", "shasum": "" }, "require": { @@ -7428,7 +7576,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.3.7" + "source": "https://github.com/symfony/string/tree/v5.3.10" }, "funding": [ { @@ -7444,20 +7592,20 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:00:08+00:00" + "time": "2021-10-27T18:21:46+00:00" }, { "name": "symfony/translation", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6" + "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6", - "reference": "4d595a6d15fd3a2c67f6f31d14d15d3b7356d7a6", + "url": "https://api.github.com/repos/symfony/translation/zipball/6ef197aea2ac8b9cd63e0da7522b3771714035aa", + "reference": "6ef197aea2ac8b9cd63e0da7522b3771714035aa", "shasum": "" }, "require": { @@ -7523,7 +7671,7 @@ "description": "Provides tools to internationalize your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/translation/tree/v5.3.7" + "source": "https://github.com/symfony/translation/tree/v5.3.10" }, "funding": [ { @@ -7539,7 +7687,7 @@ "type": "tidelift" } ], - "time": "2021-08-26T08:22:53+00:00" + "time": "2021-10-10T06:43:24+00:00" }, { "name": "symfony/translation-contracts", @@ -7621,16 +7769,16 @@ }, { "name": "symfony/var-dumper", - "version": "v5.3.7", + "version": "v5.3.10", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f" + "reference": "875432adb5f5570fff21036fd22aee244636b7d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f", - "reference": "3ad5af4aed07d0a0201bbcfc42658fe6c5b2fb8f", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/875432adb5f5570fff21036fd22aee244636b7d1", + "reference": "875432adb5f5570fff21036fd22aee244636b7d1", "shasum": "" }, "require": { @@ -7689,7 +7837,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v5.3.7" + "source": "https://github.com/symfony/var-dumper/tree/v5.3.10" }, "funding": [ { @@ -7705,7 +7853,7 @@ "type": "tidelift" } ], - "time": "2021-08-04T23:19:25+00:00" + "time": "2021-10-26T09:30:15+00:00" }, { "name": "symfony/yaml", @@ -7976,31 +8124,31 @@ }, { "name": "vlucas/phpdotenv", - "version": "v5.3.0", + "version": "v5.3.1", "source": { "type": "git", "url": "https://github.com/vlucas/phpdotenv.git", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56" + "reference": "accaddf133651d4b5cf81a119f25296736ffc850" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", - "reference": "b3eac5c7ac896e52deab4a99068e3f4ab12d9e56", + "url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/accaddf133651d4b5cf81a119f25296736ffc850", + "reference": "accaddf133651d4b5cf81a119f25296736ffc850", "shasum": "" }, "require": { "ext-pcre": "*", - "graham-campbell/result-type": "^1.0.1", + "graham-campbell/result-type": "^1.0.2", "php": "^7.1.3 || ^8.0", - "phpoption/phpoption": "^1.7.4", - "symfony/polyfill-ctype": "^1.17", - "symfony/polyfill-mbstring": "^1.17", - "symfony/polyfill-php80": "^1.17" + "phpoption/phpoption": "^1.8", + "symfony/polyfill-ctype": "^1.23", + "symfony/polyfill-mbstring": "^1.23.1", + "symfony/polyfill-php80": "^1.23.1" }, "require-dev": { "bamarni/composer-bin-plugin": "^1.4.1", "ext-filter": "*", - "phpunit/phpunit": "^7.5.20 || ^8.5.14 || ^9.5.1" + "phpunit/phpunit": "^7.5.20 || ^8.5.21 || ^9.5.10" }, "suggest": { "ext-filter": "Required to use the boolean validator." @@ -8023,13 +8171,11 @@ "authors": [ { "name": "Graham Campbell", - "email": "graham@alt-three.com", - "homepage": "https://gjcampbell.co.uk/" + "email": "hello@gjcampbell.co.uk" }, { "name": "Vance Lucas", - "email": "vance@vancelucas.com", - "homepage": "https://vancelucas.com/" + "email": "vance@vancelucas.com" } ], "description": "Loads environment variables from `.env` to `getenv()`, `$_ENV` and `$_SERVER` automagically.", @@ -8040,7 +8186,7 @@ ], "support": { "issues": "https://github.com/vlucas/phpdotenv/issues", - "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.0" + "source": "https://github.com/vlucas/phpdotenv/tree/v5.3.1" }, "funding": [ { @@ -8052,7 +8198,7 @@ "type": "tidelift" } ], - "time": "2021-01-20T15:23:13+00:00" + "time": "2021-10-02T19:24:42+00:00" }, { "name": "voku/portable-ascii", @@ -8556,23 +8702,23 @@ "packages-dev": [ { "name": "barryvdh/laravel-debugbar", - "version": "v3.6.2", + "version": "v3.6.4", "source": { "type": "git", "url": "https://github.com/barryvdh/laravel-debugbar.git", - "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a" + "reference": "3c2d678269ba60e178bcd93e36f6a91c36b727f1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/70b89754913fd89fef16d0170a91dbc2a5cd633a", - "reference": "70b89754913fd89fef16d0170a91dbc2a5cd633a", + "url": "https://api.github.com/repos/barryvdh/laravel-debugbar/zipball/3c2d678269ba60e178bcd93e36f6a91c36b727f1", + "reference": "3c2d678269ba60e178bcd93e36f6a91c36b727f1", "shasum": "" }, "require": { "illuminate/routing": "^6|^7|^8", "illuminate/session": "^6|^7|^8", "illuminate/support": "^6|^7|^8", - "maximebf/debugbar": "^1.16.3", + "maximebf/debugbar": "^1.17.2", "php": ">=7.2", "symfony/debug": "^4.3|^5", "symfony/finder": "^4.3|^5" @@ -8586,7 +8732,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.5-dev" + "dev-master": "3.6-dev" }, "laravel": { "providers": [ @@ -8625,7 +8771,7 @@ ], "support": { "issues": "https://github.com/barryvdh/laravel-debugbar/issues", - "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.2" + "source": "https://github.com/barryvdh/laravel-debugbar/tree/v3.6.4" }, "funding": [ { @@ -8637,7 +8783,7 @@ "type": "github" } ], - "time": "2021-06-14T14:29:26+00:00" + "time": "2021-10-21T10:57:31+00:00" }, { "name": "barryvdh/laravel-ide-helper", @@ -8783,16 +8929,16 @@ }, { "name": "composer/ca-bundle", - "version": "1.2.10", + "version": "1.3.1", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8" + "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/9fdb22c2e97a614657716178093cd1da90a64aa8", - "reference": "9fdb22c2e97a614657716178093cd1da90a64aa8", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", + "reference": "4c679186f2aca4ab6a0f1b0b9cf9252decb44d0b", "shasum": "" }, "require": { @@ -8804,7 +8950,7 @@ "phpstan/phpstan": "^0.12.55", "psr/log": "^1.0", "symfony/phpunit-bridge": "^4.2 || ^5", - "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0" + "symfony/process": "^2.5 || ^3.0 || ^4.0 || ^5.0 || ^6.0" }, "type": "library", "extra": { @@ -8839,7 +8985,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.2.10" + "source": "https://github.com/composer/ca-bundle/tree/1.3.1" }, "funding": [ { @@ -8855,20 +9001,20 @@ "type": "tidelift" } ], - "time": "2021-06-07T13:58:28+00:00" + "time": "2021-10-28T20:44:15+00:00" }, { "name": "composer/composer", - "version": "2.1.6", + "version": "2.1.10", "source": { "type": "git", "url": "https://github.com/composer/composer.git", - "reference": "e5cac5f9d2354d08b67f1d21c664ae70d748c603" + "reference": "ea5f64d1a15c66942979b804c9fb3686be852ca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/composer/zipball/e5cac5f9d2354d08b67f1d21c664ae70d748c603", - "reference": "e5cac5f9d2354d08b67f1d21c664ae70d748c603", + "url": "https://api.github.com/repos/composer/composer/zipball/ea5f64d1a15c66942979b804c9fb3686be852ca0", + "reference": "ea5f64d1a15c66942979b804c9fb3686be852ca0", "shasum": "" }, "require": { @@ -8879,7 +9025,7 @@ "composer/xdebug-handler": "^2.0", "justinrainbow/json-schema": "^5.2.11", "php": "^5.3.2 || ^7.0 || ^8.0", - "psr/log": "^1.0", + "psr/log": "^1.0 || ^2.0", "react/promise": "^1.2 || ^2.7", "seld/jsonlint": "^1.4", "seld/phar-utils": "^1.0", @@ -8903,7 +9049,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-main": "2.1-dev" } }, "autoload": { @@ -8937,7 +9083,7 @@ "support": { "irc": "ircs://irc.libera.chat:6697/composer", "issues": "https://github.com/composer/composer/issues", - "source": "https://github.com/composer/composer/tree/2.1.6" + "source": "https://github.com/composer/composer/tree/2.1.10" }, "funding": [ { @@ -8953,7 +9099,7 @@ "type": "tidelift" } ], - "time": "2021-08-19T15:11:08+00:00" + "time": "2021-10-29T20:34:57+00:00" }, { "name": "composer/metadata-minifier", @@ -9026,16 +9172,16 @@ }, { "name": "composer/semver", - "version": "3.2.5", + "version": "3.2.6", "source": { "type": "git", "url": "https://github.com/composer/semver.git", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9" + "reference": "83e511e247de329283478496f7a1e114c9517506" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/31f3ea725711245195f62e54ffa402d8ef2fdba9", - "reference": "31f3ea725711245195f62e54ffa402d8ef2fdba9", + "url": "https://api.github.com/repos/composer/semver/zipball/83e511e247de329283478496f7a1e114c9517506", + "reference": "83e511e247de329283478496f7a1e114c9517506", "shasum": "" }, "require": { @@ -9087,7 +9233,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/3.2.5" + "source": "https://github.com/composer/semver/tree/3.2.6" }, "funding": [ { @@ -9103,7 +9249,7 @@ "type": "tidelift" } ], - "time": "2021-05-24T12:41:47+00:00" + "time": "2021-10-25T11:34:17+00:00" }, { "name": "composer/spdx-licenses", @@ -9391,16 +9537,16 @@ }, { "name": "facade/flare-client-php", - "version": "1.8.1", + "version": "1.9.1", "source": { "type": "git", "url": "https://github.com/facade/flare-client-php.git", - "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f" + "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/flare-client-php/zipball/47b639dc02bcfdfc4ebb83de703856fa01e35f5f", - "reference": "47b639dc02bcfdfc4ebb83de703856fa01e35f5f", + "url": "https://api.github.com/repos/facade/flare-client-php/zipball/b2adf1512755637d0cef4f7d1b54301325ac78ed", + "reference": "b2adf1512755637d0cef4f7d1b54301325ac78ed", "shasum": "" }, "require": { @@ -9444,7 +9590,7 @@ ], "support": { "issues": "https://github.com/facade/flare-client-php/issues", - "source": "https://github.com/facade/flare-client-php/tree/1.8.1" + "source": "https://github.com/facade/flare-client-php/tree/1.9.1" }, "funding": [ { @@ -9452,26 +9598,27 @@ "type": "github" } ], - "time": "2021-05-31T19:23:29+00:00" + "time": "2021-09-13T12:16:46+00:00" }, { "name": "facade/ignition", - "version": "2.12.0", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/facade/ignition.git", - "reference": "74dcc32a2895a126d1e5f2cd3bbab499cac66db1" + "reference": "23400e6cc565c9dcae2c53704b4de1c4870c0697" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/facade/ignition/zipball/74dcc32a2895a126d1e5f2cd3bbab499cac66db1", - "reference": "74dcc32a2895a126d1e5f2cd3bbab499cac66db1", + "url": "https://api.github.com/repos/facade/ignition/zipball/23400e6cc565c9dcae2c53704b4de1c4870c0697", + "reference": "23400e6cc565c9dcae2c53704b4de1c4870c0697", "shasum": "" }, "require": { + "ext-curl": "*", "ext-json": "*", "ext-mbstring": "*", - "facade/flare-client-php": "^1.6", + "facade/flare-client-php": "^1.9.1", "facade/ignition-contracts": "^1.0.2", "illuminate/support": "^7.0|^8.0", "monolog/monolog": "^2.0", @@ -9528,7 +9675,7 @@ "issues": "https://github.com/facade/ignition/issues", "source": "https://github.com/facade/ignition" }, - "time": "2021-08-24T09:53:54+00:00" + "time": "2021-10-28T11:47:23+00:00" }, { "name": "facade/ignition-contracts", @@ -9585,21 +9732,21 @@ }, { "name": "fakerphp/faker", - "version": "v1.15.0", + "version": "v1.16.0", "source": { "type": "git", "url": "https://github.com/FakerPHP/Faker.git", - "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e" + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/89c6201c74db25fa759ff16e78a4d8f32547770e", - "reference": "89c6201c74db25fa759ff16e78a4d8f32547770e", + "url": "https://api.github.com/repos/FakerPHP/Faker/zipball/271d384d216e5e5c468a6b28feedf95d49f83b35", + "reference": "271d384d216e5e5c468a6b28feedf95d49f83b35", "shasum": "" }, "require": { "php": "^7.1 || ^8.0", - "psr/container": "^1.0", + "psr/container": "^1.0 || ^2.0", "symfony/deprecation-contracts": "^2.2" }, "conflict": { @@ -9619,7 +9766,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "v1.15-dev" + "dev-main": "v1.16-dev" } }, "autoload": { @@ -9644,27 +9791,27 @@ ], "support": { "issues": "https://github.com/FakerPHP/Faker/issues", - "source": "https://github.com/FakerPHP/Faker/tree/v1.15.0" + "source": "https://github.com/FakerPHP/Faker/tree/v1.16.0" }, - "time": "2021-07-06T20:39:40+00:00" + "time": "2021-09-06T14:53:37+00:00" }, { "name": "filp/whoops", - "version": "2.14.1", + "version": "2.14.4", "source": { "type": "git", "url": "https://github.com/filp/whoops.git", - "reference": "15ead64e9828f0fc90932114429c4f7923570cb1" + "reference": "f056f1fe935d9ed86e698905a957334029899895" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/filp/whoops/zipball/15ead64e9828f0fc90932114429c4f7923570cb1", - "reference": "15ead64e9828f0fc90932114429c4f7923570cb1", + "url": "https://api.github.com/repos/filp/whoops/zipball/f056f1fe935d9ed86e698905a957334029899895", + "reference": "f056f1fe935d9ed86e698905a957334029899895", "shasum": "" }, "require": { "php": "^5.5.9 || ^7.0 || ^8.0", - "psr/log": "^1.0.1" + "psr/log": "^1.0.1 || ^2.0 || ^3.0" }, "require-dev": { "mockery/mockery": "^0.9 || ^1.0", @@ -9709,7 +9856,7 @@ ], "support": { "issues": "https://github.com/filp/whoops/issues", - "source": "https://github.com/filp/whoops/tree/2.14.1" + "source": "https://github.com/filp/whoops/tree/2.14.4" }, "funding": [ { @@ -9717,20 +9864,20 @@ "type": "github" } ], - "time": "2021-08-29T12:00:00+00:00" + "time": "2021-10-03T12:00:00+00:00" }, { "name": "friendsofphp/php-cs-fixer", - "version": "v3.1.0", + "version": "v3.2.1", "source": { "type": "git", "url": "https://github.com/FriendsOfPHP/PHP-CS-Fixer.git", - "reference": "cf4cedb9e8991c2daa94a756176d81bf487e4c4b" + "reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/cf4cedb9e8991c2daa94a756176d81bf487e4c4b", - "reference": "cf4cedb9e8991c2daa94a756176d81bf487e4c4b", + "url": "https://api.github.com/repos/FriendsOfPHP/PHP-CS-Fixer/zipball/13ae36a76b6e329e44ca3cafaa784ea02db9ff14", + "reference": "13ae36a76b6e329e44ca3cafaa784ea02db9ff14", "shasum": "" }, "require": { @@ -9739,7 +9886,7 @@ "doctrine/annotations": "^1.12", "ext-json": "*", "ext-tokenizer": "*", - "php": "^7.1.3 || ^8.0", + "php": "^7.2 || ^8.0", "php-cs-fixer/diff": "^2.0", "symfony/console": "^4.4.20 || ^5.1.3", "symfony/event-dispatcher": "^4.4.20 || ^5.0", @@ -9747,13 +9894,14 @@ "symfony/finder": "^4.4.20 || ^5.0", "symfony/options-resolver": "^4.4.20 || ^5.0", "symfony/polyfill-php72": "^1.23", + "symfony/polyfill-php80": "^1.23", "symfony/polyfill-php81": "^1.23", "symfony/process": "^4.4.20 || ^5.0", "symfony/stopwatch": "^4.4.20 || ^5.0" }, "require-dev": { "justinrainbow/json-schema": "^5.2", - "keradus/cli-executor": "^1.4", + "keradus/cli-executor": "^1.5", "mikey179/vfsstream": "^1.6.8", "php-coveralls/php-coveralls": "^2.4.3", "php-cs-fixer/accessible-object": "^1.1", @@ -9798,7 +9946,7 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues", - "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.1.0" + "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v3.2.1" }, "funding": [ { @@ -9806,7 +9954,7 @@ "type": "github" } ], - "time": "2021-08-29T20:16:20+00:00" + "time": "2021-10-05T08:12:17+00:00" }, { "name": "hamcrest/hamcrest-php", @@ -9931,16 +10079,16 @@ }, { "name": "laravel/dusk", - "version": "v6.18.0", + "version": "v6.19.2", "source": { "type": "git", "url": "https://github.com/laravel/dusk.git", - "reference": "9907436b923770a2fc8a0d99bd0fcf4b0baa767c" + "reference": "c042f8d389b8fdcd9543032d1ef8dbe47c8a245f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laravel/dusk/zipball/9907436b923770a2fc8a0d99bd0fcf4b0baa767c", - "reference": "9907436b923770a2fc8a0d99bd0fcf4b0baa767c", + "url": "https://api.github.com/repos/laravel/dusk/zipball/c042f8d389b8fdcd9543032d1ef8dbe47c8a245f", + "reference": "c042f8d389b8fdcd9543032d1ef8dbe47c8a245f", "shasum": "" }, "require": { @@ -9998,27 +10146,27 @@ ], "support": { "issues": "https://github.com/laravel/dusk/issues", - "source": "https://github.com/laravel/dusk/tree/v6.18.0" + "source": "https://github.com/laravel/dusk/tree/v6.19.2" }, - "time": "2021-08-31T14:51:46+00:00" + "time": "2021-10-20T10:10:26+00:00" }, { "name": "maximebf/debugbar", - "version": "v1.17.1", + "version": "v1.17.2", "source": { "type": "git", "url": "https://github.com/maximebf/php-debugbar.git", - "reference": "0a3532556be0145603f8a9de23e76dc28eed7054" + "reference": "3541f09f09c003c4a9ff7ddb0eb3361a7f14d418" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/0a3532556be0145603f8a9de23e76dc28eed7054", - "reference": "0a3532556be0145603f8a9de23e76dc28eed7054", + "url": "https://api.github.com/repos/maximebf/php-debugbar/zipball/3541f09f09c003c4a9ff7ddb0eb3361a7f14d418", + "reference": "3541f09f09c003c4a9ff7ddb0eb3361a7f14d418", "shasum": "" }, "require": { "php": "^7.1|^8", - "psr/log": "^1.0", + "psr/log": "^1|^2|^3", "symfony/var-dumper": "^2.6|^3|^4|^5" }, "require-dev": { @@ -10063,22 +10211,22 @@ ], "support": { "issues": "https://github.com/maximebf/php-debugbar/issues", - "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.1" + "source": "https://github.com/maximebf/php-debugbar/tree/v1.17.2" }, - "time": "2021-08-01T09:19:02+00:00" + "time": "2021-10-18T09:39:00+00:00" }, { "name": "mockery/mockery", - "version": "1.4.3", + "version": "1.4.4", "source": { "type": "git", "url": "https://github.com/mockery/mockery.git", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea" + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mockery/mockery/zipball/d1339f64479af1bee0e82a0413813fe5345a54ea", - "reference": "d1339f64479af1bee0e82a0413813fe5345a54ea", + "url": "https://api.github.com/repos/mockery/mockery/zipball/e01123a0e847d52d186c5eb4b9bf58b0c6d00346", + "reference": "e01123a0e847d52d186c5eb4b9bf58b0c6d00346", "shasum": "" }, "require": { @@ -10135,9 +10283,9 @@ ], "support": { "issues": "https://github.com/mockery/mockery/issues", - "source": "https://github.com/mockery/mockery/tree/1.4.3" + "source": "https://github.com/mockery/mockery/tree/1.4.4" }, - "time": "2021-02-24T09:51:49+00:00" + "time": "2021-09-13T15:28:59+00:00" }, { "name": "myclabs/deep-copy", @@ -10199,33 +10347,32 @@ }, { "name": "nunomaduro/collision", - "version": "v5.9.0", + "version": "v5.10.0", "source": { "type": "git", "url": "https://github.com/nunomaduro/collision.git", - "reference": "63456f5c3e8c4bc52bd573e5c85674d64d84fd43" + "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nunomaduro/collision/zipball/63456f5c3e8c4bc52bd573e5c85674d64d84fd43", - "reference": "63456f5c3e8c4bc52bd573e5c85674d64d84fd43", + "url": "https://api.github.com/repos/nunomaduro/collision/zipball/3004cfa49c022183395eabc6d0e5207dfe498d00", + "reference": "3004cfa49c022183395eabc6d0e5207dfe498d00", "shasum": "" }, "require": { "facade/ignition-contracts": "^1.0", - "filp/whoops": "^2.7.2", + "filp/whoops": "^2.14.3", "php": "^7.3 || ^8.0", "symfony/console": "^5.0" }, "require-dev": { "brianium/paratest": "^6.1", "fideloper/proxy": "^4.4.1", - "friendsofphp/php-cs-fixer": "^3.0", "fruitcake/laravel-cors": "^2.0.3", - "laravel/framework": "^8.0 || ^9.0", + "laravel/framework": "8.x-dev", "nunomaduro/larastan": "^0.6.2", "nunomaduro/mock-final-classes": "^1.0", - "orchestra/testbench": "^6.0 || ^7.0", + "orchestra/testbench": "^6.0", "phpstan/phpstan": "^0.12.64", "phpunit/phpunit": "^9.5.0" }, @@ -10283,7 +10430,105 @@ "type": "patreon" } ], - "time": "2021-08-26T15:32:09+00:00" + "time": "2021-09-20T15:06:32+00:00" + }, + { + "name": "nunomaduro/larastan", + "version": "v0.7.15", + "source": { + "type": "git", + "url": "https://github.com/nunomaduro/larastan.git", + "reference": "fffd371277aeca7951a841818d21f1015a0a2662" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nunomaduro/larastan/zipball/fffd371277aeca7951a841818d21f1015a0a2662", + "reference": "fffd371277aeca7951a841818d21f1015a0a2662", + "shasum": "" + }, + "require": { + "composer/composer": "^1.0 || ^2.0", + "ext-json": "*", + "illuminate/console": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/container": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/contracts": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/database": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/http": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/pipeline": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "illuminate/support": "^6.0 || ^7.0 || ^8.0 || ^9.0", + "mockery/mockery": "^0.9 || ^1.0", + "php": "^7.2 || ^8.0", + "phpstan/phpstan": "^0.12.90", + "symfony/process": "^4.3 || ^5.0 || ^6.0" + }, + "require-dev": { + "nikic/php-parser": "4.12.0", + "orchestra/testbench": "^4.0 || ^5.0 || ^6.0 || ^7.0", + "phpunit/phpunit": "^7.3 || ^8.2 || ^9.3" + }, + "suggest": { + "orchestra/testbench": "Using Larastan for analysing a package needs Testbench" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.7-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "NunoMaduro\\Larastan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nuno Maduro", + "email": "enunomaduro@gmail.com" + } + ], + "description": "Larastan - Discover bugs in your code without running it. A phpstan/phpstan wrapper for Laravel", + "keywords": [ + "PHPStan", + "code analyse", + "code analysis", + "larastan", + "laravel", + "package", + "php", + "static analysis" + ], + "support": { + "issues": "https://github.com/nunomaduro/larastan/issues", + "source": "https://github.com/nunomaduro/larastan/tree/v0.7.15" + }, + "funding": [ + { + "url": "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=66BYDWAT92N6L", + "type": "custom" + }, + { + "url": "https://github.com/canvural", + "type": "github" + }, + { + "url": "https://github.com/nunomaduro", + "type": "github" + }, + { + "url": "https://www.patreon.com/nunomaduro", + "type": "patreon" + } + ], + "time": "2021-10-26T11:07:56+00:00" }, { "name": "phar-io/manifest", @@ -10640,16 +10885,16 @@ }, { "name": "php-webdriver/webdriver", - "version": "1.11.1", + "version": "1.12.0", "source": { "type": "git", "url": "https://github.com/php-webdriver/php-webdriver.git", - "reference": "da16e39968f8dd5cfb7d07eef91dc2b731c69880" + "reference": "99d4856ed7dffcdf6a52eccd6551e83d8d557ceb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/da16e39968f8dd5cfb7d07eef91dc2b731c69880", - "reference": "da16e39968f8dd5cfb7d07eef91dc2b731c69880", + "url": "https://api.github.com/repos/php-webdriver/php-webdriver/zipball/99d4856ed7dffcdf6a52eccd6551e83d8d557ceb", + "reference": "99d4856ed7dffcdf6a52eccd6551e83d8d557ceb", "shasum": "" }, "require": { @@ -10658,20 +10903,19 @@ "ext-zip": "*", "php": "^5.6 || ~7.0 || ^8.0", "symfony/polyfill-mbstring": "^1.12", - "symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0" + "symfony/process": "^2.8 || ^3.1 || ^4.0 || ^5.0 || ^6.0" }, "replace": { "facebook/webdriver": "*" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.0", "ondram/ci-detector": "^2.1 || ^3.5 || ^4.0", "php-coveralls/php-coveralls": "^2.4", "php-mock/php-mock-phpunit": "^1.1 || ^2.0", "php-parallel-lint/php-parallel-lint": "^1.2", "phpunit/phpunit": "^5.7 || ^7 || ^8 || ^9", "squizlabs/php_codesniffer": "^3.5", - "symfony/var-dumper": "^3.3 || ^4.0 || ^5.0" + "symfony/var-dumper": "^3.3 || ^4.0 || ^5.0 || ^6.0" }, "suggest": { "ext-SimpleXML": "For Firefox profile creation" @@ -10700,9 +10944,9 @@ ], "support": { "issues": "https://github.com/php-webdriver/php-webdriver/issues", - "source": "https://github.com/php-webdriver/php-webdriver/tree/1.11.1" + "source": "https://github.com/php-webdriver/php-webdriver/tree/1.12.0" }, - "time": "2021-05-21T15:12:49+00:00" + "time": "2021-10-14T09:30:02+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -10759,16 +11003,16 @@ }, { "name": "phpdocumentor/reflection-docblock", - "version": "5.2.2", + "version": "5.3.0", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", - "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/622548b623e81ca6d78b721c5e029f4ce664f170", + "reference": "622548b623e81ca6d78b721c5e029f4ce664f170", "shasum": "" }, "require": { @@ -10779,7 +11023,8 @@ "webmozart/assert": "^1.9.1" }, "require-dev": { - "mockery/mockery": "~1.3.2" + "mockery/mockery": "~1.3.2", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -10809,22 +11054,22 @@ "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", "support": { "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/master" + "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/5.3.0" }, - "time": "2020-09-03T19:13:55+00:00" + "time": "2021-10-19T17:43:47+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "1.4.0", + "version": "1.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", - "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/a12f7e301eb7258bb68acd89d4aefa05c2906cae", + "reference": "a12f7e301eb7258bb68acd89d4aefa05c2906cae", "shasum": "" }, "require": { @@ -10832,7 +11077,8 @@ "phpdocumentor/reflection-common": "^2.0" }, "require-dev": { - "ext-tokenizer": "*" + "ext-tokenizer": "*", + "psalm/phar": "^4.8" }, "type": "library", "extra": { @@ -10858,39 +11104,39 @@ "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", "support": { "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.4.0" + "source": "https://github.com/phpDocumentor/TypeResolver/tree/1.5.1" }, - "time": "2020-09-17T18:55:26+00:00" + "time": "2021-10-02T14:08:47+00:00" }, { "name": "phpspec/prophecy", - "version": "1.13.0", + "version": "1.14.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea" + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/be1996ed8adc35c3fd795488a653f4b518be70ea", - "reference": "be1996ed8adc35c3fd795488a653f4b518be70ea", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", + "reference": "d86dfc2e2a3cd366cee475e52c6bb3bbc371aa0e", "shasum": "" }, "require": { "doctrine/instantiator": "^1.2", - "php": "^7.2 || ~8.0, <8.1", + "php": "^7.2 || ~8.0, <8.2", "phpdocumentor/reflection-docblock": "^5.2", "sebastian/comparator": "^3.0 || ^4.0", "sebastian/recursion-context": "^3.0 || ^4.0" }, "require-dev": { - "phpspec/phpspec": "^6.0", + "phpspec/phpspec": "^6.0 || ^7.0", "phpunit/phpunit": "^8.0 || ^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { @@ -10925,29 +11171,145 @@ ], "support": { "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/1.13.0" + "source": "https://github.com/phpspec/prophecy/tree/1.14.0" }, - "time": "2021-03-17T13:42:18+00:00" + "time": "2021-09-10T09:02:12+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "9.2.6", + "name": "phpstan/phpstan", + "version": "0.12.99", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "f6293e1b30a2354e8428e004689671b83871edde" + "url": "https://github.com/phpstan/phpstan.git", + "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/f6293e1b30a2354e8428e004689671b83871edde", - "reference": "f6293e1b30a2354e8428e004689671b83871edde", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", + "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "shasum": "" + }, + "require": { + "php": "^7.1|^8.0" + }, + "conflict": { + "phpstan/phpstan-shim": "*" + }, + "bin": [ + "phpstan", + "phpstan.phar" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + } + }, + "autoload": { + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan - PHP Static Analysis Tool", + "support": { + "issues": "https://github.com/phpstan/phpstan/issues", + "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + }, + "funding": [ + { + "url": "https://github.com/ondrejmirtes", + "type": "github" + }, + { + "url": "https://github.com/phpstan", + "type": "github" + }, + { + "url": "https://www.patreon.com/phpstan", + "type": "patreon" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", + "type": "tidelift" + } + ], + "time": "2021-09-12T20:09:55+00:00" + }, + { + "name": "phpstan/phpstan-webmozart-assert", + "version": "0.12.16", + "source": { + "type": "git", + "url": "https://github.com/phpstan/phpstan-webmozart-assert.git", + "reference": "0422ea88dbefb3a0dd608e5d09c659ef46bf6378" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpstan/phpstan-webmozart-assert/zipball/0422ea88dbefb3a0dd608e5d09c659ef46bf6378", + "reference": "0422ea88dbefb3a0dd608e5d09c659ef46bf6378", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "phpstan/phpstan": "^0.12.92" + }, + "require-dev": { + "php-parallel-lint/php-parallel-lint": "^1.2", + "phpstan/phpstan-phpunit": "^0.12.6", + "phpstan/phpstan-strict-rules": "^0.12.1", + "phpunit/phpunit": "^9.5", + "webmozart/assert": "^1.9.1" + }, + "type": "phpstan-extension", + "extra": { + "branch-alias": { + "dev-master": "0.12-dev" + }, + "phpstan": { + "includes": [ + "extension.neon" + ] + } + }, + "autoload": { + "psr-4": { + "PHPStan\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "PHPStan webmozart/assert extension", + "support": { + "issues": "https://github.com/phpstan/phpstan-webmozart-assert/issues", + "source": "https://github.com/phpstan/phpstan-webmozart-assert/tree/0.12.16" + }, + "time": "2021-08-24T12:22:14+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "9.2.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", + "reference": "cf04e88a2e3c56fc1a65488afd493325b4c1bc3e", "shasum": "" }, "require": { "ext-dom": "*", "ext-libxml": "*", "ext-xmlwriter": "*", - "nikic/php-parser": "^4.10.2", + "nikic/php-parser": "^4.13.0", "php": ">=7.3", "phpunit/php-file-iterator": "^3.0.3", "phpunit/php-text-template": "^2.0.2", @@ -10996,7 +11358,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.6" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.8" }, "funding": [ { @@ -11004,7 +11366,7 @@ "type": "github" } ], - "time": "2021-03-28T07:26:59+00:00" + "time": "2021-10-30T08:01:38+00:00" }, { "name": "phpunit/php-file-iterator", @@ -11249,16 +11611,16 @@ }, { "name": "phpunit/phpunit", - "version": "9.5.9", + "version": "9.5.10", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b" + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", - "reference": "ea8c2dfb1065eb35a79b3681eee6e6fb0a6f273b", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c814a05837f2edb0d1471d6e3f4ab3501ca3899a", + "reference": "c814a05837f2edb0d1471d6e3f4ab3501ca3899a", "shasum": "" }, "require": { @@ -11274,7 +11636,7 @@ "phar-io/version": "^3.0.2", "php": ">=7.3", "phpspec/prophecy": "^1.12.1", - "phpunit/php-code-coverage": "^9.2.3", + "phpunit/php-code-coverage": "^9.2.7", "phpunit/php-file-iterator": "^3.0.5", "phpunit/php-invoker": "^3.1.1", "phpunit/php-text-template": "^2.0.3", @@ -11336,7 +11698,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.9" + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.5.10" }, "funding": [ { @@ -11348,7 +11710,7 @@ "type": "github" } ], - "time": "2021-08-31T06:47:40+00:00" + "time": "2021-09-25T07:38:51+00:00" }, { "name": "react/promise", @@ -12253,7 +12615,6 @@ "type": "github" } ], - "abandoned": true, "time": "2020-09-28T06:45:17+00:00" }, { @@ -12478,16 +12839,16 @@ }, { "name": "symfony/debug", - "version": "v4.4.27", + "version": "v4.4.31", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c" + "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/2f9160e92eb64c95da7368c867b663a8e34e980c", - "reference": "2f9160e92eb64c95da7368c867b663a8e34e980c", + "url": "https://api.github.com/repos/symfony/debug/zipball/43ede438d4cb52cd589ae5dc070e9323866ba8e0", + "reference": "43ede438d4cb52cd589ae5dc070e9323866ba8e0", "shasum": "" }, "require": { @@ -12526,7 +12887,7 @@ "description": "Provides tools to ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/debug/tree/v4.4.27" + "source": "https://github.com/symfony/debug/tree/v4.4.31" }, "funding": [ { @@ -12542,7 +12903,7 @@ "type": "tidelift" } ], - "time": "2021-07-22T07:21:39+00:00" + "time": "2021-09-24T13:30:14+00:00" }, { "name": "symfony/filesystem", @@ -12803,5 +13164,5 @@ "ext-zip": "*" }, "platform-dev": [], - "plugin-api-version": "2.1.0" + "plugin-api-version": "2.0.0" } diff --git a/database/migrations/2021_10_23_202643_update_default_values_for_eggs.php b/database/migrations/2021_10_23_202643_update_default_values_for_eggs.php index 1d4b5d18a..b35fe83e9 100644 --- a/database/migrations/2021_10_23_202643_update_default_values_for_eggs.php +++ b/database/migrations/2021_10_23_202643_update_default_values_for_eggs.php @@ -1,8 +1,8 @@ \\>\\:\\:flatMap\\(\\)$#" + count: 1 + path: app/Exceptions/Handler.php + + - + message: "#^Possibly invalid array key type array\\\\|string\\.$#" + count: 1 + path: app/Extensions/Backups/BackupManager.php + + - + message: "#^Parameter \\#1 \\$message of static method Illuminate\\\\Log\\\\Logger\\:\\:info\\(\\) expects string, string\\|false given\\.$#" + count: 2 + path: app/Http/Controllers/Api/Application/Eggs/EggController.php + + - + message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Services\\\\Eggs\\\\Sharing\\\\EggImporterService\\:\\:handleContent\\(\\) expects string, resource\\|string given\\.$#" + count: 1 + path: app/Http/Controllers/Api/Application/Nests/NestController.php + + - + message: "#^Parameter \\#1 \\$perPage of method Illuminate\\\\Database\\\\Eloquent\\\\Relations\\\\HasMany\\\\:\\:paginate\\(\\) expects int\\|null, array\\|int\\|string given\\.$#" + count: 1 + path: app/Http/Controllers/Api/Client/Servers/BackupController.php + + - + message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Repositories\\\\Wings\\\\DaemonFileRepository\\:\\:putContent\\(\\) expects string, resource\\|string given\\.$#" + count: 1 + path: app/Http/Controllers/Api/Client/Servers/FileController.php + + - + message: "#^Parameter \\#1 \\$string of function md5 expects string, string\\|false given\\.$#" + count: 1 + path: app/Http/Controllers/Base/LocaleController.php + + - + message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Routing\\\\Router\\:\\:bind\\(\\) expects string, int\\|string given\\.$#" + count: 1 + path: app/Http/Middleware/Api/Application/SubstituteApplicationApiBindings.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, resource\\|string given\\.$#" + count: 1 + path: app/Http/Middleware/Api/IsValidJson.php + + - + message: "#^Parameter \\#1 \\$array of function array_get expects array\\|ArrayAccess, array\\\\|false given\\.$#" + count: 1 + path: app/Http/Middleware/VerifyReCaptcha.php + + - + message: "#^Parameter \\#1 \\$value of function snake_case expects string, int\\|string given\\.$#" + count: 1 + path: app/Http/Requests/Api/Application/Nodes/StoreNodeRequest.php + + - + message: "#^Method Pterodactyl\\\\Jobs\\\\Schedule\\\\RunTaskJob\\:\\:__construct\\(\\) has parameter \\$manualRun with no typehint specified\\.$#" + count: 1 + path: app/Jobs/Schedule/RunTaskJob.php + + - + message: "#^Parameter \\#2 \\$column of static method Illuminate\\\\Validation\\\\Rule\\:\\:unique\\(\\) expects string, int\\|string given\\.$#" + count: 1 + path: app/Models/Model.php + + - + message: "#^Method Pterodactyl\\\\Models\\\\Node\\:\\:getJsonConfiguration\\(\\) should return string but returns string\\|false\\.$#" + count: 1 + path: app/Models/Node.php + + - + message: "#^Method Pterodactyl\\\\Repositories\\\\Eloquent\\\\EloquentRepository\\:\\:updateOrCreate\\(\\) should return Illuminate\\\\Database\\\\Eloquent\\\\Model but returns bool\\|Illuminate\\\\Database\\\\Eloquent\\\\Model\\.$#" + count: 1 + path: app/Repositories/Eloquent/EloquentRepository.php + + - + message: "#^Parameter \\#1 \\.\\.\\.\\$model of method Pterodactyl\\\\Repositories\\\\Repository\\:\\:initializeModel\\(\\) expects class\\-string\\, mixed given\\.$#" + count: 1 + path: app/Repositories/Repository.php + + - + message: "#^Parameter \\#2 \\$content of method Pterodactyl\\\\Services\\\\Eggs\\\\Sharing\\\\EggImporterService\\:\\:handleContent\\(\\) expects string, string\\|false given\\.$#" + count: 1 + path: app/Services/Eggs/Sharing/EggImporterService.php + + - + message: "#^Parameter \\#1 \\$json of function json_decode expects string, string\\|false given\\.$#" + count: 1 + path: app/Services/Eggs/Sharing/EggUpdateImporterService.php + + - + message: "#^Parameter \\#1 \\$value of static method Illuminate\\\\Support\\\\Str\\:\\:snake\\(\\) expects string, array\\|string given\\.$#" + count: 1 + path: app/Services/Eggs/Variables/VariableCreationService.php + + - + message: "#^Parameter \\#1 \\$value of static method Illuminate\\\\Support\\\\Str\\:\\:snake\\(\\) expects string, array\\|string given\\.$#" + count: 1 + path: app/Services/Eggs/Variables/VariableUpdateService.php + + - + message: "#^Parameter \\#1 \\$string of function substr expects string, string\\|false given\\.$#" + count: 1 + path: app/Services/Helpers/SoftwareVersionService.php + + - + message: "#^Parameter \\#2 \\$string of function explode expects string, string\\|false given\\.$#" + count: 1 + path: app/Services/Helpers/SoftwareVersionService.php + + - + message: "#^Parameter \\#1 \\$id of method Lcobucci\\\\JWT\\\\Builder\\:\\:identifiedBy\\(\\) expects string, string\\|false given\\.$#" + count: 1 + path: app/Services/Nodes/NodeJWTService.php + + - + message: "#^Parameter \\#1 \\$name of method Lcobucci\\\\JWT\\\\Builder\\:\\:withClaim\\(\\) expects string, int\\|string given\\.$#" + count: 1 + path: app/Services/Nodes/NodeJWTService.php + + - + message: "#^Parameter \\#1 \\$key of method Illuminate\\\\Database\\\\Eloquent\\\\Model\\:\\:setAttribute\\(\\) expects string, int\\|string given\\.$#" + count: 1 + path: app/Services/Servers/ServerConfigurationStructureService.php + + - + message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Collection\\\\|Pterodactyl\\\\Models\\\\Allocation\\:\\:\\$node_id\\.$#" + count: 1 + path: app/Services/Servers/ServerCreationService.php + + - + message: "#^Access to an undefined property Illuminate\\\\Database\\\\Eloquent\\\\Collection\\\\|Pterodactyl\\\\Models\\\\Egg\\:\\:\\$nest_id\\.$#" + count: 1 + path: app/Services/Servers/ServerCreationService.php + + - + message: "#^Parameter \\#3 \\$subject of function preg_replace expects array\\|string, string\\|false given\\.$#" + count: 1 + path: app/Services/Subusers/SubuserCreationService.php + + - + message: "#^Parameter \\#1 \\$string of function urlencode expects string, array\\|string\\|null given\\.$#" + count: 1 + path: app/Services/Users/TwoFactorSetupService.php + + - + message: "#^Cannot call method getResourceName\\(\\) on \\(callable&class\\-string\\)\\|\\(callable&object\\)\\|League\\\\Fractal\\\\TransformerAbstract\\.$#" + count: 2 + path: app/Transformers/Api/Transformer.php + + - + message: "#^Cannot call method setTimezone\\(\\) on Carbon\\\\CarbonImmutable\\|false\\.$#" + count: 1 + path: app/Transformers/Api/Transformer.php + + - + message: "#^Parameter \\#1 \\$object_or_class of function method_exists expects object\\|string, \\(callable\\)\\|League\\\\Fractal\\\\TransformerAbstract given\\.$#" + count: 2 + path: app/Transformers/Api/Transformer.php + diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 000000000..3fb3a5bb3 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,15 @@ +includes: + - ./phpstan-baseline.neon + - ./vendor/nunomaduro/larastan/extension.neon + - ./vendor/phpstan/phpstan-webmozart-assert/extension.neon + +parameters: + paths: + - app + - database/Seeders + level: 7 + ignoreErrors: + - '#Unsafe usage of new static#' + - '#has no return typehint specified.#' + - '#has no typehint specified.#' + checkMissingIterableValueType: false diff --git a/phpunit.xml b/phpunit.xml index 227dadb9e..a14cb82be 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -33,6 +33,7 @@ + diff --git a/tests/Integration/Api/Application/Location/LocationControllerTest.php b/tests/Integration/Api/Application/Location/LocationControllerTest.php index 9dd7e0d88..7032ceffa 100644 --- a/tests/Integration/Api/Application/Location/LocationControllerTest.php +++ b/tests/Integration/Api/Application/Location/LocationControllerTest.php @@ -2,7 +2,6 @@ namespace Pterodactyl\Tests\Integration\Api\Application\Location; -use Pterodactyl\Models\Node; use Illuminate\Http\Response; use Pterodactyl\Models\Location; use Pterodactyl\Transformers\Api\Application\NodeTransformer; diff --git a/tests/Integration/Api/Application/Users/UserControllerTest.php b/tests/Integration/Api/Application/Users/UserControllerTest.php index 0ae69e3c6..456a5fbe0 100644 --- a/tests/Integration/Api/Application/Users/UserControllerTest.php +++ b/tests/Integration/Api/Application/Users/UserControllerTest.php @@ -4,7 +4,6 @@ namespace Pterodactyl\Tests\Integration\Api\Application\Users; use Pterodactyl\Models\User; use Illuminate\Http\Response; -use Pterodactyl\Services\Acl\Api\AdminAcl; use Pterodactyl\Transformers\Api\Application\UserTransformer; use Pterodactyl\Transformers\Api\Application\ServerTransformer; use Pterodactyl\Tests\Integration\Api\Application\ApplicationApiIntegrationTestCase;