@@ -50,15 +50,15 @@ public function loadPluginConfiguration(): void
5050
5151 if ($ config ->definitions === []) {
5252 $ schemaBuilder
53- ->addSetup ('addDefinition ' , [new BaseDefinition ( )])
53+ ->addSetup ('addDefinition ' , [new Statement (BaseDefinition::class )])
5454 ->addSetup ('addDefinition ' , [$ coreDefinition ]);
5555 foreach ($ config ->files as $ file ) {
5656 if (str_ends_with ($ file , '.neon ' )) {
57- $ schemaBuilder ->addSetup ('addDefinition ' , [new NeonDefinition ( $ file )]);
57+ $ schemaBuilder ->addSetup ('addDefinition ' , [new Statement (NeonDefinition::class, [ $ file] )]);
5858 } elseif (str_ends_with ($ file , '.yaml ' ) || str_ends_with ($ file , '.yml ' )) {
59- $ schemaBuilder ->addSetup ('addDefinition ' , [new YamlDefinition ( $ file )]);
59+ $ schemaBuilder ->addSetup ('addDefinition ' , [new Statement (YamlDefinition::class, [ $ file] )]);
6060 } elseif (str_ends_with ($ file , '.json ' )) {
61- $ schemaBuilder ->addSetup ('addDefinition ' , [new JsonDefinition ( $ file )]);
61+ $ schemaBuilder ->addSetup ('addDefinition ' , [new Statement (JsonDefinition::class, [ $ file] )]);
6262 } else {
6363 throw new InvalidArgumentException (sprintf (
6464 'We cant parse file "%s" - unsupported file type ' ,
@@ -67,7 +67,7 @@ public function loadPluginConfiguration(): void
6767 }
6868 }
6969
70- $ schemaBuilder ->addSetup ('addDefinition ' , [new ArrayDefinition ( $ config ->definition )]);
70+ $ schemaBuilder ->addSetup ('addDefinition ' , [new Statement (ArrayDefinition::class, [ $ config ->definition ] )]);
7171 } else {
7272 foreach ($ config ->definitions as $ definitionName => $ definitionConfig ) {
7373 $ definitionDef = $ builder ->addDefinition ($ this ->prefix ('definition. ' . $ definitionName ))
0 commit comments