Skip to content

Commit

Permalink
Merge branch '6.x' into 7.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 0b5c62e + 18ad4d3 commit e39d411
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 @@ -208,7 +208,7 @@ protected function startServer(): void
{
$this->guardServerStarting();

$this->process = Process::fromShellCommandline(
$this->process = new Process(
command: $this->prepareCommand(),
cwd: "{$this->basePath()}/public",
env: array_merge(defined_environment_variables(), [
Expand Down Expand Up @@ -249,18 +249,18 @@ protected function guardServerStarting()
/**
* Prepare the command for starting the PHP server.
*
* @return string
* @return array
*/
protected function prepareCommand(): string
protected function prepareCommand(): array
{

Check failure on line 255 in src/DuskServer.php

View workflow job for this annotation

GitHub Actions / PHP:8.1 on ubuntu-latest

Call to method pass() on an unknown class Spatie\RayBundle\Ray.

Check failure on line 255 in src/DuskServer.php

View workflow job for this annotation

GitHub Actions / PHP:8.1 on ubuntu-latest

Call to method pass() on an unknown class Spatie\WordPressRay\Ray.

Check failure on line 255 in src/DuskServer.php

View workflow job for this annotation

GitHub Actions / PHP:8.1 on ubuntu-latest

Call to method pass() on an unknown class Spatie\YiiRay\Ray.
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(__DIR__.'/server.php'),
ProcessUtils::escapeArgument("{$this->basePath()}/public")
);
return ray()->pass(array_filter([
(string) (new PhpExecutableFinder())->find(false),
'-S',
sprintf('%s:%s', $this->host, $this->port),
__DIR__.'/server.php',
'-t',
sprintf('%s', ProcessUtils::escapeArgument("{$this->basePath()}/public")),
]));
}

/**
Expand Down

0 comments on commit e39d411

Please sign in to comment.