KMP PHP API Reference

PlatformNightlyMigrationDrillCommand extends Command
in package

Runs a non-destructive nightly migration drill for staging/canary tenants.

Table of Contents

Constants

ENABLE_ENV  : mixed = 'KMP_ENABLE_NIGHTLY_MIGRATION_DRILL'
JOB_TYPE  : mixed = 'nightly_migration_drill'
PLATFORM_CONNECTION  : mixed = 'platform'

Methods

defaultName()  : string
execute()  : int
buildOptionParser()  : ConsoleOptionParser
drillTenant()  : bool
Run status and dry-run probes for a tenant.
runTenantCommand()  : int
assertExecutionAllowed()  : void
Fail closed unless both the command flag and environment gate are present.
assertReleaseCompatibility()  : void
assertSelector()  : void
Validate that exactly one target selector was supplied.
baseParameters()  : array<string, mixed>
finishJob()  : void
insertJob()  : void
Insert the aggregate drill job before checks begin.
now()  : DateTime
Return the current UTC timestamp.
platform()  : Connection
Get the platform metadata connection.
resolveTenants()  : array<int, TenantMetadata>
resultParameters()  : array<string, mixed>
scrubError()  : string
Remove secret-like values from command errors before storing them.

Constants

Methods

buildOptionParser()

protected buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
$parser : ConsoleOptionParser
Tags
inheritDoc
Return values
ConsoleOptionParser

runTenantCommand()

protected runTenantCommand(array<int, string> $commandArgs, ConsoleIo $io) : int
Parameters
$commandArgs : array<int, string>
$io : ConsoleIo
Return values
int

assertExecutionAllowed()

Fail closed unless both the command flag and environment gate are present.

private assertExecutionAllowed(Arguments $args) : void
Parameters
$args : Arguments

finishJob()

private finishJob(string $jobId, string $status, array<string, mixed> $parameters[, string|null $lastError = null ]) : void
Parameters
$jobId : string
$status : string
$parameters : array<string, mixed>
$lastError : string|null = null

insertJob()

Insert the aggregate drill job before checks begin.

private insertJob(string $jobId, Arguments $args) : void
Parameters
$jobId : string
$args : Arguments

resultParameters()

private resultParameters(Arguments $args, array<int, TenantMetadata$tenants, string $manifestVersion, int $completed, int $failed) : array<string, mixed>
Parameters
$args : Arguments
$tenants : array<int, TenantMetadata>
$manifestVersion : string
$completed : int
$failed : int
Return values
array<string, mixed>

scrubError()

Remove secret-like values from command errors before storing them.

private scrubError(string $message) : string
Parameters
$message : string
Return values
string
On this page

Search results