Skip to content
Snippets Groups Projects
Commit fab42fe1 authored by jurgenhaas's avatar jurgenhaas
Browse files

Call the Drupal scaffold callback for create project events only

parent 848a0554
No related branches found
Tags v1.6.4
No related merge requests found
......@@ -50,13 +50,29 @@ class Plugin extends BasePlugin {
*/
public static function getSubscribedEvents(): array {
return [
ScriptEvents::POST_CREATE_PROJECT_CMD => 'prepareProject',
ScriptEvents::POST_CREATE_PROJECT_CMD => 'createProject',
ScriptEvents::POST_UPDATE_CMD => 'prepareProject',
];
}
/**
* Post create and update project event callback.
* Post create project event callback.
*
* @param \Composer\Script\Event $event
* The event that triggered the plugin.
*
* @throws \Twig_Error_Loader
* @throws \Twig_Error_Runtime
* @throws \Twig_Error_Syntax
*/
public function createProject(Event $event) {
$this->scaffoldHandler->downloadScaffold();
$this->scaffoldHandler->generateAutoload();
$this->prepareProject($event);
}
/**
* Post update project event callback.
*
* @param \Composer\Script\Event $event
* The event that triggered the plugin.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment