From 05e38eadbeb3de19e5b26003c2b401e00bb71df4 Mon Sep 17 00:00:00 2001 From: polo Date: Sun, 18 Oct 2026 00:08:23 +0200 Subject: =?UTF-8?q?sortie=20de=20vendor=20du=20d=C3=A9p=C3=B4t,=20oubli=20?= =?UTF-8?q?dans=20config-template.ini?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../CommandLoader/CommandLoaderInterface.php | 38 ---------------- .../CommandLoader/ContainerCommandLoader.php | 52 ---------------------- .../console/CommandLoader/FactoryCommandLoader.php | 52 ---------------------- 3 files changed, 142 deletions(-) delete mode 100644 vendor/symfony/console/CommandLoader/CommandLoaderInterface.php delete mode 100644 vendor/symfony/console/CommandLoader/ContainerCommandLoader.php delete mode 100644 vendor/symfony/console/CommandLoader/FactoryCommandLoader.php (limited to 'vendor/symfony/console/CommandLoader') diff --git a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php b/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php deleted file mode 100644 index b6b637c..0000000 --- a/vendor/symfony/console/CommandLoader/CommandLoaderInterface.php +++ /dev/null @@ -1,38 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * @author Robin Chalas - */ -interface CommandLoaderInterface -{ - /** - * Loads a command. - * - * @throws CommandNotFoundException - */ - public function get(string $name): Command; - - /** - * Checks if a command exists. - */ - public function has(string $name): bool; - - /** - * @return string[] - */ - public function getNames(): array; -} diff --git a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php b/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php deleted file mode 100644 index 84e25be..0000000 --- a/vendor/symfony/console/CommandLoader/ContainerCommandLoader.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Psr\Container\ContainerInterface; -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * Loads commands from a PSR-11 container. - * - * @author Robin Chalas - */ -class ContainerCommandLoader implements CommandLoaderInterface -{ - /** - * @param array $commandMap An array with command names as keys and service ids as values - */ - public function __construct( - private ContainerInterface $container, - private array $commandMap, - ) { - } - - public function get(string $name): Command - { - if (!$this->has($name)) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - return $this->container->get($this->commandMap[$name]); - } - - public function has(string $name): bool - { - return isset($this->commandMap[$name]) && $this->container->has($this->commandMap[$name]); - } - - public function getNames(): array - { - return array_keys($this->commandMap); - } -} diff --git a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php b/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php deleted file mode 100644 index ae16bf6..0000000 --- a/vendor/symfony/console/CommandLoader/FactoryCommandLoader.php +++ /dev/null @@ -1,52 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Console\CommandLoader; - -use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Exception\CommandNotFoundException; - -/** - * A simple command loader using factories to instantiate commands lazily. - * - * @author Maxime Steinhausser - */ -class FactoryCommandLoader implements CommandLoaderInterface -{ - /** - * @param callable[] $factories Indexed by command names - */ - public function __construct( - private array $factories, - ) { - } - - public function has(string $name): bool - { - return isset($this->factories[$name]); - } - - public function get(string $name): Command - { - if (!isset($this->factories[$name])) { - throw new CommandNotFoundException(sprintf('Command "%s" does not exist.', $name)); - } - - $factory = $this->factories[$name]; - - return $factory(); - } - - public function getNames(): array - { - return array_keys($this->factories); - } -} -- cgit v1.2.3