|
21 | 21 | use Symfony\Component\Console\Helper\ProcessHelper; |
22 | 22 | use Composer\Command\BaseCommand; |
23 | 23 | use Composer\InstalledVersions; |
24 | | -use Symfony\Component\Console\Input\ArgvInput; |
25 | 24 | use Symfony\Component\Console\Input\ArrayInput; |
26 | 25 | use Symfony\Component\Console\Input\InputInterface; |
27 | 26 | use Symfony\Component\Console\Output\OutputInterface; |
@@ -62,18 +61,16 @@ protected function runProcess(Process $command, OutputInterface $output): int |
62 | 61 | if (Process::isTtySupported()) { |
63 | 62 | $command->setTty(true); |
64 | 63 | } else { |
65 | | - $output->writeln('<comment>Warning: TTY is not supported. The command may not display output as expected.</comment>'); |
| 64 | + $output->writeln( |
| 65 | + '<comment>Warning: TTY is not supported. The command may not display output as expected.</comment>' |
| 66 | + ); |
66 | 67 |
|
67 | | - $callback = function (string $type, string $buffer) use ($output) { |
| 68 | + $callback = function (string $type, string $buffer) use ($output): void { |
68 | 69 | $output->write($buffer); |
69 | 70 | }; |
70 | 71 | } |
71 | 72 |
|
72 | | - $process = $processHelper->run( |
73 | | - output: $output, |
74 | | - cmd: $command, |
75 | | - callback: $callback |
76 | | - ); |
| 73 | + $process = $processHelper->run(output: $output, cmd: $command, callback: $callback); |
77 | 74 |
|
78 | 75 | if (! $process->isSuccessful()) { |
79 | 76 | $output->writeln(\sprintf( |
@@ -142,6 +139,7 @@ protected function runCommand(string $commandName, array|InputInterface $input, |
142 | 139 | $application = $this->getApplication(); |
143 | 140 |
|
144 | 141 | $command = $application->find($commandName); |
| 142 | + $command->ignoreValidationErrors(); |
145 | 143 |
|
146 | 144 | if (\is_array($input)) { |
147 | 145 | $input = new ArrayInput($input); |
|
0 commit comments