final class RemoteCommand

internal  
 

Executes a command in a subprocess using the testbench CLI.

Methods

__construct(string $workingPath, array|string $env = [], bool|null $tty = null)

Create a new remote command instance.

handle(string $commander, Closure|array|string $command)

Execute the command.

Details

at line 28
__construct(string $workingPath, array|string $env = [], bool|null $tty = null)

Create a new remote command instance.

Parameters

string $workingPath

The working directory for the command

array|string $env

Environment variables or APP_ENV value

bool|null $tty

Whether to enable TTY mode

at line 41
ProcessDecorator handle(string $commander, Closure|array|string $command)

Execute the command.

Parameters

string $commander

The testbench binary path

Closure|array|string $command

The command(s) to run

Return Value

ProcessDecorator