Toolkit

ComponentCheckCommands extends AbstractCommands
in package

Command class for toolkit:component-check.

Tags
SuppressWarnings

(PHPMD.ExcessiveClassComplexity)

SuppressWarnings

(PHPMD.ExcessiveClassLength)

Table of Contents

Properties

$abandonedFailed  : bool
$composerFailed  : bool
$composerLock  : array<string|int, mixed>
$composerOutdated  : array<string|int, mixed>
$configurationFailed  : bool
$devCompRequireFailed  : bool
$disabledConfigReadonly  : bool
$evaluationFailed  : bool
$forcedUpdateModule  : bool
$insecureFailed  : bool
$insecureNpmFailed  : bool
$io  : mixed
$mandatoryFailed  : bool
$optsYml  : array<string|int, mixed>
$outdatedFailed  : bool
$outdatedNpmFailed  : bool
$packageReviews  : array<string|int, mixed>
$recommendedFailed  : bool
$recommendedFailedCount  : int
$skipAbandoned  : bool
$skipInsecure  : bool
$skipInsecureNpm  : bool
$skipOutdated  : bool
$skipOutdatedNpm  : bool
$skipRecommended  : bool
$skipUnsupported  : bool
$unsupportedFailed  : bool

Methods

componentAbandoned()  : mixed
Check abandoned components.
componentCheck()  : mixed
Check composer for components that are not whitelisted/blacklisted.
componentComposer()  : mixed
Check composer packages.
componentConfiguration()  : mixed
Check project configuration.
componentDevelopment()  : mixed
Check development components.
componentEvaluation()  : mixed
Check Evaluation components.
componentInsecure()  : mixed
Check insecure components.
componentMandatory()  : mixed
Check mandatory components.
componentNpmInsecure()  : mixed
Run NPM Insecure.
componentNpmOutdated()  : mixed
Run NPM Outdated.
componentOutdated()  : mixed
Check outdated components.
componentRecommended()  : mixed
Check recommended components.
componentUnsupported()  : mixed
Check unsupported components.
getConfigurationFile()  : mixed
Path to YAML configuration file containing command defaults.
getJson()  : array<string|int, mixed>
Returns the JSON parsed content.
getWorkingDir()  : string
Returns the current working directory.
isWebsiteInstalled()  : bool
Check if the website is installed.
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.
isSimulating()  : bool
Check if current command is being executed with option simulate.
prepareSkips()  : void
Prepare the overrides from config and commit message.
printComponentResults()  : mixed
Print the component check results.
taskExecute()  : mixed
Execute a command.
taskProcess()  : mixed
Process the file.
taskReplaceBlock()  : mixed
Replace block in a file.
validateComponent()  : mixed
Helper function to validate the component.
validateEnvironmentVariables()  : mixed
Component Configuration Helper - Validate environment variables.
disableConfigReadOnly()  : mixed
Ensure that config_readonly is not active by commenting the config line.
getFailedOrPassed()  : string
If given bool is TRUE 'failed' is return, otherwise 'passed'.
getOptsYml()  : array<string|int, mixed>
Returns the .opts.yml content.
getProjectProfile()  : string
Load given project from website and return the profile in the production env.
getRecommendedWarningMessage()  : string
Returns the recommended components warning message.
getReleases()  : array<string|int, mixed>
Returns the modules releases.
loadComposerLock()  : bool
Loads the composer lock packages.
loadComposerOutdated()  : bool
Loads the composer outdated results.
loadWebsitePackages()  : bool
Loads the packages from the website.
restoreConfigReadOnly()  : mixed
Restore the comment added to the config_readonly setting.
testPackages()  : array<string|int, mixed>
Returns a list of packages to test.

Properties

Methods

componentAbandoned()

Check abandoned components.

public componentAbandoned(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:abandoned

componentCheck()

Check composer for components that are not whitelisted/blacklisted.

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

toolkit:component-check

option

endpoint The endpoint to use to connect to QA Website.

option

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

SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

SuppressWarnings

(PHPMD.ExcessiveMethodLength)

componentComposer()

Check composer packages.

public componentComposer(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:composer

SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

SuppressWarnings

(PHPMD.ExcessiveMethodLength)

componentConfiguration()

Check project configuration.

public componentConfiguration(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:configuration

componentDevelopment()

Check development components.

public componentDevelopment(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:development

componentEvaluation()

Check Evaluation components.

public componentEvaluation(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:evaluation

SuppressWarnings

(PHPMD.CyclomaticComplexity)

componentInsecure()

Check insecure components.

public componentInsecure(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:insecure

SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

componentMandatory()

Check mandatory components.

public componentMandatory(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:mandatory

SuppressWarnings

(PHPMD.CyclomaticComplexity)

componentNpmInsecure()

Run NPM Insecure.

public componentNpmInsecure() : mixed
Tags
command

check:npm-insecure

componentNpmOutdated()

Run NPM Outdated.

public componentNpmOutdated() : mixed
Tags
command

check:npm-outdated

SuppressWarnings

(PHPMD.CyclomaticComplexity)

componentOutdated()

Check outdated components.

public componentOutdated(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:outdated

SuppressWarnings

(PHPMD.CyclomaticComplexity)

componentRecommended()

Check recommended components.

public componentRecommended(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:recommended

componentUnsupported()

Check unsupported components.

public componentUnsupported(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
command

check:unsupported

getConfigurationFile()

Path to YAML configuration file containing command defaults.

public getConfigurationFile() : mixed

Command classes should implement this method.

getJson()

Returns the JSON parsed content.

public getJson(string $filename[, mixed $throwException = true ]) : array<string|int, mixed>
Parameters
$filename : string
$throwException : mixed = true
Return values
array<string|int, mixed>

getWorkingDir()

Returns the current working directory.

public getWorkingDir() : string
Return values
string

The current working directory.

isWebsiteInstalled()

Check if the website is installed.

public isWebsiteInstalled() : bool
Return values
bool

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

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.

isSimulating()

Check if current command is being executed with option simulate.

protected isSimulating() : bool
Return values
bool

True if using --simulate, false otherwise.

prepareSkips()

Prepare the overrides from config and commit message.

protected prepareSkips() : void

printComponentResults()

Print the component check results.

protected printComponentResults(ConsoleIO $io) : mixed
Parameters
$io : ConsoleIO
Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

taskExecute()

Execute a command.

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

An array with tasks to execute.

taskProcess()

Process the file.

protected taskProcess(string $source[, string $destination = '' ]) : mixed
Parameters
$source : string

The source file to process.

$destination : string = ''

The destination file.

taskReplaceBlock()

Replace block in a file.

protected taskReplaceBlock([string $filename = '' ]) : mixed
Parameters
$filename : string = ''

The file to process.

validateComponent()

Helper function to validate the component.

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

The package to validate.

Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

validateEnvironmentVariables()

Component Configuration Helper - Validate environment variables.

protected validateEnvironmentVariables() : mixed
Tags
SuppressWarnings

(PHPMD.CyclomaticComplexity)

SuppressWarnings

(PHPMD.NPathComplexity)

disableConfigReadOnly()

Ensure that config_readonly is not active by commenting the config line.

private disableConfigReadOnly() : 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

getOptsYml()

Returns the .opts.yml content.

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

getProjectProfile()

Load given project from website and return the profile in the production env.

private getProjectProfile(string $projectId) : string
Parameters
$projectId : string

The project to use in the endpoint.

Return values
string

getRecommendedWarningMessage()

Returns the recommended components warning message.

private getRecommendedWarningMessage() : string
Return values
string

getReleases()

Returns the modules releases.

private getReleases() : array<string|int, mixed>

If the update module is not enabled, it will be enabled, and later disabled.

Return values
array<string|int, mixed>

loadComposerLock()

Loads the composer lock packages.

private loadComposerLock() : bool
Return values
bool

loadComposerOutdated()

Loads the composer outdated results.

private loadComposerOutdated() : bool
Return values
bool

loadWebsitePackages()

Loads the packages from the website.

private loadWebsitePackages() : bool
Return values
bool

restoreConfigReadOnly()

Restore the comment added to the config_readonly setting.

private restoreConfigReadOnly() : mixed

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.


        
On this page

Search results