SelfUpdateCommand

Class
extends Command
Final: Yes

Updates the installed DevTools package through Composer.

Attributes
#[AsCommand]
$name : 'dev-tools:self-update'
$description : 'Updates the installed fast-forward/dev-tools package.'
$aliases : ['self-update', 'selfupdate']

Table of Contents

Properties

Methods

 : mixed
getCommandNames()

Returns the command name and aliases declared through AsCommand.

 : array<int, string>
configure()

Configures the self-update command.

 : void
execute()

Executes the Composer update flow.

 : int
failure()

Logs a failed command result and returns the failure exit code.

 : int
log()

Logs a non-terminal command message unless structured JSON output is active.

 : void
success()

Logs a successful command result and returns the success exit code.

 : int
Properties
Methods

getCommandNames()

Public Static

Returns the command name and aliases declared through AsCommand.

public static getCommandNames() : array<int, string>
Return values
array<int, string>

configure()

Protected

Configures the self-update command.

protected configure() : void

execute()

Protected

Executes the Composer update flow.

protected execute(InputInterface  $input, OutputInterface  $output) : int
Parameters
$input : InputInterface

Description

the command input

$output : OutputInterface

Description

the command output

Return values
int

Description

the command status code

failure()

Private

Logs a failed command result and returns the failure exit code.

private failure( string  $message, InputInterface  $input[, array<string, mixed>  $context = []][, string|null  $file = null][, int|null  $line = null]) : int
Parameters
$message : string

Description

the failure message

$input : InputInterface

Description

the originating command input

$context : array<string, mixed> = []

Description

optional extra log context

$file : string|null = null

Description

the related file path when known

$line : int|null = null

Description

the related line when known

Return values
int

log()

Private

Logs a non-terminal command message unless structured JSON output is active.

private log( string  $message, InputInterface  $input[, array<string, mixed>  $context = []][, string  $logLevel = LogLevel::INFO]) : void
Parameters
$message : string

Description

the progress message

$input : InputInterface

Description

the originating command input

$context : array<string, mixed> = []

Description

optional extra log context

$logLevel : string = LogLevel::INFO

Description

the PSR-3 log level used for the message

success()

Private

Logs a successful command result and returns the success exit code.

private success( string  $message, InputInterface  $input[, array<string, mixed>  $context = []][, string  $logLevel = LogLevel::INFO]) : int
Parameters
$message : string

Description

the success message

$input : InputInterface

Description

the originating command input

$context : array<string, mixed> = []

Description

optional extra log context

$logLevel : string = LogLevel::INFO

Description

the PSR-3 log level used for the successful result

Return values
int