Skip to content
This repository has been archived by the owner on Mar 13, 2022. It is now read-only.

Commit

Permalink
Return 0 in console commands
Browse files Browse the repository at this point in the history
Per symfony/symfony#33747, required for
Symfony 5.0 upgrade.
  • Loading branch information
mikeyclarke committed Dec 6, 2019
1 parent 0564a57 commit 3195265
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/php/Command/DumpCombinedEnvConfigCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function configure()
$this->addArgument('env', InputArgument::REQUIRED, 'Name of the environment, e.g. “prod”, “stag”');
}

public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$path = dirname(__DIR__) . '/../../.env';
$env = $input->getArgument('env');
Expand All @@ -39,6 +39,8 @@ public function execute(InputInterface $input, OutputInterface $output)
EOF;

file_put_contents($path . '.local.php', $vars, LOCK_EX);

return 0;
}

private function loadEnvVars(string $path, string $env): array
Expand Down
6 changes: 4 additions & 2 deletions src/php/Command/GenerateVhostsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ protected function configure()
);
}

public function execute(InputInterface $input, OutputInterface $output)
public function execute(InputInterface $input, OutputInterface $output): int
{
$outputDir = $input->getArgument('path-to-vhosts');
if (!is_string($outputDir)) {
return null;
return 0;
}
$repositoryRoot = realpath(__DIR__ . '/../../../');

Expand All @@ -100,5 +100,7 @@ public function execute(InputInterface $input, OutputInterface $output)
$output->writeln('ALL DONE!');
$output->writeln('✅ Vhosts generated and placed in ' . realpath($outputDir));
$output->writeln('🐘 Don’t forget to reload nginx!');

return 0;
}
}

0 comments on commit 3195265

Please sign in to comment.