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

Fix ahoy scaffold command

Prepare project also when updated, not only when created
parent 1f5a908a
Branches
Tags v1.6.4
No related merge requests found
...@@ -10,5 +10,5 @@ commands: ...@@ -10,5 +10,5 @@ commands:
cmd: export $(cat .env | xargs) && docker pull registry.lakedrops.com/docker/l3d:php-${PHP_VERSION} cmd: export $(cat .env | xargs) && docker pull registry.lakedrops.com/docker/l3d:php-${PHP_VERSION}
usage: Update image with the latest development tools usage: Update image with the latest development tools
scaffold: scaffold:
cmd: ahoy dev exec composer lakedrops:scaffold cmd: composer lakedrops:scaffold
usage: (Re-)Configure this project for developers usage: (Re-)Configure this project for developers
...@@ -50,12 +50,13 @@ class Plugin extends BasePlugin { ...@@ -50,12 +50,13 @@ class Plugin extends BasePlugin {
*/ */
public static function getSubscribedEvents(): array { public static function getSubscribedEvents(): array {
return [ return [
ScriptEvents::POST_CREATE_PROJECT_CMD => 'postCreateProject', ScriptEvents::POST_CREATE_PROJECT_CMD => 'prepareProject',
ScriptEvents::POST_UPDATE_CMD => 'prepareProject',
]; ];
} }
/** /**
* Post create project event callback. * Post create and update project event callback.
* *
* @param \Composer\Script\Event $event * @param \Composer\Script\Event $event
* The event that triggered the plugin. * The event that triggered the plugin.
...@@ -64,7 +65,7 @@ class Plugin extends BasePlugin { ...@@ -64,7 +65,7 @@ class Plugin extends BasePlugin {
* @throws \Twig_Error_Runtime * @throws \Twig_Error_Runtime
* @throws \Twig_Error_Syntax * @throws \Twig_Error_Syntax
*/ */
public function postCreateProject(Event $event) { public function prepareProject(Event $event) {
/** @var Handler $handler */ /** @var Handler $handler */
$handler = $this->handler; $handler = $this->handler;
$handler $handler
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment