From fde0904ce95fa14ff944f71cedc2fb2eaf566d3d Mon Sep 17 00:00:00 2001 From: Dominique Feyer Date: Thu, 4 Mar 2021 10:38:08 +0100 Subject: [PATCH] Update to Neos 7.0 --- Classes/Types/InputTypes/NodeIdentifierOrPath.php | 8 ++++---- Classes/Types/InputTypes/NodeType.php | 8 ++++---- Classes/Types/Scalars/AbsoluteNodePath.php | 9 +++++---- Classes/Types/Scalars/DateTime.php | 9 +++++---- Classes/Types/Scalars/RelativeNodePath.php | 9 +++++---- Classes/Types/Scalars/Slug.php | 9 +++++---- Classes/Types/Scalars/UnstructuredObjectScalar.php | 8 ++++---- Classes/Types/Scalars/Url.php | 9 +++++---- Classes/Types/Scalars/Uuid.php | 9 +++++---- Classes/Types/Scalars/Workspace.php | 9 +++++---- 10 files changed, 47 insertions(+), 40 deletions(-) diff --git a/Classes/Types/InputTypes/NodeIdentifierOrPath.php b/Classes/Types/InputTypes/NodeIdentifierOrPath.php index 8c2996d..05ec095 100644 --- a/Classes/Types/InputTypes/NodeIdentifierOrPath.php +++ b/Classes/Types/InputTypes/NodeIdentifierOrPath.php @@ -4,7 +4,7 @@ namespace Ttree\Headless\Types\InputTypes; use GraphQL\Language\AST\Node as AstNode; -use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\ContentRepository\Domain\Model\NodeInterface; use Neos\ContentRepository\Domain\Service\Context as CRContext; @@ -51,12 +51,12 @@ public function parseValue($value) * @param AstNode $valueAST * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } /** diff --git a/Classes/Types/InputTypes/NodeType.php b/Classes/Types/InputTypes/NodeType.php index b8165b6..45b5e66 100644 --- a/Classes/Types/InputTypes/NodeType.php +++ b/Classes/Types/InputTypes/NodeType.php @@ -4,7 +4,7 @@ namespace Ttree\Headless\Types\InputTypes; use GraphQL\Language\AST\Node as AstNode; -use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\ContentRepository\Domain\Model\NodeType as CRNodeType; use Neos\ContentRepository\Domain\Service\NodeTypeManager; @@ -74,12 +74,12 @@ public function parseValue($value) * @param AstNode $valueAST * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } } diff --git a/Classes/Types/Scalars/AbsoluteNodePath.php b/Classes/Types/Scalars/AbsoluteNodePath.php index 80b876c..9bff273 100644 --- a/Classes/Types/Scalars/AbsoluteNodePath.php +++ b/Classes/Types/Scalars/AbsoluteNodePath.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\Flow\Annotations as Flow; @@ -50,15 +51,15 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->coerceNodePath($valueAST->value); + return $this->coerceNodePath($valueNode->value); } /** diff --git a/Classes/Types/Scalars/DateTime.php b/Classes/Types/Scalars/DateTime.php index bace131..524668e 100644 --- a/Classes/Types/Scalars/DateTime.php +++ b/Classes/Types/Scalars/DateTime.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\Flow\Annotations as Flow; @@ -60,14 +61,14 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return \DateTimeImmutable */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } } diff --git a/Classes/Types/Scalars/RelativeNodePath.php b/Classes/Types/Scalars/RelativeNodePath.php index 30d0676..a869df3 100644 --- a/Classes/Types/Scalars/RelativeNodePath.php +++ b/Classes/Types/Scalars/RelativeNodePath.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\Flow\Annotations as Flow; @@ -50,15 +51,15 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->coerceNodePath($valueAST->value); + return $this->coerceNodePath($valueNode->value); } /** diff --git a/Classes/Types/Scalars/Slug.php b/Classes/Types/Scalars/Slug.php index 31a2d95..53d957b 100644 --- a/Classes/Types/Scalars/Slug.php +++ b/Classes/Types/Scalars/Slug.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\Flow\Annotations as Flow; @@ -48,15 +49,15 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->coerceNodePath($valueAST->value); + return $this->coerceNodePath($valueNode->value); } /** diff --git a/Classes/Types/Scalars/UnstructuredObjectScalar.php b/Classes/Types/Scalars/UnstructuredObjectScalar.php index dccb649..718da7b 100644 --- a/Classes/Types/Scalars/UnstructuredObjectScalar.php +++ b/Classes/Types/Scalars/UnstructuredObjectScalar.php @@ -62,14 +62,14 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return array */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValue) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } } diff --git a/Classes/Types/Scalars/Url.php b/Classes/Types/Scalars/Url.php index 710819f..c7a763d 100644 --- a/Classes/Types/Scalars/Url.php +++ b/Classes/Types/Scalars/Url.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\Flow\Annotations as Flow; @@ -47,15 +48,15 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } /** diff --git a/Classes/Types/Scalars/Uuid.php b/Classes/Types/Scalars/Uuid.php index ef2f34f..cfdf2e0 100644 --- a/Classes/Types/Scalars/Uuid.php +++ b/Classes/Types/Scalars/Uuid.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\Flow\Annotations as Flow; @@ -57,15 +58,15 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return string */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } /** diff --git a/Classes/Types/Scalars/Workspace.php b/Classes/Types/Scalars/Workspace.php index 2fc216d..d14ef34 100644 --- a/Classes/Types/Scalars/Workspace.php +++ b/Classes/Types/Scalars/Workspace.php @@ -5,6 +5,7 @@ use GraphQL\Language\AST\Node as AstNode; use GraphQL\Language\AST\StringValue; +use GraphQL\Language\AST\StringValueNode; use GraphQL\Type\Definition\ScalarType; use Neos\ContentRepository\Domain\Model\Workspace as NeosWorkspace; use Neos\ContentRepository\Domain\Repository\WorkspaceRepository; @@ -63,14 +64,14 @@ public function parseValue($value) } /** - * @param AstNode $valueAST + * @param AstNode $valueNode * @return NeosWorkspace */ - public function parseLiteral($valueAST) + public function parseLiteral($valueNode, ?array $variables = null) { - if (!$valueAST instanceof StringValue) { + if (!$valueNode instanceof StringValueNode) { return null; } - return $this->parseValue($valueAST->value); + return $this->parseValue($valueNode->value); } }