diff --git a/src/Component/Serializer/Parser/JMSCore/Type/Parser.php b/src/Component/Serializer/Parser/JMSCore/Type/Parser.php index 4ad29f137..700530c96 100644 --- a/src/Component/Serializer/Parser/JMSCore/Type/Parser.php +++ b/src/Component/Serializer/Parser/JMSCore/Type/Parser.php @@ -77,10 +77,18 @@ private function visit(bool $fetchingParam = false) $this->lexer->moveNext(); while (true) { - if (is_array($this->lexer->token)) { - $this->token = Token::fromArray($this->lexer->token); + // Doctrine Lexer 1.x uses arrays; newer versions use token objects. + /** @var array|object|null $token */ + $token = $this->lexer->token; + + if (null === $token) { + throw new SyntaxError('Syntax error, unexpected end of stream'); + } + + if (is_array($token)) { + $this->token = Token::fromArray($token); } else { - $this->token = Token::fromObject($this->lexer->token); + $this->token = Token::fromObject($token); } if ("" === $this->token->value) { diff --git a/src/Model/Entity/Loyalty/Loyalty.php b/src/Model/Entity/Loyalty/Loyalty.php index 08f7ddbfe..b81d0c67b 100644 --- a/src/Model/Entity/Loyalty/Loyalty.php +++ b/src/Model/Entity/Loyalty/Loyalty.php @@ -110,6 +110,14 @@ class Loyalty */ public $confirmSmsRegistration; + /** + * @var bool + * + * @JMS\Type("bool") + * @JMS\SerializedName("promoChargeAllowed") + */ + public $promoChargeAllowed; + /** * @var int *