Bånder

DevServerCommand extends Command
in package

Table of Contents

Constants

ARTISAN_PATH  = '/var/www/html/artisan'
COLORS  = [ 'octane' => "\x1b[34m", // Blue 'queue' => "\x1b[32m", // Green 'scheduler' => "\x1b[33m", // Yellow 'monitor' => "\x1b[35m", // Magenta 'default' => "\x1b[37m", ]
PHP_ARGS  = '-d variables_order=EGPCS'
PHP_PATH  = '/usr/local/bin/php'
RESET  = "\x1b[0m"
WATCH_PATHS  = ['/var/www/html/app', '/var/www/html/config', '/var/www/html/routes']

Properties

$description  : mixed
$signature  : mixed
$fileWatcher  : FileWatcher|null
$monitoringEnabled  : bool
$monitoringInterval  : int
$processes  : array<string|int, mixed>
$processStats  : array<string|int, mixed>
$queueRestartScheduled  : bool
$running  : bool

Methods

handle()  : int
handleSignal()  : false|int
Symfony Command's signal handler - matches parent signature
pcntlSignalHandler()  : void
Handle PCNTL signals - this is called by pcntl_signal
checkForFileChanges()  : bool
checkQueueMemoryWarnings()  : void
createOctaneProcess()  : Process
createProcess()  : Process
createQueueProcess()  : Process
createSchedulerProcess()  : Process
createSchedulerScript()  : string
displayColoredOutput()  : void
displayProcessOutput()  : void
displayProcessStats()  : void
getProcessStats()  : array<string|int, mixed>|null
gracefullyRestartQueueProcess()  : void
handleWithoutFileWatching()  : int
initializeFileWatcher()  : void
monitorProcesses()  : void
Monitor processes for output and status, handle signals and cleanup zombies
monitorProcessesWithOutput()  : void
performDetailedMonitoring()  : void
restartProcess()  : void
scheduleQueueRestart()  : void
startAllProcesses()  : void
stopAllProcesses()  : void
stopServer()  : int

Constants

COLORS

private mixed COLORS = [ 'octane' => "\x1b[34m", // Blue 'queue' => "\x1b[32m", // Green 'scheduler' => "\x1b[33m", // Yellow 'monitor' => "\x1b[35m", // Magenta 'default' => "\x1b[37m", ]

WATCH_PATHS

private mixed WATCH_PATHS = ['/var/www/html/app', '/var/www/html/config', '/var/www/html/routes']

Properties

$description

protected mixed $description = 'Start development server with Octane, queue worker, and scheduler'

$signature

protected mixed $signature = 'dev:server {--stop : Stop the development server} {--monitor : Enable detailed process monitoring}'

Methods

handleSignal()

Symfony Command's signal handler - matches parent signature

public handleSignal(int $signal[, int|false $previousExitCode = 0 ]) : false|int
Parameters
$signal : int
$previousExitCode : int|false = 0
Return values
false|int

pcntlSignalHandler()

Handle PCNTL signals - this is called by pcntl_signal

public pcntlSignalHandler(int $signal[, mixed $signalInfo = null ]) : void
Parameters
$signal : int
$signalInfo : mixed = null

checkForFileChanges()

private checkForFileChanges() : bool
Return values
bool

checkQueueMemoryWarnings()

private checkQueueMemoryWarnings(array<string|int, mixed> $stats) : void
Parameters
$stats : array<string|int, mixed>

createOctaneProcess()

private createOctaneProcess() : Process
Return values
Process

createProcess()

private createProcess(array<string|int, mixed> $command) : Process
Parameters
$command : array<string|int, mixed>
Return values
Process

createQueueProcess()

private createQueueProcess() : Process
Return values
Process

createSchedulerProcess()

private createSchedulerProcess() : Process
Return values
Process

createSchedulerScript()

private createSchedulerScript() : string
Return values
string

displayColoredOutput()

private displayColoredOutput(string $name, string $output[, bool $isError = false ]) : void
Parameters
$name : string
$output : string
$isError : bool = false

displayProcessOutput()

private displayProcessOutput(string $name, Process $process) : void
Parameters
$name : string
$process : Process

displayProcessStats()

private displayProcessStats(string $name, array<string|int, mixed> $stats) : void
Parameters
$name : string
$stats : array<string|int, mixed>

getProcessStats()

private getProcessStats(int $pid) : array<string|int, mixed>|null
Parameters
$pid : int
Return values
array<string|int, mixed>|null

gracefullyRestartQueueProcess()

private gracefullyRestartQueueProcess() : void

handleWithoutFileWatching()

private handleWithoutFileWatching() : int
Return values
int

monitorProcesses()

Monitor processes for output and status, handle signals and cleanup zombies

private monitorProcesses() : void

monitorProcessesWithOutput()

private monitorProcessesWithOutput() : void

restartProcess()

private restartProcess(string $name) : void
Parameters
$name : string

        
On this page

Search results