mirror of
https://github.com/linuxserver/Heimdall.git
synced 2025-12-18 04:43:49 +09:00
Updates to vendors etc
This commit is contained in:
@@ -38,14 +38,13 @@ use Symfony\Component\VarDumper\Server\DumpServer;
|
||||
#[AsCommand(name: 'server:dump', description: 'Start a dump server that collects and displays dumps in a single place')]
|
||||
class ServerDumpCommand extends Command
|
||||
{
|
||||
private DumpServer $server;
|
||||
|
||||
/** @var DumpDescriptorInterface[] */
|
||||
private array $descriptors;
|
||||
|
||||
public function __construct(DumpServer $server, array $descriptors = [])
|
||||
{
|
||||
$this->server = $server;
|
||||
public function __construct(
|
||||
private DumpServer $server,
|
||||
array $descriptors = [],
|
||||
) {
|
||||
$this->descriptors = $descriptors + [
|
||||
'cli' => new CliDescriptor(new CliDumper()),
|
||||
'html' => new HtmlDescriptor(new HtmlDumper()),
|
||||
@@ -57,7 +56,7 @@ class ServerDumpCommand extends Command
|
||||
protected function configure(): void
|
||||
{
|
||||
$this
|
||||
->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli')
|
||||
->addOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format (%s)', implode(', ', $this->getAvailableFormats())), 'cli')
|
||||
->setHelp(<<<'EOF'
|
||||
<info>%command.name%</info> starts a dump server that collects and displays
|
||||
dumps in a single place for debugging you application:
|
||||
@@ -80,7 +79,7 @@ EOF
|
||||
$format = $input->getOption('format');
|
||||
|
||||
if (!$descriptor = $this->descriptors[$format] ?? null) {
|
||||
throw new InvalidArgumentException(sprintf('Unsupported format "%s".', $format));
|
||||
throw new InvalidArgumentException(\sprintf('Unsupported format "%s".', $format));
|
||||
}
|
||||
|
||||
$errorIo = $io->getErrorStyle();
|
||||
@@ -88,7 +87,7 @@ EOF
|
||||
|
||||
$this->server->start();
|
||||
|
||||
$errorIo->success(sprintf('Server listening on %s', $this->server->getHost()));
|
||||
$errorIo->success(\sprintf('Server listening on %s', $this->server->getHost()));
|
||||
$errorIo->comment('Quit the server with CONTROL-C.');
|
||||
|
||||
$this->server->listen(function (Data $data, array $context, int $clientId) use ($descriptor, $io) {
|
||||
|
||||
Reference in New Issue
Block a user