File tree Expand file tree Collapse file tree 4 files changed +8
-4
lines changed
Expand file tree Collapse file tree 4 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ protected function getRootDefinition(TreeBuilder $treeBuilder): ArrayNodeDefinit
171171 ->end ()
172172 ->end ()
173173 ->children ()
174- ->arrayNode ('backend ' )
174+ ->arrayNode ('backend ' )-> ignoreExtraKeys ( true )
175175 ->children ()
176176 ->scalarNode ('size ' )->end ()
177177 ->scalarNode ('containerSize ' )->end ()
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ protected function getRootDefinition(TreeBuilder $treeBuilder): ArrayNodeDefinit
6868 ->end ()
6969 ->end ()
7070 ->end ()
71- ->arrayNode ('backend ' )->ignoreExtraKeys (false )
71+ ->arrayNode ('backend ' )->ignoreExtraKeys (true )
7272 ->children ()
7373 ->scalarNode ('type ' )->end ()
7474 ->scalarNode ('containerType ' )->end ()
Original file line number Diff line number Diff line change @@ -74,6 +74,7 @@ public function testValidJobFull(): void
7474 'type ' => 'large ' ,
7575 'containerType ' => 'small ' ,
7676 'context ' => 'wml ' ,
77+ 'backendExtraKey ' => 'ignored ' ,
7778 ],
7879 'metrics ' => [
7980 'storage ' => [
@@ -92,6 +93,7 @@ public function testValidJobFull(): void
9293 'runnerId ' => $ runnerId ,
9394 ];
9495 unset($ data ['extraKey ' ]);
96+ unset($ data ['backend ' ]['backendExtraKey ' ]);
9597 unset($ data ['metrics ' ]['storage ' ]['storageExtraKey ' ]);
9698 unset($ data ['metrics ' ]['backend ' ]['backendExtraKey ' ]);
9799 $ definition = new FullJobDefinition ();
Original file line number Diff line number Diff line change @@ -61,12 +61,14 @@ public function testValidJobFull(string $mode): void
6161 'type ' => 'my ' ,
6262 'containerType ' => 'his ' ,
6363 'context ' => 'wml ' ,
64- 'foo ' => 'bar ' ,
64+ 'extraKey ' => 'ignored ' ,
6565 ],
6666 'orchestrationJobId ' => '123456789 ' ,
6767 ];
6868 $ definition = new NewJobDefinition ();
69- self ::assertSame ($ data , $ definition ->processData ($ data ));
69+ $ result = $ definition ->processData ($ data );
70+ unset($ data ['backend ' ]['extraKey ' ]);
71+ self ::assertSame ($ data , $ result );
7072 }
7173
7274 public function invalidJobProvider (): array
You can’t perform that action at this time.
0 commit comments