Skip to content

Commit

Permalink
Merge branch '7.x' into 8.x
Browse files Browse the repository at this point in the history
Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone committed Jun 27, 2024
2 parents 263404c + e39d411 commit eb8d673
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/DuskServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ protected function startServer(): void
{
$this->guardServerStarting();

$this->process = Process::fromShellCommandline(
$this->process = new Process(
command: $this->prepareCommand(),
cwd: join_paths($this->basePath(), 'public'),
env: array_merge(defined_environment_variables(), [
Expand Down Expand Up @@ -251,18 +251,18 @@ protected function guardServerStarting()
/**
* Prepare the command for starting the PHP server.
*
* @return string
* @return array
*/
protected function prepareCommand(): string
protected function prepareCommand(): array
{
return sprintf(
((OperatingSystem::onWindows() ? '' : 'exec ').'%s -S %s:%s %s -t %s'),
ProcessUtils::escapeArgument((string) (new PhpExecutableFinder())->find(false)),
$this->host,
$this->port,
ProcessUtils::escapeArgument(join_paths(__DIR__, 'server.php')),
ProcessUtils::escapeArgument(join_paths($this->basePath(), 'public'))
);
return [
(string) (new PhpExecutableFinder())->find(false),
'-S',
sprintf('%s:%s', $this->host, $this->port),
join_paths(__DIR__, 'server.php'),
'-t',
sprintf('%s', ProcessUtils::escapeArgument(join_paths($this->basePath(), 'public'))),
];
}

/**
Expand Down

0 comments on commit eb8d673

Please sign in to comment.