Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TMP][WiP] IBX-8470: Upgraded codebase to Symfony 6 #76

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
45 changes: 21 additions & 24 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,32 +17,32 @@
"php": " >=8.3",
"ext-dom": "*",
"erusev/parsedown": "^1.7",
"ibexa/admin-ui": "~5.0.x-dev",
"ibexa/core": "~5.0.x-dev",
"ibexa/fieldtype-richtext": "~5.0.x-dev",
"ibexa/rest": "~5.0.x-dev",
"ibexa/admin-ui": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/core": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/fieldtype-richtext": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/rest": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"lexik/jwt-authentication-bundle": "^2.8",
"overblog/graphql-bundle": "^0.14.2",
"symfony/config": "^5.0",
"symfony/console": "^5.0",
"symfony/dependency-injection": "^5.0",
"symfony/filesystem": "^5.0",
"symfony/http-foundation": "^5.0",
"symfony/http-kernel": "^5.0",
"symfony/serializer": "^5.0",
"symfony/yaml": "^5.0"
"overblog/graphql-bundle": "^1.6.0",
"symfony/config": "^6.4",
"symfony/console": "^6.4",
"symfony/dependency-injection": "^6.4",
"symfony/filesystem": "^6.4",
"symfony/http-foundation": "^6.4",
"symfony/http-kernel": "^6.4",
"symfony/serializer": "^6.4",
"symfony/yaml": "^6.4"
},
"require-dev": {
"ibexa/code-style": "~2.0.0",
"ibexa/content-forms": "~5.0.x-dev",
"ibexa/design-engine": "~5.0.x-dev",
"ibexa/doctrine-schema": "~5.0.x-dev",
"ibexa/http-cache": "~5.0.x-dev",
"ibexa/notifications": "~5.0.x-dev",
"ibexa/search": "~5.0.x-dev",
"ibexa/user": "~5.0.x-dev",
"ibexa/content-forms": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/design-engine": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/doctrine-schema": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/http-cache": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/notifications": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/search": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"ibexa/user": "dev-ibx-8470-symfony-6 as 5.0.x-dev",
"mikey179/vfsstream": "^1.6",
"overblog/graphiql-bundle": "^0.2",
"overblog/graphiql-bundle": "^1.0",
"phpspec/phpspec": "^7.1",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
Expand All @@ -65,9 +65,6 @@
"spec\\EzSystems\\EzPlatformGraphQL\\": "spec/EzSystems/EzPlatformGraphQL"
}
},
"conflict": {
"webonyx/graphql-php": ">= 15.0.0"
},
"extra": {
"branch-alias": {
"dev-main": "5.0.x-dev"
Expand Down
100 changes: 0 additions & 100 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,6 @@ parameters:
count: 1
path: src/bundle/Command/GeneratePlatformSchemaCommand.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\Command\\\\GeneratePlatformSchemaCommand\\:\\:configure\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/Command/GeneratePlatformSchemaCommand.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\Compiler\\\\FieldInputHandlersPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/DependencyInjection/Compiler/FieldInputHandlersPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\Compiler\\\\RichTextInputConvertersPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/DependencyInjection/Compiler/RichTextInputConvertersPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\Compiler\\\\SchemaDomainIteratorsPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/DependencyInjection/Compiler/SchemaDomainIteratorsPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\Compiler\\\\SchemaWorkersPass\\:\\:process\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/DependencyInjection/Compiler/SchemaWorkersPass.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\GraphQL\\\\SchemaProvider\\:\\:getSchemaConfiguration\\(\\) return type has no value type specified in iterable type array\\.$#"
count: 1
Expand Down Expand Up @@ -100,11 +75,6 @@ parameters:
count: 1
path: src/bundle/DependencyInjection/IbexaGraphQLExtension.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\IbexaGraphQLExtension\\:\\:prepend\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/DependencyInjection/IbexaGraphQLExtension.php

-
message: "#^Parameter \\#1 \\$configDir of method Ibexa\\\\Bundle\\\\GraphQL\\\\DependencyInjection\\\\IbexaGraphQLExtension\\:\\:getGraphQLConfig\\(\\) expects string, array\\|bool\\|float\\|int\\|string\\|null given\\.$#"
count: 1
Expand All @@ -115,11 +85,6 @@ parameters:
count: 1
path: src/bundle/DependencyInjection/IbexaGraphQLExtension.php

-
message: "#^Method Ibexa\\\\Bundle\\\\GraphQL\\\\IbexaGraphQLBundle\\:\\:build\\(\\) has no return type specified\\.$#"
count: 1
path: src/bundle/IbexaGraphQLBundle.php

-
message: "#^Method Ibexa\\\\Contracts\\\\GraphQL\\\\Mutation\\\\InputHandler\\\\FieldType\\\\RichText\\\\RichTextInputConverter\\:\\:convertToXml\\(\\) has parameter \\$text with no type specified\\.$#"
count: 1
Expand Down Expand Up @@ -540,56 +505,11 @@ parameters:
count: 1
path: src/lib/Relay/NodeResolver.php

-
message: "#^Access to protected property Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection\\:\\:\\$edges\\.$#"
count: 1
path: src/lib/Relay/PageAwareConnection.php

-
message: "#^Access to protected property Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection\\:\\:\\$pageInfo\\.$#"
count: 1
path: src/lib/Relay/PageAwareConnection.php

-
message: "#^Access to protected property Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection\\:\\:\\$totalCount\\.$#"
count: 1
path: src/lib/Relay/PageAwareConnection.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Relay\\\\PageAwareConnection\\:\\:__construct\\(\\) has parameter \\$edges with no value type specified in iterable type array\\.$#"
count: 1
path: src/lib/Relay/PageAwareConnection.php

-
message: "#^Parameter \\#2 \\$pageInfo of class Ibexa\\\\GraphQL\\\\Relay\\\\PageAwareConnection constructor expects Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\PageInfoInterface, Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\PageInfoInterface\\|null given\\.$#"
count: 1
path: src/lib/Relay/PageAwareConnection.php

-
message: "#^Property Ibexa\\\\GraphQL\\\\Relay\\\\PageAwareConnection\\:\\:\\$totalCount \\(int\\) does not accept GraphQL\\\\Executor\\\\Promise\\\\Promise\\|int\\|null\\.$#"
count: 1
path: src/lib/Relay/PageAwareConnection.php

-
message: "#^Access to an undefined property Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\ConnectionInterface\\:\\:\\$sliceSize\\.$#"
count: 1
path: src/lib/Relay/SearchResolver.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Relay\\\\SearchResolver\\:\\:searchContent\\(\\) has parameter \\$args with no type specified\\.$#"
count: 1
path: src/lib/Relay/SearchResolver.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Relay\\\\SearchResolver\\:\\:searchContent\\(\\) should return Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection but returns Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\ConnectionInterface\\.$#"
count: 1
path: src/lib/Relay/SearchResolver.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Relay\\\\SearchResolver\\:\\:searchContent\\(\\) should return Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection but returns null\\.$#"
count: 1
path: src/lib/Relay/SearchResolver.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Resolver\\\\ContentResolver\\:\\:findContentByType\\(\\) has no return type specified\\.$#"
count: 1
Expand Down Expand Up @@ -980,16 +900,6 @@ parameters:
count: 1
path: src/lib/Resolver/ItemResolver.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Resolver\\\\ItemResolver\\:\\:resolveItemsOfTypeAsConnection\\(\\) should return Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection but returns GraphQL\\\\Executor\\\\Promise\\\\Promise\\|Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection\\.$#"
count: 1
path: src/lib/Resolver/ItemResolver.php

-
message: "#^Property Ibexa\\\\GraphQL\\\\Resolver\\\\ItemResolver\\:\\:\\$contentTypeLoader is never read, only written\\.$#"
count: 1
path: src/lib/Resolver/ItemResolver.php

-
message: "#^Parameter \\#1 \\$location of method Ibexa\\\\GraphQL\\\\Resolver\\\\LocationGuesser\\\\ObjectStorageLocationList\\:\\:addLocation\\(\\) expects Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\Content\\\\Location, Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ValueObject given\\.$#"
count: 1
Expand Down Expand Up @@ -1065,16 +975,6 @@ parameters:
count: 1
path: src/lib/Resolver/LocationResolver.php

-
message: "#^PHPDoc tag @return with type Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection is incompatible with native type Ibexa\\\\GraphQL\\\\Relay\\\\PageAwareConnection\\.$#"
count: 1
path: src/lib/Resolver/LocationResolver.php

-
message: "#^Parameter \\#1 \\$connection of static method Ibexa\\\\GraphQL\\\\Relay\\\\PageAwareConnection\\:\\:fromConnection\\(\\) expects Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection, GraphQL\\\\Executor\\\\Promise\\\\Promise\\|Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Connection given\\.$#"
count: 1
path: src/lib/Resolver/LocationResolver.php

-
message: "#^Method Ibexa\\\\GraphQL\\\\Resolver\\\\ObjectStateGroupResolver\\:\\:resolveObjectStateGroups\\(\\) should return array\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroup\\> but returns iterable\\<Ibexa\\\\Contracts\\\\Core\\\\Repository\\\\Values\\\\ObjectState\\\\ObjectStateGroup\\>\\.$#"
count: 1
Expand Down
3 changes: 0 additions & 3 deletions src/bundle/DependencyInjection/GraphQL/YamlSchemaProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

namespace Ibexa\Bundle\GraphQL\DependencyInjection\GraphQL;

use Ibexa\GraphQL\Resolver\Map\UploadMap;

/**
* Provides schema definitions.
*/
Expand Down Expand Up @@ -37,7 +35,6 @@ public function getSchemaConfiguration()
return [
'query' => $this->getQuerySchema(),
'mutation' => $this->getMutationSchema(),
'resolver_maps' => [UploadMap::class],
'types' => ['UntypedContent'],
];
}
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/default_settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ parameters:
input_type: ImageFieldInput
ezimageasset:
value_type: ImageFieldValue
value_resolver: 'resolver("DomainImageAssetFieldValue", [field])'
value_resolver: 'query("DomainImageAssetFieldValue", field)'
ezinteger:
definition_type: IntegerFieldDefinition
value_type: Int
Expand Down
2 changes: 1 addition & 1 deletion src/bundle/Resources/config/graphql/Base.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DateTime:
format:
type: String
description: "Date formatted with a date() format"
resolve: "@=resolver('DateTimeFormat', [value, args])"
resolve: "@=query('DateTimeFormat', value, args)"
args:
pattern:
type: "String"
Expand Down
20 changes: 10 additions & 10 deletions src/bundle/Resources/config/graphql/Content.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ Content:
contentType:
type: "ContentType"
description: "The content type of the Content item."
resolve: "@=resolver('ContentTypeById', [value.contentTypeId])"
resolve: "@=query('ContentTypeById', value.contentTypeId)"
name:
type: "String"
description: "The computed name (via name schema) in the main language of the Content item."
section:
type: "Section"
description: "The section to which the Content object is assigned."
resolve: "@=resolver('SectionById', [value.sectionId])"
resolve: "@=query('SectionById', value.sectionId)"
currentVersionNo:
type: "Int"
description: "Version number of the published version, or 1 for a newly created draft."
currentVersion:
type: "Version"
description: "The currently published version"
resolve: "@=resolver('CurrentVersion', [value])"
resolve: "@=query('CurrentVersion', value)"
versions:
type: "[Version]"
description: "All content versions."
resolve: "@=resolver('ContentVersions', [value.id])"
resolve: "@=query('ContentVersions', value.id)"
published:
type: "Boolean"
description: "If the Content item has a published version."
Expand All @@ -40,7 +40,7 @@ Content:
owner:
type: "User"
description: "The owner user of the Content object"
resolve: "@=resolver('UserById', [value.ownerId])"
resolve: "@=query('UserById', value.ownerId)"
modificationDate:
type: DateTime
description: "Date the Content item was last modified on."
Expand All @@ -62,23 +62,23 @@ Content:
mainLocation:
type: "Location"
description: "Content item's main location."
resolve: "@=resolver('LocationById', [value.mainLocationId])"
resolve: "@=query('LocationById', value.mainLocationId)"
locations:
type: "[Location]"
description: "All the locations of the Content item"
resolve: "@=resolver('LocationsByContentId', [value.id])"
resolve: "@=query('LocationsByContentId', value.id)"
relations:
type: "[ContentRelation]"
description: "Relations from this Content"
resolve: "@=resolver('ContentRelations', [value])"
resolve: "@=query('ContentRelations', value)"
reverseRelations:
type: "[ContentRelation]"
description: "Relations to this Content"
resolve: "@=resolver('ContentReverseRelations', [value])"
resolve: "@=query('ContentReverseRelations', value)"
states:
type: "[ObjectState]"
description: "Content States."
resolve: "@=resolver('ObjectStateByContentInfo', [value])"
resolve: "@=query('ObjectStateByContentInfo', value)"

ContentRelation:
type: "object"
Expand Down
8 changes: 4 additions & 4 deletions src/bundle/Resources/config/graphql/ContentType.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ ContentType:
creator:
type: "User"
description: "The user who created this content type."
resolve: "@=resolver('UserById', [value.creatorId])"
resolve: "@=query('UserById', value.creatorId)"
modifierId:
type: "Int"
description: "The user id of the user which has last modified this content type"
modifier:
type: "User"
description: "The user which has last modified this content type"
resolve: "@=resolver('UserById', [value.modifierId])"
resolve: "@=query('UserById', value.modifierId)"
remoteId:
type: "String"
description: "A global unique id of the content type."
Expand Down Expand Up @@ -99,12 +99,12 @@ ContentTypeGroup:
type: "Int"
creator:
type: "User"
resolve: "@=resolver('UserById', [value.creatorId])"
resolve: "@=query('UserById', value.creatorId)"
modifierId:
type: "Int"
modifier:
type: "User"
resolve: "@=resolver('UserById', [value.modifierId])"
resolve: "@=query('UserById', value.modifierId)"
contentTypes:
type: "[ContentType]"
resolve: "@=query('ContentTypesFromGroup', {'groupId': value.id})"
Expand Down
10 changes: 5 additions & 5 deletions src/bundle/Resources/config/graphql/DomainContent.types.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DomainContent:
type: String
_thumbnail:
type: Thumbnail
resolveType: "@=resolver('DomainContentType', [value])"
resolveType: "@=query('DomainContentType', value)"

AbstractDomainContent:
type: "object"
Expand All @@ -44,7 +44,7 @@ AbstractDomainContent:
_type:
description: "The item's content type"
type: ContentType
resolve: '@=resolver("ContentTypeById", [value.contentInfo.contentTypeId])'
resolve: '@=query("ContentTypeById", value.contentInfo.contentTypeId)'
_content:
description: 'Underlying content info item'
type: Content
Expand All @@ -57,19 +57,19 @@ AbstractDomainContent:
_location:
description: 'Main location'
type: Location
resolve: '@=resolver("LocationById", [value.contentInfo.mainLocationId])'
resolve: '@=query("LocationById", value.contentInfo.mainLocationId)'
_allLocations:
description: 'All the locations'
type: '[Location]'
resolve: '@=resolver("LocationsByContentId", [value.contentInfo.id])'
resolve: '@=query("LocationsByContentId", value.contentInfo.id)'
_name:
description: "The content item's name, in the prioritized language(s), based on the object name pattern"
type: String
resolve: "@=value.getName()"
_url:
description: "The content item's url alias, based on the main location."
type: String
resolve: "@=resolver('MainUrlAlias', [value])"
resolve: "@=query('MainUrlAlias', value)"
_thumbnail:
type: Thumbnail
resolve: "@=query('Thumbnail', value.getThumbnail())"
Expand Down
Loading
Loading