summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Pugh2017-10-18 14:07:38 (GMT)
committerJon Pugh2017-10-18 14:07:38 (GMT)
commitbc1255f3d7471432d86c01e82caceee9d1779a46 (patch)
treed0d7823aaf61ea40ef6051dc615d295d40ab5a5d
parentc17bbb1719e7136695d724107435468ae9d9cfa4 (diff)
Once we know what service the user wants, save it to the context file.
-rw-r--r--src/Command/ServicesCommand.php4
-rw-r--r--src/Context/ServerContext.php2
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Command/ServicesCommand.php b/src/Command/ServicesCommand.php
index 86950ac..9afd19e 100644
--- a/src/Command/ServicesCommand.php
+++ b/src/Command/ServicesCommand.php
@@ -126,6 +126,10 @@ class ServicesCommand extends Command
$this->io->info("Adding $service service $service_type...");
+ $this->context->config['services'][$service] = [
+ 'type' => $service_type,
+ ];
+ $this->context->save();
}
}
diff --git a/src/Context/ServerContext.php b/src/Context/ServerContext.php
index 4574361..a679b44 100644
--- a/src/Context/ServerContext.php
+++ b/src/Context/ServerContext.php
@@ -155,7 +155,7 @@ class ServerContext extends Context implements ConfigurationInterface
->arrayNode('services')
->prototype('array')
->children()
- ->scalarNode('name')
+ ->scalarNode('type')
->isRequired(true)
->end()
->end()