Updates the installed DevTools package through Composer.
'dev-tools:self-update'
'Updates the installed fast-forward/dev-tools package.'
['self-update', 'selfupdate']
Properties
Methods
Returns the command name and aliases declared through AsCommand.
Configures the self-update command.
Executes the Composer update flow.
Logs a failed command result and returns the failure exit code.
Logs a non-terminal command message unless structured JSON output is active.
Logs a successful command result and returns the success exit code.
private
SelfUpdateScopeResolverInterface
$scopeResolver
private
SelfUpdateRunnerInterface
$selfUpdateRunner
public
__construct(SelfUpdateRunnerInterface
$selfUpdateRunner, SelfUpdateScopeResolverInterface
$scopeResolver) : mixed
Parameters
Description
the runner that executes Composer's update command
Description
resolves whether the active binary is globally installed
Returns the command name and aliases declared through AsCommand.
public
static
getCommandNames() : array<int, string>
Return values
Configures the self-update command.
protected
configure() : void
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
Description
the command status code
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
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
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