From 91daa23c5fcece201d84a0fc9aa7469ddec2084a Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Fri, 22 Jun 2018 20:45:21 +0700 Subject: [PATCH] Add one more breaking change in 0.12 (cherry picked from commit 300b580) --- UPGRADE.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 55c3f0f..8d8e219 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -10,6 +10,23 @@ Exception inside `parseLiteral()`, `parseValue()` and `serialize()`. Returning null from any of these methods will now be treated as valid result. +### Breaking: Custom scalar types parseLiteral() declaration changed +A new parameter was added to `parseLiteral()`, which also needs to be added to any custom scalar type extending from `ScalarType` + +Before: +```php +public function parseLiteral($valueNode) { + //custom implementation +} +``` + +After: +```php +public function parseLiteral($valueNode, array $variables = null) { + //custom implementation +} +``` + ### Breaking: Descriptions in comments are not used as descriptions by default anymore Descriptions now need to be inside Strings or BlockStrings in order to be picked up as description. If you want to keep the old behaviour you can supply the option `commentDescriptions`