DevTools

Class
extends Application
Final: Yes

Wraps the fast-forward console tooling suite conceptually as an isolated application instance.

Description

Extending the base application, it MUST provide default command injections safely.

Table of Contents

Constants

 = 'FAST_FORWARD_AUTO_UPDATE'
 = <<<'LOGO' ____ _____ _ | _ \ _____ _|_ _|__ ___ | |___ | | | |/ _ \ \ / / | |/ _ \ / _ \| / __| | |_| | __/\ V / | | (_) | (_) | \__ \ |____/ \___| \_/ |_|\___/ \___/|_|___/ ======================================== LOGO
RAW_OUTPUT_COMMANDS

Commands that require raw output and therefore must not render the logo.

 = ['changelog:next-version', 'changelog:show']

Properties

Methods

__construct()

Initializes the DevTools global context and dependency graph.

 : mixed
doRun()

Runs the application after applying global runtime options.

 : int
getDefaultInputDefinition()

Returns the application-level input definition with DevTools runtime options.

 : InputDefinition
configureWorkspaceDirectory()

Applies the configured workspace directory before resolving command defaults.

 : void
getWorkingDirectoryOption()

Resolves the raw working-directory option before command parsing.

 : string|null
isRawOutputCommand()

Checks whether the current command is designed for raw output mode.

 : bool
isSelfUpdateCommand()

Detects whether the current invocation targets the self-update command.

 : bool
isTruthyAutoUpdateMode()

Interprets environment values that enable auto-update.

 : bool
runAutoUpdateWhenRequested()

Runs an explicit automatic update without letting failures block the requested command.

 : void
shouldRenderLogo()

Determines whether the startup logo should be rendered for this invocation.

 : bool
Constants

Constants

ENV_AUTO_UPDATE

Public
public string ENV_AUTO_UPDATE = 'FAST_FORWARD_AUTO_UPDATE'
Private
private string LOGO = <<<'LOGO' ____ _____ _ | _ \ _____ _|_ _|__ ___ | |___ | | | |/ _ \ \ / / | |/ _ \ / _ \| / __| | |_| | __/\ V / | | (_) | (_) | \__ \ |____/ \___| \_/ |_|\___/ \___/|_|___/ ======================================== LOGO

RAW_OUTPUT_COMMANDS

Private

Commands that require raw output and therefore must not render the logo.

private array<string|int, mixed> RAW_OUTPUT_COMMANDS = ['changelog:next-version', 'changelog:show']
Properties
Methods

__construct()

Public

Initializes the DevTools global context and dependency graph.

public __construct(CommandLoaderInterface  $commandLoader, WorkingDirectorySwitcherInterface  $workingDirectorySwitcher, VersionCheckNotifierInterface  $versionCheckNotifier, SelfUpdateRunnerInterface  $selfUpdateRunner, SelfUpdateScopeResolverInterface  $selfUpdateScopeResolver, VersionCheckerInterface  $versionChecker, EnvironmentInterface  $environment, RuntimeEnvironmentInterface  $runtimeEnvironment) : mixed

Description

The method MUST define default configurations and MAY accept an explicit command provider. It SHALL instruct the runner to treat the standards command generically as its default endpoint.

Parameters
$commandLoader : CommandLoaderInterface

Description

the command loader responsible for providing command instances

$workingDirectorySwitcher : WorkingDirectorySwitcherInterface

Description

switches the process working directory

$versionCheckNotifier : VersionCheckNotifierInterface

Description

emits non-blocking version freshness warnings

$selfUpdateRunner : SelfUpdateRunnerInterface

Description

runs explicit or automatic self-update flows

$selfUpdateScopeResolver : SelfUpdateScopeResolverInterface

Description

resolves whether the active binary is global

$versionChecker : VersionCheckerInterface

Description

resolves the installed DevTools version for metadata output

$environment : EnvironmentInterface

Description

reads environment flags for optional auto-update behavior

$runtimeEnvironment : RuntimeEnvironmentInterface

Description

resolves runtime environment capabilities

doRun()

Public

Runs the application after applying global runtime options.

public doRun(InputInterface  $input, OutputInterface  $output) : int
Parameters
$input : InputInterface

Description

the application input

$output : OutputInterface

Description

the application output

Attributes
#[Override]
Return values
int

Description

the application status code

getDefaultInputDefinition()

Protected

Returns the application-level input definition with DevTools runtime options.

protected getDefaultInputDefinition() : InputDefinition
Attributes
#[Override]
Return values
InputDefinition

Description

the global application input definition

configureWorkspaceDirectory()

Private

Applies the configured workspace directory before resolving command defaults.

private configureWorkspaceDirectory(InputInterface  $input) : void
Parameters
$input : InputInterface

Description

the application input

getWorkingDirectoryOption()

Private

Resolves the raw working-directory option before command parsing.

private getWorkingDirectoryOption(InputInterface  $input) : string|null
Parameters
$input : InputInterface

Description

the application input

Return values
string|null

isRawOutputCommand()

Private

Checks whether the current command is designed for raw output mode.

private isRawOutputCommand(InputInterface  $input) : bool
Parameters
$input : InputInterface

Description

the application input

Return values
bool

isSelfUpdateCommand()

Private

Detects whether the current invocation targets the self-update command.

private isSelfUpdateCommand(InputInterface  $input) : bool
Parameters
$input : InputInterface

Description

the application input

Return values
bool

isTruthyAutoUpdateMode()

Private

Interprets environment values that enable auto-update.

private isTruthyAutoUpdateMode( string|null  $mode) : bool
Parameters
$mode : string|null

Description

the FAST_FORWARD_AUTO_UPDATE value

Return values
bool

runAutoUpdateWhenRequested()

Private

Runs an explicit automatic update without letting failures block the requested command.

private runAutoUpdateWhenRequested(InputInterface  $input, OutputInterface  $output) : void
Parameters
$input : InputInterface

Description

the application input

$output : OutputInterface

Description

the application output

Private

Determines whether the startup logo should be rendered for this invocation.

private shouldRenderLogo(InputInterface  $input) : bool
Parameters
$input : InputInterface

Description

the application input

Return values
bool