Skip to content

Commit 5185871

Browse files
committed
Fix input class
Signed-off-by: Felipe Sayão Lobato Abreu <github@mentordosnerds.com>
1 parent e9e23f3 commit 5185871

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/Command/AbstractCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
use Composer\Command\BaseCommand;
2323
use Composer\InstalledVersions;
2424
use Symfony\Component\Console\Input\ArgvInput;
25+
use Symfony\Component\Console\Input\ArrayInput;
2526
use Symfony\Component\Console\Input\InputInterface;
2627
use Symfony\Component\Console\Output\OutputInterface;
2728
use Symfony\Component\Filesystem\Filesystem;
@@ -143,7 +144,7 @@ protected function runCommand(string $commandName, array|InputInterface $input,
143144
$command = $application->find($commandName);
144145

145146
if (\is_array($input)) {
146-
$input = new ArgvInput($input);
147+
$input = new ArrayInput($input);
147148
}
148149

149150
return $command->run($input, $output);

src/Command/ReportsCommand.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
5353
$coveragePath = $this->getAbsolutePath('public/coverage');
5454

5555
$output->writeln('<info>Generating API documentation on path: ' . $docsPath . '</info>');
56-
$this->runCommand('docs', ['target' => $docsPath], $output);
56+
$this->runCommand('docs', ['--target' => $docsPath], $output);
5757

5858
$output->writeln('<info>Generating test coverage report on path: ' . $coveragePath . '</info>');
59-
$this->runCommand('tests', ['coverage' => $coveragePath], $output);
59+
$this->runCommand('tests', ['--coverage' => $coveragePath], $output);
6060

6161
$this->generateFrontpage();
6262

0 commit comments

Comments
 (0)