Skip to content

Commit

Permalink
Hotfix for new changes of the Process Symfony class
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Shevchuk committed Jul 14, 2021
1 parent 8058590 commit 9298aae
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/Command/MagicCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ protected function configure()
* @param OutputInterface $output
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->callForContribute();
return 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Command/RunCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ protected function configure()
*
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
if ($input->getOption('debug')) {
error_reporting(E_ALL);
Expand Down
6 changes: 2 additions & 4 deletions src/Command/Server/StartCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,20 @@ protected function configure()
* @param OutputInterface $output
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->info('Running "server:start" command ... [' . $input->getOption('env') . ']');

$host = $input->getOption('host');
$port = $input->getOption('port');
$env = $input->getOption('env');

$publicDir = $this->getApplication()->getWorkingPath() . DS . 'public';

// setup BLUZ_ENV to environment
// enable BLUZ_DEBUG
// use public/routing.php
$process = Process::fromShellCommandline(
"export BLUZ_ENV=$env && export BLUZ_DEBUG=1 && export BLUZ_LOG=1 && php -S $host:$port routing.php",
$publicDir
$this->getApplication()->getWorkingPath() . DS . 'public'
);

$this->write("Server has been started at <info>$host:$port</info>");
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Server/StatusCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function configure()
* @param OutputInterface $output
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->info('Running "server:status" command');
try {
Expand Down
2 changes: 1 addition & 1 deletion src/Command/Server/StopCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ protected function configure()
* @param OutputInterface $output
* @return int
*/
protected function execute(InputInterface $input, OutputInterface $output)
protected function execute(InputInterface $input, OutputInterface $output): int
{
$this->info('Running "server:stop" command');

Expand Down

0 comments on commit 9298aae

Please sign in to comment.