From 6508ad8e4bfeafc49e5a077b5464b930a2078c4c Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen.haas@lakedrops.com> Date: Fri, 25 Dec 2020 21:09:45 +0100 Subject: [PATCH] docker/l3d#58 Move project settings out of composer.json --- BaseHandler.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/BaseHandler.php b/BaseHandler.php index 102aa60..9a2ee41 100644 --- a/BaseHandler.php +++ b/BaseHandler.php @@ -34,7 +34,7 @@ abstract class BaseHandler implements BaseHandlerInterface { * * @var \LakeDrops\Component\Composer\Config */ - protected $config; + public $config; /** * @var \Symfony\Component\Console\Input\InputInterface @@ -71,9 +71,17 @@ abstract class BaseHandler implements BaseHandlerInterface { public function __construct(Composer $composer, IOInterface $io) { $this->composer = $composer; $this->io = $io; - $this->env = new Dotenv('docker4drupal', $this->io); - $this->config = new Config($this->configId(), $this->configDefault(), $this->env); - $this->postInit(); + } + + /** + * Initialize configuration. + */ + protected function init(): void { + if ($this->config === NULL) { + $this->env = new Dotenv($this->configId(), $this->io); + $this->config = new Config($this->configId(), $this->configDefault(), $this->env); + $this->postInit(); + } } /** -- GitLab