Toolkit

ComponentCheckCommands extends AbstractCommands
in package

Class AbstractCommands.

Table of Contents

$commandFailed  : bool
$devCompRequireFailed  : bool
$devVersionFailed  : bool
$drushRequireFailed  : bool
$insecureFailed  : bool
$mandatoryFailed  : bool
$outdatedFailed  : bool
$recommendedFailed  : bool
$recommendedFailedCount  : int
$skipInsecure  : bool
$skipOutdated  : bool
$skipRecommended  : bool
componentCheck()  : mixed
Check composer.json for components that are not whitelisted/blacklisted.
getConfigurationFile()  : string
Path to YAML configuration file containing command defaults.
getWorkingDir()  : string
Returns the current working directory.
initializeRuntimeConfiguration()  : mixed
Command initialization.
componentInsecure()  : mixed
Helper function to check component's review information.
componentMandatory()  : mixed
Helper function to check component's review information.
componentOutdated()  : mixed
Helper function to check component's review information.
componentRecommended()  : mixed
Helper function to check component's review information.
getBin()  : string
Validate and return the path to given bin.
getBinPath()  : string
Return the path to given bin.
getConfigValue()  : mixed
{@inheritdoc}
getNodeBin()  : string
Validate and return the path to given bin from node packages.
getNodeBinPath()  : string
Return the path to given bin from node packages.
getPackageDetails()  : array<string|int, mixed>|int
Call release history of d.org to confirm security alert.
isSimulating()  : bool
Check if current command is being executed with option simulate.
printComponentResults()  : mixed
Print the component check results.
taskExecute()  : mixed
Execute a command.
taskProcess()  : Process|CollectionBuilder
Process the file.
taskReplaceBlock()  : ReplaceBlock|CollectionBuilder
Replace block in a file.
validateComponent()  : mixed
Helper function to validate the component.
getFailedOrPassed()  : string
If given bool is TRUE 'failed' is return, otherwise 'passed'.
getRecommendedWarningMessage()  : string
Returns the recommended components warning message.
testPackages()  : array<string|int, mixed>
Returns a list of packages to test.

Properties

Methods

componentCheck()

Check composer.json for components that are not whitelisted/blacklisted.

public componentCheck(ConsoleIO $io[, array<string|int, mixed> $options = ['endpoint' => InputOption::VALUE_OPTIONAL, 'test-command' => false] ]) : mixed
Parameters
$io : ConsoleIO
$options : array<string|int, mixed> = ['endpoint' => InputOption::VALUE_OPTIONAL, 'test-command' => false]
Tags
command

toolkit:component-check

option

endpoint (Deprecated) Specify an endpoint to use.

option

test-command If set the command will load test packages.

SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

SuppressWarnings

(PHPMD.ExcessiveMethodLength)

Return values
mixed

getConfigurationFile()

Path to YAML configuration file containing command defaults.

public getConfigurationFile() : string

Command classes should implement this method.

Return values
string

getWorkingDir()

Returns the current working directory.

public getWorkingDir() : string
Return values
string

The current working directory.

initializeRuntimeConfiguration()

Command initialization.

public initializeRuntimeConfiguration() : mixed
Tags
hook

pre-command-event *

Return values
mixed

componentInsecure()

Helper function to check component's review information.

protected componentInsecure(array<string|int, mixed> $modules) : mixed
Parameters
$modules : array<string|int, mixed>

The modules list.

Tags
throws
TaskException
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
mixed

componentMandatory()

Helper function to check component's review information.

protected componentMandatory(array<string|int, mixed> $modules) : mixed
Parameters
$modules : array<string|int, mixed>

The modules list.

Tags
throws
TaskException
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
mixed

componentOutdated()

Helper function to check component's review information.

protected componentOutdated() : mixed
Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
mixed

componentRecommended()

Helper function to check component's review information.

protected componentRecommended(array<string|int, mixed> $modules, array<string|int, mixed> $packages) : mixed
Parameters
$modules : array<string|int, mixed>

The modules list.

$packages : array<string|int, mixed>

The packages to validate.

Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
mixed

getBin()

Validate and return the path to given bin.

protected getBin(string $name) : string
Parameters
$name : string

The bin to look for.

Tags
throws
TaskException
Return values
string

The bin path.

getBinPath()

Return the path to given bin.

protected getBinPath(string $name) : string
Parameters
$name : string
Return values
string

The path to given binary.

getConfigValue()

{@inheritdoc}

protected getConfigValue(mixed $key[, mixed $default = null ]) : mixed
Parameters
$key : mixed
$default : mixed = null
Return values
mixed

getNodeBin()

Validate and return the path to given bin from node packages.

protected getNodeBin(string $name) : string
Parameters
$name : string

The bin to look for.

Tags
throws
TaskException
Return values
string

The bin path.

getNodeBinPath()

Return the path to given bin from node packages.

protected getNodeBinPath(string $name) : string
Parameters
$name : string
Return values
string

The path to given binary.

getPackageDetails()

Call release history of d.org to confirm security alert.

protected getPackageDetails(string $package, string $version, string $core) : array<string|int, mixed>|int
Parameters
$package : string

The package to check.

$version : string

The version to check.

$core : string

The package core version.

Return values
array<string|int, mixed>|int

Array with package info from d.org, 1 if no release history found.

isSimulating()

Check if current command is being executed with option simulate.

protected isSimulating() : bool
Return values
bool

True if using --simulate, false otherwise.

printComponentResults()

Print the component check results.

protected printComponentResults(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Return values
mixed

taskExecute()

Execute a command.

protected taskExecute(array<string|int, mixed> $tasks) : mixed
Parameters
$tasks : array<string|int, mixed>

An array with tasks to execute.

Return values
mixed

taskProcess()

Process the file.

protected taskProcess(string $source[, string $destination = '' ]) : Process|CollectionBuilder
Parameters
$source : string

The source file to process.

$destination : string = ''

The destination file.

Return values
Process|CollectionBuilder

taskReplaceBlock()

Replace block in a file.

protected taskReplaceBlock([string $filename = '' ]) : ReplaceBlock|CollectionBuilder
Parameters
$filename : string = ''

The file to process.

Return values
ReplaceBlock|CollectionBuilder

validateComponent()

Helper function to validate the component.

protected validateComponent(array<string|int, mixed> $package, array<string|int, mixed> $modules) : mixed
Parameters
$package : array<string|int, mixed>

The package to validate.

$modules : array<string|int, mixed>

The modules list.

Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

Return values
mixed

getFailedOrPassed()

If given bool is TRUE 'failed' is return, otherwise 'passed'.

private getFailedOrPassed(bool $value) : string
Parameters
$value : bool

The value to check.

Return values
string

getRecommendedWarningMessage()

Returns the recommended components warning message.

private getRecommendedWarningMessage() : string
Return values
string

testPackages()

Returns a list of packages to test.

private testPackages() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array with packages to test.

Search results