Orchestrates dependency analysis across the supported Composer analyzers.
Description
This command MUST report missing, unused, and misplaced dependencies using a single, deterministic report that is friendly for local development and CI runs.
'dependencies'
'Analyzes missing, unused, misplaced, and outdated Composer dependencies.'
['deps']
'This command runs composer-dependency-analyser and Jack to report missing, unused, misplaced, and outdated Composer dependencies.'
Interfaces
Defines the logger contract consumed by reusable command result helpers.
Constants
Properties
Methods
Adds the standard JSON output options to the current command.
Configures the dependency workflow options.
Executes the dependency analysis workflow.
Determines whether JSON output was requested.
Determines whether pretty JSON output was requested.
Logs a failed command result and returns the failure exit code.
Builds the Composer Dependency Analyser process.
Builds the Composer Normalize process.
Builds the Composer update process.
Builds the Jack breakpoint process.
Builds the Jack open-versions process.
Builds the Jack raise-to-installed process.
Logs an informational command message at notice level.
Resolves the maximum outdated dependency threshold.
Determines whether Jack outdated failures SHOULD be ignored for the given threshold.
Logs a successful command result and returns the success exit code.
private
FileLocatorInterface
$fileLocator
private
LoggerInterface
$logger
private
ProcessBuilderInterface
$processBuilder
private
ProcessQueueInterface
$processQueue
public
__construct(ProcessBuilderInterface
$processBuilder, ProcessQueueInterface
$processQueue, FileLocatorInterface
$fileLocator, LoggerInterface
$logger) : mixed
Parameters
Description
creates analyzer and upgrade processes
Description
executes queued processes
$fileLocator
:
FileLocatorInterface
Description
resolves the dependency analyser configuration
$logger
:
LoggerInterface
Description
writes command feedback
Adds the standard JSON output options to the current command.
protected
addJsonOption() : static
Return values
Configures the dependency workflow options.
protected
configure() : void
Executes the dependency analysis workflow.
protected
execute(InputInterface
$input, OutputInterface
$output) : int
Parameters
$input
:
InputInterface
Description
the runtime command input
$output
:
OutputInterface
Description
the console output stream
Return values
Description
the command execution status code
Determines whether JSON output was requested.
protected
isJsonOutput(InputInterface
$input) : bool
Description
The pretty-json flag SHALL imply JSON output.
Parameters
$input
:
InputInterface
Return values
Determines whether pretty JSON output was requested.
protected
isPrettyJsonOutput(InputInterface
$input) : bool
Parameters
$input
:
InputInterface
Return values
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
Builds the Composer Dependency Analyser process.
private
getComposerDependencyAnalyserCommand(InputInterface
$input) : Process
Parameters
$input
:
InputInterface
Description
the runtime command input
Return values
Description
the configured Composer Dependency Analyser process
Builds the Composer Normalize process.
private
getComposerNormalizeCommand() : Process
Return values
Description
the configured Composer Normalize process
Builds the Composer update process.
private
getComposerUpdateCommand() : Process
Return values
Description
the configured Composer update process
Builds the Jack breakpoint process.
private
getJackBreakpointCommand(InputInterface
$input,
int
$maximumOutdated) : Process
Parameters
$input
:
InputInterface
Description
the runtime command input
$maximumOutdated
:
int
Description
the maximum number of outdated packages accepted by Jack
Return values
Description
the configured Jack breakpoint process
Builds the Jack open-versions process.
private
getOpenVersionsCommand(InputInterface
$input) : Process
Parameters
$input
:
InputInterface
Description
the runtime command input
Return values
Description
the configured Jack open-versions process
Builds the Jack raise-to-installed process.
private
getRaiseToInstalledCommand(InputInterface
$input) : Process
Parameters
$input
:
InputInterface
Description
the runtime command input
Return values
Description
the configured Jack raise-to-installed process
Logs an informational command message at notice level.
private
notice(
string
$message, InputInterface
$input[,
array<string, mixed>
$context = []]) : void
Parameters
$message
:
string
Description
the notice message
$input
:
InputInterface
Description
the originating command input
$context
:
array<string, mixed>
=
[]
Description
optional extra log context
Resolves the maximum outdated dependency threshold.
private
resolveMaximumOutdated(InputInterface
$input) : int
Parameters
$input
:
InputInterface
Description
the runtime command input
Return values
Description
the validated maximum number of outdated packages
Determines whether Jack outdated failures SHOULD be ignored for the given threshold.
private
shouldIgnoreOutdatedFailures(
int
$maximumOutdated) : bool
Parameters
$maximumOutdated
:
int
Description
the validated outdated threshold option
Return values
Description
true when the outdated threshold is explicitly disabled
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