From 539d77b6e8e5f62a719f7e0f53b1b4db651f8365 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Sun, 28 Apr 2024 02:46:44 +0200 Subject: [PATCH 1/2] IBX-8121: Fixed code style for 5.0 --- composer.json | 8 +++++--- spec/ContentView/FieldDefinitionIdentifierMatcherSpec.php | 1 + spec/ContentView/QueryResultsInjectorSpec.php | 1 + spec/ExceptionSafeQueryFieldServiceSpec.php | 1 + spec/GraphQL/ContentQueryFieldDefinitionMapperSpec.php | 1 + spec/GraphQL/QueryFieldResolverSpec.php | 1 + .../Content/FieldValue/Converter/QueryConverterSpec.php | 1 + spec/QueryFieldServiceSpec.php | 1 + src/bundle/Controller/QueryFieldRestController.php | 1 + .../Compiler/ConfigurableFieldDefinitionMapperPass.php | 1 + .../Compiler/FieldDefinitionIdentifierViewMatcherPass.php | 1 + .../DependencyInjection/Compiler/QueryTypesListPass.php | 1 + .../DependencyInjection/IbexaFieldTypeQueryExtension.php | 1 + src/bundle/IbexaFieldTypeQueryBundle.php | 1 + src/contracts/QueryFieldLocationService.php | 1 + src/contracts/QueryFieldServiceInterface.php | 1 + src/lib/ContentView/FieldDefinitionIdentifierMatcher.php | 1 + src/lib/ContentView/QueryResultsInjector.php | 1 + src/lib/ContentView/QueryResultsPagerFantaAdapter.php | 1 + .../QueryResultsWithLocationPagerFantaAdapter.php | 1 + src/lib/ExceptionSafeQueryFieldService.php | 1 + src/lib/FieldType/Form/QueryFieldFormType.php | 1 + src/lib/FieldType/Mapper/ParametersTransformer.php | 1 + src/lib/FieldType/Mapper/QueryFormMapper.php | 1 + src/lib/FieldType/Query/Type.php | 1 + src/lib/FieldType/Query/Value.php | 1 + src/lib/GraphQL/ContentQueryFieldDefinitionMapper.php | 1 + src/lib/GraphQL/QueryFieldResolver.php | 1 + .../Content/FieldValue/Converter/QueryConverter.php | 1 + src/lib/QueryFieldPaginationService.php | 1 + src/lib/QueryFieldService.php | 1 + 31 files changed, 35 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 3eef3ab..21f5e1c 100644 --- a/composer.json +++ b/composer.json @@ -6,6 +6,8 @@ "replace": { "ezsystems/ezplatform-query-fieldtype": "*" }, + "minimum-stability": "dev", + "prefer-stable": true, "require": { "php": ">=8.3", "ext-json": "*", @@ -38,8 +40,7 @@ } }, "require-dev": { - "friendsofphp/php-cs-fixer": "^3.0", - "ibexa/code-style": "^1.0", + "ibexa/code-style": "~2.0.0", "ibexa/design-engine": "~5.0.x-dev", "ibexa/doctrine-schema": "~5.0.x-dev", "ibexa/fieldtype-richtext": "~5.0.x-dev", @@ -60,7 +61,8 @@ }, "config": { "allow-plugins": { - "composer/package-versions-deprecated": true + "composer/package-versions-deprecated": true, + "php-http/discovery": false }, "sort-packages": true } diff --git a/spec/ContentView/FieldDefinitionIdentifierMatcherSpec.php b/spec/ContentView/FieldDefinitionIdentifierMatcherSpec.php index 3b60867..31d3fdc 100644 --- a/spec/ContentView/FieldDefinitionIdentifierMatcherSpec.php +++ b/spec/ContentView/FieldDefinitionIdentifierMatcherSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery\ContentView; use Ibexa\Contracts\Core\Repository\ContentTypeService; diff --git a/spec/ContentView/QueryResultsInjectorSpec.php b/spec/ContentView/QueryResultsInjectorSpec.php index 04146fd..c509094 100644 --- a/spec/ContentView/QueryResultsInjectorSpec.php +++ b/spec/ContentView/QueryResultsInjectorSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery\ContentView; use Ibexa\Contracts\FieldTypeQuery\QueryFieldServiceInterface; diff --git a/spec/ExceptionSafeQueryFieldServiceSpec.php b/spec/ExceptionSafeQueryFieldServiceSpec.php index deb6012..92260b3 100644 --- a/spec/ExceptionSafeQueryFieldServiceSpec.php +++ b/spec/ExceptionSafeQueryFieldServiceSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery; use Ibexa\Contracts\FieldTypeQuery\QueryFieldServiceInterface; diff --git a/spec/GraphQL/ContentQueryFieldDefinitionMapperSpec.php b/spec/GraphQL/ContentQueryFieldDefinitionMapperSpec.php index 3769c47..c696fc8 100644 --- a/spec/GraphQL/ContentQueryFieldDefinitionMapperSpec.php +++ b/spec/GraphQL/ContentQueryFieldDefinitionMapperSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery\GraphQL; use Ibexa\Contracts\Core\Repository\ContentTypeService; diff --git a/spec/GraphQL/QueryFieldResolverSpec.php b/spec/GraphQL/QueryFieldResolverSpec.php index 05f9091..8e1b02a 100644 --- a/spec/GraphQL/QueryFieldResolverSpec.php +++ b/spec/GraphQL/QueryFieldResolverSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery\GraphQL; use Ibexa\Contracts\FieldTypeQuery\QueryFieldServiceInterface; diff --git a/spec/Persistence/Legacy/Content/FieldValue/Converter/QueryConverterSpec.php b/spec/Persistence/Legacy/Content/FieldValue/Converter/QueryConverterSpec.php index f21cd38..cf5e971 100644 --- a/spec/Persistence/Legacy/Content/FieldValue/Converter/QueryConverterSpec.php +++ b/spec/Persistence/Legacy/Content/FieldValue/Converter/QueryConverterSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\Type\FieldDefinition; diff --git a/spec/QueryFieldServiceSpec.php b/spec/QueryFieldServiceSpec.php index ea58caa..a3c1071 100644 --- a/spec/QueryFieldServiceSpec.php +++ b/spec/QueryFieldServiceSpec.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace spec\Ibexa\FieldTypeQuery; use Ibexa\Contracts\Core\Repository\ContentTypeService; diff --git a/src/bundle/Controller/QueryFieldRestController.php b/src/bundle/Controller/QueryFieldRestController.php index 8968749..c368629 100644 --- a/src/bundle/Controller/QueryFieldRestController.php +++ b/src/bundle/Controller/QueryFieldRestController.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\FieldTypeQuery\Controller; use Ibexa\Contracts\Core\Repository\ContentService; diff --git a/src/bundle/DependencyInjection/Compiler/ConfigurableFieldDefinitionMapperPass.php b/src/bundle/DependencyInjection/Compiler/ConfigurableFieldDefinitionMapperPass.php index 705cce7..029b8d0 100644 --- a/src/bundle/DependencyInjection/Compiler/ConfigurableFieldDefinitionMapperPass.php +++ b/src/bundle/DependencyInjection/Compiler/ConfigurableFieldDefinitionMapperPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\FieldTypeQuery\DependencyInjection\Compiler; use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface; diff --git a/src/bundle/DependencyInjection/Compiler/FieldDefinitionIdentifierViewMatcherPass.php b/src/bundle/DependencyInjection/Compiler/FieldDefinitionIdentifierViewMatcherPass.php index 8d9beb9..c5fe886 100644 --- a/src/bundle/DependencyInjection/Compiler/FieldDefinitionIdentifierViewMatcherPass.php +++ b/src/bundle/DependencyInjection/Compiler/FieldDefinitionIdentifierViewMatcherPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\FieldTypeQuery\DependencyInjection\Compiler; use Ibexa\FieldTypeQuery\ContentView\FieldDefinitionIdentifierMatcher; diff --git a/src/bundle/DependencyInjection/Compiler/QueryTypesListPass.php b/src/bundle/DependencyInjection/Compiler/QueryTypesListPass.php index 1709f17..a0644fe 100644 --- a/src/bundle/DependencyInjection/Compiler/QueryTypesListPass.php +++ b/src/bundle/DependencyInjection/Compiler/QueryTypesListPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\FieldTypeQuery\DependencyInjection\Compiler; use Ibexa\Core\QueryType\ArrayQueryTypeRegistry; diff --git a/src/bundle/DependencyInjection/IbexaFieldTypeQueryExtension.php b/src/bundle/DependencyInjection/IbexaFieldTypeQueryExtension.php index c7d8317..c8a1667 100644 --- a/src/bundle/DependencyInjection/IbexaFieldTypeQueryExtension.php +++ b/src/bundle/DependencyInjection/IbexaFieldTypeQueryExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\FieldTypeQuery\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/bundle/IbexaFieldTypeQueryBundle.php b/src/bundle/IbexaFieldTypeQueryBundle.php index 86db802..2de0c65 100644 --- a/src/bundle/IbexaFieldTypeQueryBundle.php +++ b/src/bundle/IbexaFieldTypeQueryBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\FieldTypeQuery; use Ibexa\Bundle\FieldTypeQuery\DependencyInjection\Compiler; diff --git a/src/contracts/QueryFieldLocationService.php b/src/contracts/QueryFieldLocationService.php index 5b51451..72fe830 100644 --- a/src/contracts/QueryFieldLocationService.php +++ b/src/contracts/QueryFieldLocationService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\FieldTypeQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/src/contracts/QueryFieldServiceInterface.php b/src/contracts/QueryFieldServiceInterface.php index 0c43df0..f6d1ead 100644 --- a/src/contracts/QueryFieldServiceInterface.php +++ b/src/contracts/QueryFieldServiceInterface.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Contracts\FieldTypeQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/ContentView/FieldDefinitionIdentifierMatcher.php b/src/lib/ContentView/FieldDefinitionIdentifierMatcher.php index f839344..e97797f 100644 --- a/src/lib/ContentView/FieldDefinitionIdentifierMatcher.php +++ b/src/lib/ContentView/FieldDefinitionIdentifierMatcher.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\ContentView; use Ibexa\Contracts\Core\Repository\Values\Content\ContentInfo; diff --git a/src/lib/ContentView/QueryResultsInjector.php b/src/lib/ContentView/QueryResultsInjector.php index b26695b..80fdbe5 100644 --- a/src/lib/ContentView/QueryResultsInjector.php +++ b/src/lib/ContentView/QueryResultsInjector.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\ContentView; use Ibexa\Contracts\FieldTypeQuery\QueryFieldLocationService; diff --git a/src/lib/ContentView/QueryResultsPagerFantaAdapter.php b/src/lib/ContentView/QueryResultsPagerFantaAdapter.php index eeff42b..a49cf9a 100644 --- a/src/lib/ContentView/QueryResultsPagerFantaAdapter.php +++ b/src/lib/ContentView/QueryResultsPagerFantaAdapter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\ContentView; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/ContentView/QueryResultsWithLocationPagerFantaAdapter.php b/src/lib/ContentView/QueryResultsWithLocationPagerFantaAdapter.php index 1430023..fbcbd88 100644 --- a/src/lib/ContentView/QueryResultsWithLocationPagerFantaAdapter.php +++ b/src/lib/ContentView/QueryResultsWithLocationPagerFantaAdapter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\ContentView; use Ibexa\Contracts\Core\Repository\Values\Content\Location; diff --git a/src/lib/ExceptionSafeQueryFieldService.php b/src/lib/ExceptionSafeQueryFieldService.php index e88dce6..6f7c866 100644 --- a/src/lib/ExceptionSafeQueryFieldService.php +++ b/src/lib/ExceptionSafeQueryFieldService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/FieldType/Form/QueryFieldFormType.php b/src/lib/FieldType/Form/QueryFieldFormType.php index 3686b8d..7a68d62 100644 --- a/src/lib/FieldType/Form/QueryFieldFormType.php +++ b/src/lib/FieldType/Form/QueryFieldFormType.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\FieldType\Form; use Ibexa\AdminUi\Form\DataTransformer\FieldType\FieldValueTransformer; diff --git a/src/lib/FieldType/Mapper/ParametersTransformer.php b/src/lib/FieldType/Mapper/ParametersTransformer.php index ad017a0..2824511 100644 --- a/src/lib/FieldType/Mapper/ParametersTransformer.php +++ b/src/lib/FieldType/Mapper/ParametersTransformer.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\FieldType\Mapper; use Symfony\Component\Form\DataTransformerInterface; diff --git a/src/lib/FieldType/Mapper/QueryFormMapper.php b/src/lib/FieldType/Mapper/QueryFormMapper.php index f7eebd0..cb91cbe 100644 --- a/src/lib/FieldType/Mapper/QueryFormMapper.php +++ b/src/lib/FieldType/Mapper/QueryFormMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\FieldType\Mapper; use Ibexa\AdminUi\FieldType\FieldDefinitionFormMapperInterface; diff --git a/src/lib/FieldType/Query/Type.php b/src/lib/FieldType/Query/Type.php index 5610d7f..1d3b1ec 100644 --- a/src/lib/FieldType/Query/Type.php +++ b/src/lib/FieldType/Query/Type.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\FieldType\Query; use Ibexa\Contracts\Core\FieldType\Value as SPIValue; diff --git a/src/lib/FieldType/Query/Value.php b/src/lib/FieldType/Query/Value.php index 1e5ec90..698fd9e 100644 --- a/src/lib/FieldType/Query/Value.php +++ b/src/lib/FieldType/Query/Value.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\FieldType\Query; use Ibexa\Core\FieldType\Value as BaseValue; diff --git a/src/lib/GraphQL/ContentQueryFieldDefinitionMapper.php b/src/lib/GraphQL/ContentQueryFieldDefinitionMapper.php index c795dc8..2732c9f 100644 --- a/src/lib/GraphQL/ContentQueryFieldDefinitionMapper.php +++ b/src/lib/GraphQL/ContentQueryFieldDefinitionMapper.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\GraphQL; use Ibexa\Contracts\Core\Repository\ContentTypeService; diff --git a/src/lib/GraphQL/QueryFieldResolver.php b/src/lib/GraphQL/QueryFieldResolver.php index ed71ab3..4031ac3 100644 --- a/src/lib/GraphQL/QueryFieldResolver.php +++ b/src/lib/GraphQL/QueryFieldResolver.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\GraphQL; use Ibexa\Contracts\Core\Repository\Values\Content\Content; diff --git a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/QueryConverter.php b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/QueryConverter.php index 6a3b557..fea5800 100644 --- a/src/lib/Persistence/Legacy/Content/FieldValue/Converter/QueryConverter.php +++ b/src/lib/Persistence/Legacy/Content/FieldValue/Converter/QueryConverter.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery\Persistence\Legacy\Content\FieldValue\Converter; use Ibexa\Contracts\Core\Persistence\Content\FieldValue; diff --git a/src/lib/QueryFieldPaginationService.php b/src/lib/QueryFieldPaginationService.php index 8cf8f35..04eaf89 100644 --- a/src/lib/QueryFieldPaginationService.php +++ b/src/lib/QueryFieldPaginationService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery; /** diff --git a/src/lib/QueryFieldService.php b/src/lib/QueryFieldService.php index 819f14e..f07e11e 100644 --- a/src/lib/QueryFieldService.php +++ b/src/lib/QueryFieldService.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\FieldTypeQuery; use Ibexa\Contracts\Core\Repository\ContentTypeService; From 3ccfdb6ce7a8166cf778771886b4bea2f24664ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Tue, 7 May 2024 10:22:40 +0200 Subject: [PATCH 2/2] Put indirect dependencies in require-dev --- composer.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 21f5e1c..0a536f3 100644 --- a/composer.json +++ b/composer.json @@ -6,8 +6,6 @@ "replace": { "ezsystems/ezplatform-query-fieldtype": "*" }, - "minimum-stability": "dev", - "prefer-stable": true, "require": { "php": ">=8.3", "ext-json": "*", @@ -45,6 +43,7 @@ "ibexa/doctrine-schema": "~5.0.x-dev", "ibexa/fieldtype-richtext": "~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", "phpspec/phpspec": "^7.1"