You are here

function composer_manager_sa_print in Composer Manager 7

Same name and namespace in other branches
  1. 7.2 composer_manager_sa/composer_manager_sa.drush.inc \composer_manager_sa_print()

Print security advisories with Drush.

2 calls to composer_manager_sa_print()
composer_manager_sa_composer_dependencies_install in composer_manager_sa/composer_manager_sa.module
Implements hook_composer_dependencies_install().
drush_composer_manager_sa_check in composer_manager_sa/composer_manager_sa.drush.inc
Command callback to check for security advisories.

File

composer_manager_sa/composer_manager_sa.drush.inc, line 33
Drush command callbacks.

Code

function composer_manager_sa_print() {
  if (!($lock_file = composer_manager_lock_file())) {
    drupal_set_message(t('The composer.lock file is missing or not readable. Skipping security advisory checks.'), 'warning');
    return;
  }
  $output = composer_manager_sa_check($lock_file);

  // This hook is only called from the context of a Drush command.
  drush_print($output
    ->fetch());
}