[Web] Update composer libs
- Removing symfony/deprecation-contracts (v2.4.0) - Upgrading ddeboer/imap (1.12.1 => 1.13.1) - Upgrading directorytree/ldaprecord (v2.6.3 => v2.10.1) - Upgrading illuminate/contracts (v8.53.1 => v9.3.0) - Upgrading nesbot/carbon (2.51.1 => 2.57.0) - Upgrading phpmailer/phpmailer (v6.5.0 => v6.6.0) - Upgrading psr/container (1.1.1 => 2.0.2) - Upgrading psr/log (1.1.4 => 3.0.0) - Upgrading psr/simple-cache (1.0.1 => 2.0.0) - Upgrading robthree/twofactorauth (1.8.0 => 1.8.1) - Upgrading symfony/polyfill-ctype (v1.23.0 => v1.24.0) - Upgrading symfony/polyfill-mbstring (v1.23.1 => v1.24.0) - Upgrading symfony/polyfill-php80 (v1.23.1 => v1.24.0) - Upgrading symfony/translation (v5.3.4 => v6.0.5) - Upgrading symfony/translation-contracts (v2.4.0 => v3.0.0) - Upgrading symfony/var-dumper (v5.3.6 => v6.0.5) - Upgrading tightenco/collect (v8.34.0 => v8.83.2) - Upgrading twig/twig (v3.3.2 => v3.3.8)
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
|
||||
namespace Symfony\Component\VarDumper\Command\Descriptor;
|
||||
|
||||
use Symfony\Component\Console\Formatter\OutputFormatterStyle;
|
||||
use Symfony\Component\Console\Input\ArrayInput;
|
||||
use Symfony\Component\Console\Output\OutputInterface;
|
||||
use Symfony\Component\Console\Style\SymfonyStyle;
|
||||
@@ -28,13 +27,11 @@ use Symfony\Component\VarDumper\Dumper\CliDumper;
|
||||
class CliDescriptor implements DumpDescriptorInterface
|
||||
{
|
||||
private $dumper;
|
||||
private $lastIdentifier;
|
||||
private $supportsHref;
|
||||
private mixed $lastIdentifier = null;
|
||||
|
||||
public function __construct(CliDumper $dumper)
|
||||
{
|
||||
$this->dumper = $dumper;
|
||||
$this->supportsHref = method_exists(OutputFormatterStyle::class, 'setHref');
|
||||
}
|
||||
|
||||
public function describe(OutputInterface $output, Data $data, array $context, int $clientId): void
|
||||
@@ -66,8 +63,7 @@ class CliDescriptor implements DumpDescriptorInterface
|
||||
if (isset($context['source'])) {
|
||||
$source = $context['source'];
|
||||
$sourceInfo = sprintf('%s on line %d', $source['name'], $source['line']);
|
||||
$fileLink = $source['file_link'] ?? null;
|
||||
if ($this->supportsHref && $fileLink) {
|
||||
if ($fileLink = $source['file_link'] ?? null) {
|
||||
$sourceInfo = sprintf('<href=%s>%s</>', $fileLink, $sourceInfo);
|
||||
}
|
||||
$rows[] = ['source', $sourceInfo];
|
||||
@@ -77,11 +73,6 @@ class CliDescriptor implements DumpDescriptorInterface
|
||||
|
||||
$io->table([], $rows);
|
||||
|
||||
if (!$this->supportsHref && isset($fileLink)) {
|
||||
$io->writeln(['<info>Open source in your IDE/browser:</info>', $fileLink]);
|
||||
$io->newLine();
|
||||
}
|
||||
|
||||
$this->dumper->dump($data);
|
||||
$io->newLine();
|
||||
}
|
||||
|
@@ -25,7 +25,7 @@ use Symfony\Component\VarDumper\Dumper\HtmlDumper;
|
||||
class HtmlDescriptor implements DumpDescriptorInterface
|
||||
{
|
||||
private $dumper;
|
||||
private $initialized = false;
|
||||
private bool $initialized = false;
|
||||
|
||||
public function __construct(HtmlDumper $dumper)
|
||||
{
|
||||
|
@@ -11,7 +11,10 @@
|
||||
|
||||
namespace Symfony\Component\VarDumper\Command;
|
||||
|
||||
use Symfony\Component\Console\Attribute\AsCommand;
|
||||
use Symfony\Component\Console\Command\Command;
|
||||
use Symfony\Component\Console\Completion\CompletionInput;
|
||||
use Symfony\Component\Console\Completion\CompletionSuggestions;
|
||||
use Symfony\Component\Console\Exception\InvalidArgumentException;
|
||||
use Symfony\Component\Console\Input\InputInterface;
|
||||
use Symfony\Component\Console\Input\InputOption;
|
||||
@@ -32,15 +35,13 @@ use Symfony\Component\VarDumper\Server\DumpServer;
|
||||
*
|
||||
* @final
|
||||
*/
|
||||
#[AsCommand(name: 'server:dump', description: 'Start a dump server that collects and displays dumps in a single place')]
|
||||
class ServerDumpCommand extends Command
|
||||
{
|
||||
protected static $defaultName = 'server:dump';
|
||||
protected static $defaultDescription = 'Start a dump server that collects and displays dumps in a single place';
|
||||
|
||||
private $server;
|
||||
|
||||
/** @var DumpDescriptorInterface[] */
|
||||
private $descriptors;
|
||||
private array $descriptors;
|
||||
|
||||
public function __construct(DumpServer $server, array $descriptors = [])
|
||||
{
|
||||
@@ -55,11 +56,8 @@ class ServerDumpCommand extends Command
|
||||
|
||||
protected function configure()
|
||||
{
|
||||
$availableFormats = implode(', ', array_keys($this->descriptors));
|
||||
|
||||
$this
|
||||
->addOption('format', null, InputOption::VALUE_REQUIRED, sprintf('The output format (%s)', $availableFormats), 'cli')
|
||||
->setDescription(self::$defaultDescription)
|
||||
->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:
|
||||
@@ -99,4 +97,16 @@ EOF
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function complete(CompletionInput $input, CompletionSuggestions $suggestions): void
|
||||
{
|
||||
if ($input->mustSuggestOptionValuesFor('format')) {
|
||||
$suggestions->suggestValues($this->getAvailableFormats());
|
||||
}
|
||||
}
|
||||
|
||||
private function getAvailableFormats(): array
|
||||
{
|
||||
return array_keys($this->descriptors);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user