From 692fde2ca1c0fd8095a8f4fff01ca59ce290ade4 Mon Sep 17 00:00:00 2001 From: Dave Pagini Date: Wed, 9 May 2018 11:25:11 -0400 Subject: [PATCH] Run simplesaml config command on all composer calls. --- src/Robo/Commands/Saml/SimpleSamlPhpCommand.php | 11 +++++++++++ src/Robo/Commands/Setup/BuildCommand.php | 4 ---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/Robo/Commands/Saml/SimpleSamlPhpCommand.php b/src/Robo/Commands/Saml/SimpleSamlPhpCommand.php index 1ebc224ed..f048386a3 100644 --- a/src/Robo/Commands/Saml/SimpleSamlPhpCommand.php +++ b/src/Robo/Commands/Saml/SimpleSamlPhpCommand.php @@ -193,6 +193,17 @@ public function simpleSamlPhpBuildConfig() { } } + /** + * Ensures SimpleSamlPhp enabled repos have config copied on composer runs. + * + * @hook post-command source:build:composer + */ + public function postComposerHook() { + if ($this->getConfig()->has('simplesamlphp') && $this->getConfigValue('simplesamlphp')) { + $this->invokeCommand('source:build:simplesamlphp-config'); + } + } + /** * Outputs a message to edit the new config files. */ diff --git a/src/Robo/Commands/Setup/BuildCommand.php b/src/Robo/Commands/Setup/BuildCommand.php index cec6dd14f..bee72cac3 100644 --- a/src/Robo/Commands/Setup/BuildCommand.php +++ b/src/Robo/Commands/Setup/BuildCommand.php @@ -90,10 +90,6 @@ public function build() { 'source:build:frontend', ]); - if ($this->getConfig()->has('simplesamlphp') && $this->getConfigValue('simplesamlphp')) { - $this->invokeCommand('source:build:simplesamlphp-config'); - } - $this->invokeHook("post-setup-build"); }