From 3c1522f3382658bbc4d6cbd8381a212b30bc6de3 Mon Sep 17 00:00:00 2001 From: Herbert Roth Date: Mon, 15 Jan 2024 08:33:13 +0100 Subject: [PATCH] Add strict_types. Change docker container to dev. Add php-cs-fixer to composer. Fix PSR-4 autoload config. Fix composer name. --- .gitignore | 3 ++- composer.json | 7 ++++--- docker-compose.yml | 4 ++-- src/Command/Update/IndexUpdateCommand.php | 1 + .../Compiler/SearchIndexFieldDefinitionPass.php | 1 + src/DependencyInjection/Configuration.php | 1 + .../PimcoreGenericDataIndexExtension.php | 1 + src/Entity/IndexQueue.php | 1 + src/Enum/DependencyInjection/CompilerPassTag.php | 1 + src/Enum/SearchIndex/ElementType.php | 1 + src/Enum/SearchIndex/FieldCategory.php | 1 + src/Enum/SearchIndex/FieldCategory/SystemField.php | 1 + src/Enum/SearchIndex/IndexQueueOperation.php | 1 + src/Enum/SearchIndex/OpenSearch/AttributeType.php | 1 + src/Message/IndexUpdateQueueMessage.php | 1 + src/MessageHandler/IndexUpdateQueueHandler.php | 1 + src/PimcoreGenericDataIndexBundle.php | 1 + src/Service/DataObject/SelectOptionsService.php | 1 + .../Messenger/Middleware/CollectGarbageMiddleware.php | 1 + .../DataObject/FieldDefinitionAdapter/BooleanAdapter.php | 1 + .../DataObject/FieldDefinitionAdapter/DateAdapter.php | 1 + .../DataObject/FieldDefinitionAdapter/DateTimeAdapter.php | 1 + .../DataObject/FieldDefinitionAdapter/DefaultAdapter.php | 1 + .../FieldDefinitionAdapterInterface.php | 1 + .../FieldDefinitionAdapter/LocalizedFieldsAdapter.php | 1 + .../FieldDefinitionAdapter/MultiSelectAdapter.php | 1 + .../DataObject/FieldDefinitionAdapter/NumericAdapter.php | 1 + .../FieldDefinitionAdapter/QuantityValueAdapter.php | 1 + .../DataObject/FieldDefinitionAdapter/SelectAdapter.php | 1 + .../DataObject/FieldDefinitionAdapter/TextAdapter.php | 1 + .../SearchIndex/DataObject/FieldDefinitionService.php | 1 + src/Service/SearchIndex/IndexQueueService.php | 1 + .../SearchIndex/IndexService/AbstractIndexService.php | 1 + src/Service/SearchIndex/IndexService/AssetIndexService.php | 1 + .../SearchIndex/IndexService/DataObjectIndexService.php | 1 + src/Service/SearchIndex/IndexServiceInterface.php | 1 + src/Service/SearchIndex/IndexUpdateService.php | 1 + src/Service/SearchIndex/LanguageService.php | 1 + .../SearchIndex/OpenSearch/BulkOperationService.php | 1 + src/Service/SearchIndex/OpenSearch/OpenSearchService.php | 1 + src/Service/SearchIndex/SearchIndexConfigService.php | 1 + src/Service/Workflow/WorkflowService.php | 1 + src/Traits/LoggerAwareTrait.php | 1 + 43 files changed, 48 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index c78ed7ab..0cb72a3b 100644 --- a/.gitignore +++ b/.gitignore @@ -46,4 +46,5 @@ package-lock.json /.env /.htaccess /auth.json -/config.json \ No newline at end of file +/config.json +/composer.phar diff --git a/composer.json b/composer.json index 739e6aa0..b9f59895 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "pimcore/x-template-name-bundle-x", + "name": "pimcore/generic-data-index-bundle", "license": "Pimcore Enterprise License (PEL)", "type": "pimcore-bundle", "description": "Pimcore xTemplate Bundlex", @@ -34,11 +34,12 @@ "phpunit/phpunit": "10.2.7", "nyholm/psr7": "^1", "symfony/phpunit-bridge": "^6", - "fakerphp/faker": "^1.23" + "fakerphp/faker": "^1.23", + "friendsofphp/php-cs-fixer": "^3.4" }, "autoload": { "psr-4": { - "Pimcore\\Bundle\\xTemplateBundlex\\": "src/", + "Pimcore\\Bundle\\GenericDataIndexBundle\\": "src/", "Pimcore\\": "core-extension/Pimcore/" } }, diff --git a/docker-compose.yml b/docker-compose.yml index 2b94ee61..58320e0a 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ version: '3.0' services: - php-x-template-bundle-x: - image: pimcore/pimcore:php8.2-debug-latest + php-generic-data-index-bundle: + image: pimcore/pimcore:php8.2-debug-dev environment: PHP_IDE_CONFIG: serverName=localhost volumes: diff --git a/src/Command/Update/IndexUpdateCommand.php b/src/Command/Update/IndexUpdateCommand.php index a0a11aea..4cbe32f0 100644 --- a/src/Command/Update/IndexUpdateCommand.php +++ b/src/Command/Update/IndexUpdateCommand.php @@ -1,4 +1,5 @@