From 6cb1f30123850bf9e2557d719ca8a3d265d15217 Mon Sep 17 00:00:00 2001 From: Ed Lomonaco Date: Fri, 27 Sep 2024 11:03:03 -0400 Subject: [PATCH] Fixed host argument to use the getHost() function (#957) * fix-host-option: Fixed host argument to use the getHost() function from the inhirited trait. * fix-host-option: Added fix for the roadrunn er command as well. --- src/Commands/StartFrankenPhpCommand.php | 4 ++-- src/Commands/StartRoadRunnerCommand.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/StartFrankenPhpCommand.php b/src/Commands/StartFrankenPhpCommand.php index c4f100ce4..9eab4eb92 100644 --- a/src/Commands/StartFrankenPhpCommand.php +++ b/src/Commands/StartFrankenPhpCommand.php @@ -28,7 +28,7 @@ class StartFrankenPhpCommand extends Command implements SignalableCommandInterfa {--host=127.0.0.1 : The IP address the server should bind to} {--port= : The port the server should be available on} {--admin-host=localhost : The host the admin server should be available on} - {--admin-port= : The port the admin server should be available on} + {--admin-port=2019 : The port the admin server should be available on} {--workers=auto : The number of workers that should be available to handle requests} {--max-requests=500 : The number of requests to process before reloading the server} {--caddyfile= : The path to the FrankenPHP Caddyfile file} @@ -76,7 +76,7 @@ public function handle(ServerProcessInspector $inspector, ServerStateFile $serve $this->forgetEnvironmentVariables(); - $host = $this->option('host'); + $host = $this->getHost(); $port = $this->getPort(); $https = $this->option('https'); diff --git a/src/Commands/StartRoadRunnerCommand.php b/src/Commands/StartRoadRunnerCommand.php index ea71f47ad..8f7567904 100644 --- a/src/Commands/StartRoadRunnerCommand.php +++ b/src/Commands/StartRoadRunnerCommand.php @@ -82,7 +82,7 @@ public function handle(ServerProcessInspector $inspector, ServerStateFile $serve $roadRunnerBinary, '-c', $this->configPath(), '-o', 'version=3', - '-o', 'http.address='.$this->option('host').':'.$this->getPort(), + '-o', 'http.address='.$this->getHost().':'.$this->getPort(), '-o', 'server.command='.(new PhpExecutableFinder)->find().','.base_path(config('octane.roadrunner.command', 'vendor/bin/roadrunner-worker')), '-o', 'http.pool.num_workers='.$this->workerCount(), '-o', 'http.pool.max_jobs='.$this->option('max-requests'),