class SecurityUpdateCommands extends DrushCommands (View source)

Check Drupal Composer packages for security updates.

Traits

ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

RowsOfFields
security()

Check Drupal Composer packages for pending security updates.

suggestComposerCommand($updates)

Emit suggested Composer command for security updates.

mixed
fetchAdvisoryComposerJson()

Fetches the generated composer.json from drupal-security-advisories.

array
loadSiteComposerLock()

Loads the contents of the local Drupal application's composer.lock file.

array
calculateSecurityUpdates(array $composer_lock_data, array $security_advisories_composer_json)

Return available security updates.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

RowsOfFields security()

Check Drupal Composer packages for pending security updates.

This uses the Drupal security advisories package to determine if updates are available.

Return Value

RowsOfFields

Exceptions

Exception

See also

https://github.com/drupal-composer/drupal-security-advisories

suggestComposerCommand($updates)

Emit suggested Composer command for security updates.

Parameters

$updates

protected mixed fetchAdvisoryComposerJson()

Fetches the generated composer.json from drupal-security-advisories.

Return Value

mixed

Exceptions

Exception

protected array loadSiteComposerLock()

Loads the contents of the local Drupal application's composer.lock file.

Return Value

array

Exceptions

Exception

protected array calculateSecurityUpdates(array $composer_lock_data, array $security_advisories_composer_json)

Return available security updates.

Parameters

array $composer_lock_data The contents of the local Drupal application's composer.lock file.
array $security_advisories_composer_json The composer.json array from drupal-security-advisories.

Return Value

array