scaffold example


  public function runScaffold($cwd) {
    chdir($cwd);
    $handler = new Handler($this->getComposer()$this->io());
    $handler->scaffold();
    return $this->getOutput();
  }

  /** * Runs a `composer` command. * * @param string $cmd * The Composer command to execute (escaped as required) * @param string $cwd * The current working directory to run the command from. * * @return string * Standard output and standard error from the command. */
PluginEvents::COMMAND => 'onCommand',
    ];
  }

  /** * Post command event callback. * * @param \Composer\Script\Event $event * The Composer event. */
  public function postCmd(Event $event) {
    $this->handler()->scaffold();
  }

  /** * Post package event behavior. * * @param \Composer\Installer\PackageEvent $event * Composer package event sent on install/update/remove. */
  public function postPackage(PackageEvent $event) {
    $this->handler()->onPostPackageEvent($event);
  }

  
EOT
            );

  }

  /** * {@inheritdoc} */
  protected function execute(InputInterface $input, OutputInterface $output): int {
    $handler = new Handler($this->getComposer()$this->getIO());
    $handler->scaffold();
    return 0;
  }

}
Home | Imprint | This part of the site doesn't use cookies.