Run cs-fix, ensure we only install dependency versions supporting 7.4+
This commit is contained in:
parent
3e55a79439
commit
34ffaebd3e
16 changed files with 154 additions and 290 deletions
|
@ -114,6 +114,7 @@ class AppSettingsCommand extends Command
|
|||
foreach ($validator->errors()->all() as $error) {
|
||||
$this->output->error($error);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ class MakeNodeCommand extends Command
|
|||
*/
|
||||
protected $description = 'Creates a new node on the system via the CLI.';
|
||||
|
||||
|
||||
/**
|
||||
* Handle the command execution process.
|
||||
*
|
||||
|
@ -62,13 +61,18 @@ class MakeNodeCommand extends Command
|
|||
$data['fqdn'] = $this->option('fqdn') ?? $this->ask('Enter a domain name (e.g node.example.com) to be used for connecting to the daemon. An IP address may only be used if you are not using SSL for this node');
|
||||
if (!filter_var(gethostbyname($data['fqdn']), FILTER_VALIDATE_IP)) {
|
||||
$this->error('The FQDN or IP address provided does not resolve to a valid IP address.');
|
||||
|
||||
return;
|
||||
}
|
||||
$data['public'] = $this->option('public') ?? $this->confirm('Should this node be public? As a note, setting a node to private you will be denying the ability to auto-deploy to this node.', true);
|
||||
$data['scheme'] = $this->option('scheme') ?? $this->anticipate('Please either enter https for SSL or http for a non-ssl connection',
|
||||
["https","http",],"https");
|
||||
$data['scheme'] = $this->option('scheme') ?? $this->anticipate(
|
||||
'Please either enter https for SSL or http for a non-ssl connection',
|
||||
['https', 'http'],
|
||||
'https'
|
||||
);
|
||||
if (filter_var($data['fqdn'], FILTER_VALIDATE_IP) && $data['scheme'] === 'https') {
|
||||
$this->error('A fully qualified domain name that resolves to a public IP address is required in order to use SSL for this node.');
|
||||
|
||||
return;
|
||||
}
|
||||
$data['behind_proxy'] = $this->option('proxy') ?? $this->confirm('Is your FQDN behind a proxy?');
|
||||
|
|
|
@ -69,7 +69,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());
|
||||
|
|
|
@ -87,6 +87,7 @@ 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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,8 +128,6 @@ class ServerTransferController extends Controller
|
|||
/**
|
||||
* The daemon notifies us about a transfer success.
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*
|
||||
* @throws \Throwable
|
||||
*/
|
||||
public function success(string $uuid): JsonResponse
|
||||
|
|
|
@ -92,9 +92,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
|
||||
{
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Pterodactyl\Http\Controllers\Auth;
|
||||
|
||||
use Carbon\CarbonInterface;
|
||||
use Carbon\CarbonImmutable;
|
||||
use Carbon\CarbonInterface;
|
||||
use Pterodactyl\Models\User;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use PragmaRX\Google2FA\Google2FA;
|
||||
|
@ -110,9 +110,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
|
||||
*/
|
||||
protected function hasValidSessionData(array $data): bool
|
||||
{
|
||||
|
|
|
@ -28,7 +28,7 @@ class VerifyCsrfToken extends BaseVerifier
|
|||
* to using Sanctum for the API endpoints, which handles that for us automatically.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \Closure $next
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @throws \Illuminate\Session\TokenMismatchException
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue