Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ScriptAliasCommand.php

function ScriptAliasCommand::execute

Overrides Command::execute

File

vendor/composer/composer/src/Composer/Command/ScriptAliasCommand.php, line 76

Class

ScriptAliasCommand
@author Jordi Boggiano <j.boggiano@seld.be>

Namespace

Composer\Command

Code

protected function execute(InputInterface $input, OutputInterface $output) : int {
    $composer = $this->requireComposer();
    $args = $input->getArguments();
    // TODO remove for Symfony 6+ as it is then in the interface
    if (!method_exists($input, '__toString')) {
        // @phpstan-ignore-line
        throw new \LogicException('Expected an Input instance that is stringable, got ' . get_class($input));
    }
    return $composer->getEventDispatcher()
        ->dispatchScript($this->script, $input->getOption('dev') || !$input->getOption('no-dev'), $args['args'], [
        'script-alias-input' => Preg::replace('{^\\S+ ?}', '', $input->__toString(), 1),
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal