File tree 2 files changed +13
-4
lines changed
2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -222,10 +222,15 @@ protected function getSchemaDefinition() {
222
222
$ id = $ this ->getPluginId ();
223
223
$ definition = $ this ->getPluginDefinition ();
224
224
$ module = $ this ->moduleHandler ->getModule ($ definition ['provider ' ]);
225
- $ file = "{$ module ->getPath ()}/graphql/ {$ id }.graphqls " ;
225
+ $ path = 'graphql/ ' . $ id . '.graphqls ' ;
226
+ $ file = $ module ->getPath () . '/ ' . $ path ;
226
227
227
228
if (!file_exists ($ file )) {
228
- throw new InvalidPluginDefinitionException (sprintf ("Missing schema definition file at %s. " , $ file ));
229
+ throw new InvalidPluginDefinitionException (
230
+ $ id ,
231
+ sprintf (
232
+ 'The module "%s" needs to have a schema definition "%s" in its folder for "%s" to be valid. ' ,
233
+ $ module ->getName (), $ path , $ definition ['class ' ]));
229
234
}
230
235
231
236
return file_get_contents ($ file ) ?: NULL ;
Original file line number Diff line number Diff line change @@ -89,10 +89,14 @@ protected function loadDefinitionFile($type) {
89
89
$ id = $ this ->getPluginId ();
90
90
$ definition = $ this ->getPluginDefinition ();
91
91
$ module = $ this ->moduleHandler ->getModule ($ definition ['provider ' ]);
92
- $ file = "{$ module ->getPath ()}/graphql/ {$ id }. {$ type }.graphqls " ;
92
+ $ path = 'graphql/ ' . $ id . '. ' . $ type . '.graphqls ' ;
93
+ $ file = $ module ->getPath () . '/ ' . $ path ;
93
94
94
95
if (!file_exists ($ file )) {
95
- throw new InvalidPluginDefinitionException (sprintf ("Missing schema definition file at %s. " , $ file ));
96
+ throw new InvalidPluginDefinitionException (
97
+ $ id ,
98
+ sprintf ('The module "%s" needs to have a schema definition "%s" in its folder for "%s" to be valid. ' ,
99
+ $ module ->getName (), $ path , $ definition ['class ' ]));
96
100
}
97
101
98
102
return file_get_contents ($ file ) ?: NULL ;
You can’t perform that action at this time.
0 commit comments