mirror of
https://github.com/retailcrm/graphql-php.git
synced 2025-02-16 20:33:14 +03:00
fix: add missing semicolon in generated cache file
The `require $cacheFilename` statement leads to a PHP error due to a missing semicolon in the generated cache file.
This commit is contained in:
parent
11d32d4568
commit
179944495e
@ -81,7 +81,7 @@ $cacheFilename = 'cached_schema.php';
|
|||||||
|
|
||||||
if (!file_exists($cacheFilename)) {
|
if (!file_exists($cacheFilename)) {
|
||||||
$document = Parser::parse(file_get_contents('./schema.graphql'));
|
$document = Parser::parse(file_get_contents('./schema.graphql'));
|
||||||
file_put_contents($cacheFilename, "<?php\nreturn " . var_export(AST::toArray($document), true));
|
file_put_contents($cacheFilename, "<?php\nreturn " . var_export(AST::toArray($document), true) . ";\n");
|
||||||
} else {
|
} else {
|
||||||
$document = AST::fromArray(require $cacheFilename); // fromArray() is a lazy operation as well
|
$document = AST::fromArray(require $cacheFilename); // fromArray() is a lazy operation as well
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user