DevTools
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.
Constants
Commands that require raw output and therefore must not render the logo.
Properties
Methods
Initializes the DevTools global context and dependency graph.
Runs the application after applying global runtime options.
Returns the application-level input definition with DevTools runtime options.
Applies the configured workspace directory before resolving command defaults.
Resolves the raw working-directory option before command parsing.
Checks whether the current command is designed for raw output mode.
Detects whether the current invocation targets the self-update command.
Interprets environment values that enable auto-update.
Runs an explicit automatic update without letting failures block the requested command.
Determines whether the startup logo should be rendered for this invocation.
public
string
ENV_AUTO_UPDATE
=
'FAST_FORWARD_AUTO_UPDATE'
private
string
LOGO
=
<<<'LOGO'
____ _____ _
| _ \ _____ _|_ _|__ ___ | |___
| | | |/ _ \ \ / / | |/ _ \ / _ \| / __|
| |_| | __/\ V / | | (_) | (_) | \__ \
|____/ \___| \_/ |_|\___/ \___/|_|___/
========================================
LOGO
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']
private
EnvironmentInterface
$environment
private
RuntimeEnvironmentInterface
$runtimeEnvironment
private
SelfUpdateRunnerInterface
$selfUpdateRunner
private
SelfUpdateScopeResolverInterface
$selfUpdateScopeResolver
private
VersionCheckerInterface
$versionChecker
private
VersionCheckNotifierInterface
$versionCheckNotifier
private
WorkingDirectorySwitcherInterface
$workingDirectorySwitcher
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
Description
switches the process working directory
Description
emits non-blocking version freshness warnings
Description
runs explicit or automatic self-update flows
Description
resolves whether the active binary is global
Description
resolves the installed DevTools version for metadata output
Description
reads environment flags for optional auto-update behavior
Description
resolves runtime environment capabilities
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
Return values
Description
the application status code
Returns the application-level input definition with DevTools runtime options.
protected
getDefaultInputDefinition() : InputDefinition
Return values
Description
the global application input definition
Applies the configured workspace directory before resolving command defaults.
private
configureWorkspaceDirectory(InputInterface
$input) : void
Parameters
$input
:
InputInterface
Description
the application input
Resolves the raw working-directory option before command parsing.
private
getWorkingDirectoryOption(InputInterface
$input) : string|null
Parameters
$input
:
InputInterface
Description
the application input
Return values
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
Detects whether the current invocation targets the self-update command.
private
isSelfUpdateCommand(InputInterface
$input) : bool
Parameters
$input
:
InputInterface
Description
the application input
Return values
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
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
Determines whether the startup logo should be rendered for this invocation.
private
shouldRenderLogo(InputInterface
$input) : bool
Parameters
$input
:
InputInterface
Description
the application input