Skip to content

Commit

Permalink
Update all dependencies (#712)
Browse files Browse the repository at this point in the history
* update composer.lock

* run pint

* fix phpstan

* update migrations (sqlite `dropForeign`)

* fix migrations

* Reset these back for now

* Alphabetize the rules

* run `php artisan filament:upgrade`

---------

Co-authored-by: Lance Pioch <[email protected]>
  • Loading branch information
Boy132 and lancepioch authored Nov 22, 2024
1 parent f33f916 commit d555c42
Show file tree
Hide file tree
Showing 124 changed files with 977 additions and 1,426 deletions.
1 change: 1 addition & 0 deletions app/Console/Commands/Server/BulkPowerActionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ public function handle(): void

$bar = $this->output->createProgressBar($count);
$powerRepository = $this->powerRepository;
// @phpstan-ignore-next-line
$this->getQueryBuilder($servers, $nodes)->each(function (Server $server) use ($action, $powerRepository, &$bar) {
$bar->clear();

Expand Down
4 changes: 1 addition & 3 deletions app/Events/ActivityLogged.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@

class ActivityLogged extends Event
{
public function __construct(public ActivityLog $model)
{
}
public function __construct(public ActivityLog $model) {}

public function is(string $event): bool
{
Expand Down
4 changes: 1 addition & 3 deletions app/Events/Auth/DirectLogin.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@

class DirectLogin extends Event
{
public function __construct(public User $user, public bool $remember)
{
}
public function __construct(public User $user, public bool $remember) {}
}
4 changes: 1 addition & 3 deletions app/Events/Auth/FailedCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ class FailedCaptcha extends Event
/**
* Create a new event instance.
*/
public function __construct(public string $ip, public ?string $message)
{
}
public function __construct(public string $ip, public ?string $message) {}
}
4 changes: 1 addition & 3 deletions app/Events/Auth/FailedPasswordReset.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,5 @@ class FailedPasswordReset extends Event
/**
* Create a new event instance.
*/
public function __construct(public string $ip, public string $email)
{
}
public function __construct(public string $ip, public string $email) {}
}
4 changes: 1 addition & 3 deletions app/Events/Auth/ProvidedAuthenticationToken.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,5 @@

class ProvidedAuthenticationToken extends Event
{
public function __construct(public User $user, public bool $recovery = false)
{
}
public function __construct(public User $user, public bool $recovery = false) {}
}
4 changes: 1 addition & 3 deletions app/Events/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace App\Events;

abstract class Event
{
}
abstract class Event {}
4 changes: 1 addition & 3 deletions app/Events/Server/Installed.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,5 @@ class Installed extends Event
/**
* Create a new event instance.
*/
public function __construct(public Server $server)
{
}
public function __construct(public Server $server) {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class InvalidPasswordProvidedException extends DisplayException
{
}
class InvalidPasswordProvidedException extends DisplayException {}
4 changes: 1 addition & 3 deletions app/Exceptions/PanelException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace App\Exceptions;

class PanelException extends \Exception
{
}
class PanelException extends \Exception {}
4 changes: 1 addition & 3 deletions app/Exceptions/Repository/DuplicateDatabaseNameException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class DuplicateDatabaseNameException extends DisplayException
{
}
class DuplicateDatabaseNameException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class ServerUsingAllocationException extends DisplayException
{
}
class ServerUsingAllocationException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class NoViableAllocationException extends DisplayException
{
}
class NoViableAllocationException extends DisplayException {}
4 changes: 1 addition & 3 deletions app/Exceptions/Service/Egg/HasChildrenException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class HasChildrenException extends DisplayException
{
}
class HasChildrenException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class BadValidationRuleException extends DisplayException
{
}
class BadValidationRuleException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class ReservedVariableNameException extends DisplayException
{
}
class ReservedVariableNameException extends DisplayException {}
4 changes: 1 addition & 3 deletions app/Exceptions/Service/InvalidFileUploadException.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class InvalidFileUploadException extends DisplayException
{
}
class InvalidFileUploadException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class ConfigurationNotPersistedException extends DisplayException
{
}
class ConfigurationNotPersistedException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class ServerSubuserExistsException extends DisplayException
{
}
class ServerSubuserExistsException extends DisplayException {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,4 @@

use App\Exceptions\DisplayException;

class UserIsServerOwnerException extends DisplayException
{
}
class UserIsServerOwnerException extends DisplayException {}
4 changes: 1 addition & 3 deletions app/Extensions/Backups/BackupManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@ class BackupManager
/**
* BackupManager constructor.
*/
public function __construct(protected Application $app)
{
}
public function __construct(protected Application $app) {}

/**
* Returns a backup adapter instance.
Expand Down
2 changes: 1 addition & 1 deletion app/Filament/Resources/UserResource/Pages/EditProfile.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ protected function handleRecordUpdate(Model $record, array $data): Model

if ($token = $data['2facode'] ?? null) {
$tokens = $this->toggleTwoFactorService->handle($record, $token, true);
cache()->set("users.$record->id.2fa.tokens", implode("\n", $tokens), now()->addSeconds(15));
cache()->put("users.$record->id.2fa.tokens", implode("\n", $tokens), now()->addSeconds(15));

$this->redirectRoute('filament.admin.auth.profile', ['tab' => '-2fa-tab']);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ class BackupRemoteUploadController extends Controller
/**
* BackupRemoteUploadController constructor.
*/
public function __construct(private BackupManager $backupManager)
{
}
public function __construct(private BackupManager $backupManager) {}

/**
* Returns the required presigned urls to upload a backup to S3 cloud storage.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ class BackupStatusController extends Controller
/**
* BackupStatusController constructor.
*/
public function __construct(private BackupManager $backupManager)
{
}
public function __construct(private BackupManager $backupManager) {}

/**
* Handles updating the state of a backup.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function status(Server $server, Request $request): JsonResponse
{
$status = fluent($request->json()->all())->get('data.new_state');

cache()->set("servers.$server->uuid.container.status", $status, now()->addHour());
cache()->put("servers.$server->uuid.container.status", $status, now()->addHour());

return new JsonResponse([]);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ public function __construct(
protected ConnectionInterface $connection,
private ServerConfigurationStructureService $configurationStructureService,
private EggConfigurationService $eggConfigurationService
) {
}
) {}

/**
* Returns details about the server that allows daemon to self-recover and ensure
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ class ServerTransferController extends Controller
public function __construct(
private ConnectionInterface $connection,
private DaemonServerRepository $daemonServerRepository,
) {
}
) {}

/**
* The daemon notifies us about a transfer failure.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ class SftpAuthenticationController extends Controller
{
use ThrottlesLogins;

public function __construct(protected GetUserPermissionsService $permissions)
{
}
public function __construct(protected GetUserPermissionsService $permissions) {}

/**
* Authenticate a set of credentials and return the associated server details
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/OAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ class OAuthController extends Controller
public function __construct(
private AuthManager $auth,
private UserUpdateService $updateService
) {
}
) {}

/**
* Redirect user to the OAuth provider
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Auth/ResetPasswordController.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ class ResetPasswordController extends Controller
*/
public function __construct(
private Hasher $hasher,
) {
}
) {}

/**
* Reset the given user's password.
Expand Down
4 changes: 1 addition & 3 deletions app/Http/Controllers/Base/IndexController.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@ class IndexController extends Controller
/**
* IndexController constructor.
*/
public function __construct(protected ViewFactory $view)
{
}
public function __construct(protected ViewFactory $view) {}

/**
* Returns listing of user's servers.
Expand Down
3 changes: 1 addition & 2 deletions app/Http/Controllers/Base/OAuthController.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class OAuthController extends Controller
*/
public function __construct(
private UserUpdateService $updateService
) {
}
) {}

/**
* Link a new OAuth
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ class AuthenticateServerAccess
/**
* AuthenticateServerAccess constructor.
*/
public function __construct()
{
}
public function __construct() {}

/**
* Authenticate that this server exists and is not suspended or marked as installing.
Expand Down
4 changes: 1 addition & 3 deletions app/Http/Middleware/LanguageMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class LanguageMiddleware
/**
* LanguageMiddleware constructor.
*/
public function __construct(private Application $app)
{
}
public function __construct(private Application $app) {}

/**
* Handle an incoming request and set the user's preferred language.
Expand Down
4 changes: 1 addition & 3 deletions app/Http/Middleware/MaintenanceMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class MaintenanceMiddleware
/**
* MaintenanceMiddleware constructor.
*/
public function __construct(private ResponseFactory $response)
{
}
public function __construct(private ResponseFactory $response) {}

/**
* Handle an incoming request.
Expand Down
4 changes: 1 addition & 3 deletions app/Http/Middleware/RedirectIfAuthenticated.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ class RedirectIfAuthenticated
/**
* RedirectIfAuthenticated constructor.
*/
public function __construct(private AuthManager $authManager)
{
}
public function __construct(private AuthManager $authManager) {}

/**
* Handle an incoming request.
Expand Down
5 changes: 1 addition & 4 deletions app/Http/Middleware/VerifyReCaptcha.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@

readonly class VerifyReCaptcha
{
public function __construct(private Application $app)
{

}
public function __construct(private Application $app) {}

public function handle(Request $request, \Closure $next): mixed
{
Expand Down
4 changes: 1 addition & 3 deletions app/Http/Requests/Api/Application/Nodes/GetNodeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace App\Http\Requests\Api\Application\Nodes;

class GetNodeRequest extends GetNodesRequest
{
}
class GetNodeRequest extends GetNodesRequest {}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace App\Http\Requests\Api\Application\Roles;

class UpdateRoleRequest extends StoreRoleRequest
{
}
class UpdateRoleRequest extends StoreRoleRequest {}
4 changes: 1 addition & 3 deletions app/Http/ViewComposers/AssetComposer.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@

readonly class AssetComposer
{
public function __construct(private AssetHashService $assetHashService)
{
}
public function __construct(private AssetHashService $assetHashService) {}

public function compose(View $view): void
{
Expand Down
3 changes: 1 addition & 2 deletions app/Jobs/ProcessWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ public function __construct(
private WebhookConfiguration $webhookConfiguration,
private string $eventName,
private array $data
) {
}
) {}

public function handle(): void
{
Expand Down
5 changes: 1 addition & 4 deletions app/Jobs/Schedule/RunTaskJob.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,7 @@ class RunTaskJob extends Job implements ShouldQueue
/**
* RunTaskJob constructor.
*/
public function __construct(public Task $task, public bool $manualRun = false)
{

}
public function __construct(public Task $task, public bool $manualRun = false) {}

/**
* Run the job and send actions to the daemon running the server.
Expand Down
Loading

0 comments on commit d555c42

Please sign in to comment.