diff --git a/src/bundle/Resources/config/default_settings.yaml b/src/bundle/Resources/config/default_settings.yaml index b2de900..18aad66 100644 --- a/src/bundle/Resources/config/default_settings.yaml +++ b/src/bundle/Resources/config/default_settings.yaml @@ -1,5 +1,4 @@ parameters: - ibexa.graphql.schema.should.extend.ezurl: false ibexa.graphql.schema.content.field_name.override: id: id_ ibexa.graphql.schema.content.mapping.field_definition_type: @@ -82,4 +81,5 @@ parameters: definition_type: TextBlockFieldDefinition value_type: String ezurl: + value_type: UrlFieldValue input_type: UrlFieldInput diff --git a/src/bundle/Resources/config/services/schema.yaml b/src/bundle/Resources/config/services/schema.yaml index 7b44995..052cc0b 100644 --- a/src/bundle/Resources/config/services/schema.yaml +++ b/src/bundle/Resources/config/services/schema.yaml @@ -49,12 +49,6 @@ services: arguments: $innerMapper: '@Ibexa\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\SelectionFieldDefinitionMapper.inner' - Ibexa\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\UrlFieldDefinitionMapper: - decorates: Ibexa\Contracts\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\FieldDefinitionMapper - arguments: - $innerMapper: '@Ibexa\GraphQL\Schema\Domain\Content\Mapper\FieldDefinition\UrlFieldDefinitionMapper.inner' - $shouldExtendUrlInputType: '%ibexa.graphql.schema.should.extend.ezurl%' - Ibexa\GraphQL\Schema\Domain\Content\Worker\ContentType\AddItemOfTypeConnectionToGroup: ~ Ibexa\GraphQL\Schema\Domain\Content\Worker\ContentType\AddItemToGroup: ~ diff --git a/src/lib/Schema/Domain/Content/Mapper/FieldDefinition/UrlFieldDefinitionMapper.php b/src/lib/Schema/Domain/Content/Mapper/FieldDefinition/UrlFieldDefinitionMapper.php deleted file mode 100644 index fb37b63..0000000 --- a/src/lib/Schema/Domain/Content/Mapper/FieldDefinition/UrlFieldDefinitionMapper.php +++ /dev/null @@ -1,53 +0,0 @@ -shouldExtendUrlInputType = $shouldExtendUrlInputType; - } - - public function mapToFieldValueType(FieldDefinition $fieldDefinition): string - { - $type = parent::mapToFieldValueType($fieldDefinition); - if (!$this->canMap($fieldDefinition)) { - return $type; - } - - if ($this->shouldExtendUrlInputType) { - $type = 'UrlFieldValue'; - } else { - @trigger_error( - 'The return type `string` for the URL field has been deprecated since version 4.6 ' . - 'and will be removed in version 5.0. To start receiving `UrlFieldInput` instead of the deprecated ' . - '`string`, set the parameter `ibexa.graphql.schema.should.extend.ezurl` to `true`.', - E_USER_DEPRECATED - ); - } - - return $type; - } - - protected function getFieldTypeIdentifier(): string - { - return self::FIELD_TYPE_IDENTIFIER; - } -}