diff --git a/src/Adapter/Docker/Satellite.php b/src/Adapter/Docker/Satellite.php index f551d427..9ae97a02 100644 --- a/src/Adapter/Docker/Satellite.php +++ b/src/Adapter/Docker/Satellite.php @@ -73,7 +73,7 @@ public function build( $command = ['docker', 'build', '--rm', '-', ...iterator_to_array($iterator($this->imageTags))]; $process = new Process( - implode (' ', array_map(fn ($part) => escapeshellarg($part), $command)), + implode (' ', array_map(fn ($part) => escapeshellarg((string) $part), $command)), $this->workdir, ); diff --git a/src/Runtime/Pipeline/Configuration.php b/src/Runtime/Pipeline/Configuration.php index a3086eeb..efb317fd 100644 --- a/src/Runtime/Pipeline/Configuration.php +++ b/src/Runtime/Pipeline/Configuration.php @@ -49,12 +49,12 @@ public function getStepsTreeBuilder(): TreeBuilder ->isRequired() ->fixXmlConfig('step') ->validate() - ->ifTrue(fn ($value) => 1 <= array_reduce( - array_keys($this->plugins), - fn (int $count, string $plugin) => \array_key_exists($plugin, $value) ? $count + 1 : $count, - 0 - )) - ->thenInvalid(sprintf('You should only specify one plugin between %s.', implode('", "', array_map(fn (string $plugin) => sprintf('"%s"', $plugin), array_keys($this->plugins))))) + ->ifTrue(fn ($value) => 1 <= array_reduce( + array_keys($this->plugins), + fn (int $count, string $plugin) => \array_key_exists($plugin, $value) ? $count + 1 : $count, + 0 + )) + ->thenInvalid(sprintf('You should only specify one plugin between %s.', implode('", "', array_map(fn (string $plugin) => sprintf('"%s"', $plugin), array_keys($this->plugins))))) ->end() ; @@ -80,7 +80,9 @@ public function getConfigTreeBuilder(): TreeBuilder ->scalarPrototype()->end() ->end() ->scalarNode('name')->end() - ->scalarNode('code')->end() + ->scalarNode('code') + ->isRequired() + ->end() ->append($this->getStepsTreeBuilder()->getRootNode()) ->end() ; @@ -95,7 +97,9 @@ private function applyPlugins(ArrayNodeDefinition $node): self $node ->children() ->scalarNode('name')->end() - ->scalarNode('code')->end() + ->scalarNode('code') + ->isRequired() + ->end() ->end() ->append($plugin->getConfigTreeBuilder()->getRootNode()) ; @@ -110,7 +114,9 @@ private function applyFeatures(ArrayNodeDefinition $node): self /* @phpstan-ignore-next-line */ $node->children() ->scalarNode('name')->end() - ->scalarNode('code')->end() + ->scalarNode('code') + ->isRequired() + ->end() ->end() ->append($feature->getConfigTreeBuilder()->getRootNode()) ; diff --git a/src/Runtime/Workflow/Action/Configuration.php b/src/Runtime/Workflow/Action/Configuration.php index 0b11a899..4d5602e7 100644 --- a/src/Runtime/Workflow/Action/Configuration.php +++ b/src/Runtime/Workflow/Action/Configuration.php @@ -26,7 +26,14 @@ public function getConfigTreeBuilder(): TreeBuilder $builder = new TreeBuilder('action'); /** @var ArrayNodeDefinition $node */ - $node = $builder->getRootNode(); + $node = $builder->getRootNode() + ->children() + ->scalarNode('name')->end() + ->scalarNode('code') + ->isRequired() + ->end() + ->end() + ; foreach ($this->actions as $action) { $node->append($action->getConfigTreeBuilder()->getRootNode());