From 5e8c7f12f539c663c9fd8b8c2b663fcd03569ef3 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 10:42:09 +0000 Subject: [PATCH 01/63] Change ci composer --- .github/ci/files/composer.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/ci/files/composer.json b/.github/ci/files/composer.json index 94074c67..c3507570 100644 --- a/.github/ci/files/composer.json +++ b/.github/ci/files/composer.json @@ -16,11 +16,10 @@ "pimcore/generic-data-index-bundle": "@dev" }, "require-dev": { - "codeception/codeception": "^5.3.2", - "codeception/phpunit-wrapper": "^9", - "codeception/module-asserts": "^2", - "codeception/module-symfony": "^3.1.1", - "phpunit/phpunit": "10.2.7" + "codeception/codeception": "^5.3.4", + "codeception/module-asserts": "^3.0", + "codeception/module-symfony": "^3.7.1", + "phpunit/phpunit": "^10.5" }, "autoload": { "psr-4": { From 8ea3b67cdcb9aca26cf78f8b59764be5575f9a38 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 11:01:51 +0000 Subject: [PATCH 02/63] use centralized workflow --- .github/ci/files/composer.json | 45 ------ .../workflows/elastic-search-codeception.yaml | 129 ++++-------------- .../workflows/open-search-codeception.yaml | 121 ++++------------ 3 files changed, 54 insertions(+), 241 deletions(-) delete mode 100644 .github/ci/files/composer.json diff --git a/.github/ci/files/composer.json b/.github/ci/files/composer.json deleted file mode 100644 index c3507570..00000000 --- a/.github/ci/files/composer.json +++ /dev/null @@ -1,45 +0,0 @@ -{ - "type": "project", - "config": { - "optimize-autoloader": true, - "sort-packages": true, - "discard-changes": true, - "process-timeout": 0, - "allow-plugins": { - "php-http/discovery": false, - "symfony/runtime": true - } - }, - "prefer-stable": true, - "minimum-stability": "dev", - "require": { - "pimcore/generic-data-index-bundle": "@dev" - }, - "require-dev": { - "codeception/codeception": "^5.3.4", - "codeception/module-asserts": "^3.0", - "codeception/module-symfony": "^3.7.1", - "phpunit/phpunit": "^10.5" - }, - "autoload": { - "psr-4": { - "App\\": "src/", - "Pimcore\\Model\\DataObject\\": "var/classes/DataObject" - }, - "files": [ - "kernel/Kernel.php" - ] - }, - "extra": { - "symfony-assets-install": "relative" - }, - "repositories": { - "bundles": { - "type": "path", - "url": "./bundles/*/*", - "options": { - "symlink": true - } - } - } -} diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index b1495507..4ec601e1 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -1,9 +1,8 @@ name: "Codeception Tests with Elasticsearch" on: - # Enable Later. schedule: - - cron: '0 3 * * 1,3,5' + - cron: "0 3 * * 1,3,5" workflow_dispatch: pull_request: branches: @@ -15,109 +14,33 @@ on: - "[0-9]+.[0-9]+" - "[0-9]+.x" -env: - PIMCORE_PROJECT_ROOT: ${{ github.workspace }} - APP_ENV: test - PIMCORE_TEST: 1 - PIMCORE_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/pimcore_test" - PIMCORE_ELASTIC_SEARCH_HOST: "localhost:5300" - CODECEPTION_BUNDLE_PATH: "bundles/pimcore/generic-data-index-bundle/" - PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} - PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} - PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} - jobs: codeception-tests: - name: "Codeception tests" - runs-on: "ubuntu-latest" - continue-on-error: ${{ matrix.experimental }} strategy: matrix: include: - - { php-version: "8.4", dependencies: "highest", pimcore_version: "12.x-dev as 12.99.9", experimental: true, search_engine: "elasticsearch"} - - services: - mariadb: - image: "mariadb:10.11" - ports: - - 33006:3306 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - - elastic: - image: elasticsearch:8.5.3 - ports: - - 5300:9200 - env: - discovery.type: "single-node" - ES_JAVA_OPTS: "-Xms1g -Xmx1g" - xpack.security.enabled: "true" - xpack.security.authc.anonymous.roles: "superuser,kibana_admin,kibana_system,kibana_user" - ELASTIC_USERNAME: "elastic" - ELASTIC_PASSWORD: "somethingsecret" - - steps: - - name: "Checkout code" - uses: "actions/checkout@v4" - with: - path: "bundles/pimcore/generic-data-index-bundle" - - - name: "Copy .github directory" - env: - REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" - run: | - cp -R bundles/pimcore/generic-data-index-bundle/.github .github - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: xdebug - ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 - php-version: "${{ matrix.php-version }}" - - - name: Verify MariaDB connection - run: | - cp .github/ci/files/.my.cnf ~/.my.cnf - while ! mysqladmin ping --silent; do - sleep 1 - done - - - name: "Setup Pimcore environment" - env: - REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" - run: | - mysql -e "CREATE DATABASE pimcore_test CHARSET=utf8mb4;" - cp -R bundles/pimcore/generic-data-index-bundle/tests tests - mkdir src - chmod 755 .github/ci/scripts/setup-pimcore-environment-functional-tests.sh - .github/ci/scripts/setup-pimcore-environment-functional-tests.sh "${{ matrix.search_engine }}" - - - name: "Wait for Elasticsearch to be up" - run: | - if [ "${{ matrix.search_engine }}" == "elasticsearch" ]; then - echo "Waiting for Elasticsearch to be ready..." - until curl -s -u elastic:somethingsecret http://localhost:5300/_cluster/health | grep -q '"status":"green"'; do - echo "Waiting... Elasticsearch is not yet available." - sleep 5 - done - echo "Elasticsearch is up and running!" - else - echo "Using OpenSearch for testing, skipping Elasticsearch wait." - fi - - - name: "Update Pimcore version" - env: - PIMCORE_VERSION: "${{ matrix.pimcore_version }}" - run: | - if [ ! -z "$PIMCORE_VERSION" ]; then - composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" - fi - - - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v2" - with: - dependency-versions: "${{ matrix.dependencies }}" - - - name: "Run Codeception" - run: | - vendor/bin/codecept run -c . -vvv --xml --coverage-xml + - { + php-version: "8.4", + dependencies: "highest", + pimcore_version: "12.x-dev as 12.99.9", + experimental: true, + } + uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main + with: + APP_ENV: test + PIMCORE_TEST: "1" + PRIVATE_REPO: "false" + PHP_VERSION: ${{ matrix.php-version }} + DATABASE: "mariadb:10.11" + DEPENDENCIES: ${{ matrix.dependencies }} + EXPERIMENTAL: ${{ matrix.experimental }} + PIMCORE_VERSION: ${{ matrix.pimcore_version }} + REQUIRE_ADMIN_BUNDLE: "false" + PIMCORE_ELASTIC_SEARCH_HOST: "39201" + PIMCORE_ELASTIC_SEARCH_VERSION: "8.5.3" + ENABLE_ELASTICSEARCH: true + COVERAGE: "xdebug" + secrets: + PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} + PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} + PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index 05c97135..91413900 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -1,9 +1,8 @@ name: "Codeception Tests with OpenSearch" on: - # Enable Later. schedule: - - cron: '0 3 * * 1,3,5' + - cron: "0 3 * * 1,3,5" workflow_dispatch: pull_request: branches: @@ -15,99 +14,35 @@ on: - "[0-9]+.[0-9]+" - "[0-9]+.x" -env: - PIMCORE_PROJECT_ROOT: ${{ github.workspace }} - APP_ENV: test - PIMCORE_TEST: 1 - PIMCORE_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/pimcore_test" - PIMCORE_OPEN_SEARCH_HOST: "localhost:39200" - CODECEPTION_BUNDLE_PATH: "bundles/pimcore/generic-data-index-bundle/" - PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} - PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} - PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} - jobs: codeception-tests: - name: "Codeception tests" - runs-on: "ubuntu-latest" - continue-on-error: ${{ matrix.experimental }} strategy: matrix: include: - - { php-version: "8.3", dependencies: "lowest", pimcore_version: "", experimental: false, search_engine: "openSearch" } - - { php-version: "8.4", dependencies: "highest", pimcore_version: "", experimental: false, search_engine: "openSearch"} - - { php-version: "8.4", dependencies: "highest", pimcore_version: "12.x-dev as 12.99.9", experimental: true, search_engine: "openSearch"} - - services: - mariadb: - image: "mariadb:10.11" - ports: - - 33006:3306 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - - opensearch: - image: opensearchproject/opensearch:2 - ports: - - 39200:9200 - env: - cluster.name: "opensearch-cluster" - node.name: "opensearch-node" - discovery.seed_hosts: "opensearch-node" - bootstrap.memory_lock: true - OPENSEARCH_JAVA_OPTS: "-Xms512m -Xmx512m" - discovery.type: "single-node" - DISABLE_SECURITY_PLUGIN: true - - steps: - - name: "Checkout code" - uses: "actions/checkout@v4" - with: - path: "bundles/pimcore/generic-data-index-bundle" - - - name: "Copy .github directory" - env: - REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" - run: | - cp -R bundles/pimcore/generic-data-index-bundle/.github .github - - - name: "Install PHP" - uses: "shivammathur/setup-php@v2" - with: - coverage: xdebug - ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 - php-version: "${{ matrix.php-version }}" - - - name: Verify MariaDB connection - run: | - cp .github/ci/files/.my.cnf ~/.my.cnf - while ! mysqladmin ping --silent; do - sleep 1 - done - - - name: "Setup Pimcore environment" - env: - REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" - run: | - mysql -e "CREATE DATABASE pimcore_test CHARSET=utf8mb4;" - cp -R bundles/pimcore/generic-data-index-bundle/tests tests - mkdir src - chmod 755 .github/ci/scripts/setup-pimcore-environment-functional-tests.sh - .github/ci/scripts/setup-pimcore-environment-functional-tests.sh "${{ matrix.search_engine }}" - - - name: "Update Pimcore version" - env: - PIMCORE_VERSION: "${{ matrix.pimcore_version }}" - run: | - if [ ! -z "$PIMCORE_VERSION" ]; then - composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" - fi - - - name: "Install dependencies with Composer" - uses: "ramsey/composer-install@v2" - with: - dependency-versions: "${{ matrix.dependencies }}" - - - name: "Run Codeception" - run: | - vendor/bin/codecept run -c . -vvv --xml --coverage-xml + - { php-version: "8.3", dependencies: "lowest", pimcore_version: "", experimental: false } + - { php-version: "8.4", dependencies: "highest", pimcore_version: "", experimental: false } + - { + php-version: "8.4", + dependencies: "highest", + pimcore_version: "12.x-dev as 12.99.9", + experimental: true, + } + uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main + with: + APP_ENV: test + PIMCORE_TEST: "1" + PRIVATE_REPO: "false" + PHP_VERSION: ${{ matrix.php-version }} + DATABASE: "mariadb:10.11" + DEPENDENCIES: ${{ matrix.dependencies }} + EXPERIMENTAL: ${{ matrix.experimental }} + PIMCORE_VERSION: ${{ matrix.pimcore_version }} + REQUIRE_ADMIN_BUNDLE: "false" + PIMCORE_OPEN_SEARCH_HOST: "39200" + PIMCORE_OPENSEARCH_VERSION: "2" + ENABLE_ELASTICSEARCH: false + COVERAGE: "xdebug" + secrets: + PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} + PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} + PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} From 12b70d2c203ed130a6a82814fda336c6268be47e Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 12:22:28 +0000 Subject: [PATCH 03/63] Fix: tests --- .../ci/scripts/setup-pimcore-environment.sh | 1 - .../workflows/elastic-search-codeception.yaml | 73 ++++++++++++++++-- .../workflows/open-search-codeception.yaml | 75 ++++++++++++++++--- 3 files changed, 130 insertions(+), 19 deletions(-) diff --git a/.github/ci/scripts/setup-pimcore-environment.sh b/.github/ci/scripts/setup-pimcore-environment.sh index ac32e84e..29e5a1d7 100755 --- a/.github/ci/scripts/setup-pimcore-environment.sh +++ b/.github/ci/scripts/setup-pimcore-environment.sh @@ -5,7 +5,6 @@ set -eu mkdir -p var/config mkdir -p bin -cp .github/ci/files/.env . cp -r .github/ci/files/config/. config cp -r .github/ci/files/templates/. templates cp -r .github/ci/files/bin/console bin/console diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index 4ec601e1..17d9d5ad 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -15,16 +15,73 @@ on: - "[0-9]+.x" jobs: + setup-matrix: + runs-on: ubuntu-latest + outputs: + php_versions: ${{ steps.parse-php-versions.outputs.php_versions }} + matrix: ${{ steps.set-matrix.outputs.matrix }} + private_repo: ${{ env.PRIVATE_REPO }} + steps: + - name: Checkout PR head (only for pull_request_target) + if: github.event_name == 'pull_request_target' + uses: "actions/checkout@v4" + with: + ref: "refs/pull/${{ github.event.pull_request.number }}/merge" + + - name: Checkout PR head (for push or other events) + if: github.event_name != 'pull_request_target' + uses: "actions/checkout@v4" + + - name: Checkout reusable workflow repo + uses: actions/checkout@v4 + with: + repository: pimcore/workflows-collection-public + ref: main + path: reusable-workflows + + - name: Parse PHP versions from composer.json + id: parse-php-versions + run: | + if [ -f composer.json ]; then + php_versions=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | tr '\n' ',' | sed 's/,$//') + if [ -z "$php_versions" ]; then + echo "No PHP versions found in composer.json" + echo "Setting default PHP value" + echo "php_versions=default" >> $GITHUB_OUTPUT + else + echo "php_versions=$php_versions" >> $GITHUB_OUTPUT + echo "#### php versions #### : $php_versions" + fi + else + echo "composer.json not found" + exit 1 + fi + + - name: Set up matrix + id: set-matrix + run: | + php_versions="${{ steps.parse-php-versions.outputs.php_versions }}" + + MATRIX_JSON=$(cat reusable-workflows/codeception-tests-configuration/matrix-config.json) + + IFS=',' read -ra VERSIONS_ARRAY <<< "$php_versions" + + FILTERED_MATRIX_JSON=$(echo $MATRIX_JSON | jq --arg php_versions "$php_versions" ' + { + matrix: [ + .configs[] | + select(.php_version == $php_versions) | + .matrix[] + ] + }') + + ENCODED_MATRIX_JSON=$(echo $FILTERED_MATRIX_JSON | jq -c .) + + echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT + codeception-tests: strategy: - matrix: - include: - - { - php-version: "8.4", - dependencies: "highest", - pimcore_version: "12.x-dev as 12.99.9", - experimental: true, - } + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main with: APP_ENV: test diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index 91413900..7cd15b89 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -15,18 +15,73 @@ on: - "[0-9]+.x" jobs: + setup-matrix: + runs-on: ubuntu-latest + outputs: + php_versions: ${{ steps.parse-php-versions.outputs.php_versions }} + matrix: ${{ steps.set-matrix.outputs.matrix }} + private_repo: ${{ env.PRIVATE_REPO }} + steps: + - name: Checkout PR head (only for pull_request_target) + if: github.event_name == 'pull_request_target' + uses: "actions/checkout@v4" + with: + ref: "refs/pull/${{ github.event.pull_request.number }}/merge" + + - name: Checkout PR head (for push or other events) + if: github.event_name != 'pull_request_target' + uses: "actions/checkout@v4" + + - name: Checkout reusable workflow repo + uses: actions/checkout@v4 + with: + repository: pimcore/workflows-collection-public + ref: main + path: reusable-workflows + + - name: Parse PHP versions from composer.json + id: parse-php-versions + run: | + if [ -f composer.json ]; then + php_versions=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | tr '\n' ',' | sed 's/,$//') + if [ -z "$php_versions" ]; then + echo "No PHP versions found in composer.json" + echo "Setting default PHP value" + echo "php_versions=default" >> $GITHUB_OUTPUT + else + echo "php_versions=$php_versions" >> $GITHUB_OUTPUT + echo "#### php versions #### : $php_versions" + fi + else + echo "composer.json not found" + exit 1 + fi + + - name: Set up matrix + id: set-matrix + run: | + php_versions="${{ steps.parse-php-versions.outputs.php_versions }}" + + MATRIX_JSON=$(cat reusable-workflows/codeception-tests-configuration/matrix-config.json) + + IFS=',' read -ra VERSIONS_ARRAY <<< "$php_versions" + + FILTERED_MATRIX_JSON=$(echo $MATRIX_JSON | jq --arg php_versions "$php_versions" ' + { + matrix: [ + .configs[] | + select(.php_version == $php_versions) | + .matrix[] + ] + }') + + ENCODED_MATRIX_JSON=$(echo $FILTERED_MATRIX_JSON | jq -c .) + + echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT + codeception-tests: strategy: - matrix: - include: - - { php-version: "8.3", dependencies: "lowest", pimcore_version: "", experimental: false } - - { php-version: "8.4", dependencies: "highest", pimcore_version: "", experimental: false } - - { - php-version: "8.4", - dependencies: "highest", - pimcore_version: "12.x-dev as 12.99.9", - experimental: true, - } + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix).matrix }} uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main with: APP_ENV: test From 1dcbf7933ca71da2a77aff8fe0d2378d5f25b3cc Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 12:29:14 +0000 Subject: [PATCH 04/63] Fix: tests --- .github/workflows/elastic-search-codeception.yaml | 9 +++++---- .github/workflows/open-search-codeception.yaml | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index 17d9d5ad..bad7f91f 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -80,6 +80,7 @@ jobs: echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT codeception-tests: + needs: setup-matrix strategy: matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main @@ -87,11 +88,11 @@ jobs: APP_ENV: test PIMCORE_TEST: "1" PRIVATE_REPO: "false" - PHP_VERSION: ${{ matrix.php-version }} + PHP_VERSION: ${{ matrix.matrix.php-version }} DATABASE: "mariadb:10.11" - DEPENDENCIES: ${{ matrix.dependencies }} - EXPERIMENTAL: ${{ matrix.experimental }} - PIMCORE_VERSION: ${{ matrix.pimcore_version }} + DEPENDENCIES: ${{ matrix.matrix.dependencies }} + EXPERIMENTAL: ${{ matrix.matrix.experimental }} + PIMCORE_VERSION: ${{ matrix.matrix.pimcore_version }} REQUIRE_ADMIN_BUNDLE: "false" PIMCORE_ELASTIC_SEARCH_HOST: "39201" PIMCORE_ELASTIC_SEARCH_VERSION: "8.5.3" diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index 7cd15b89..6e7c8dc0 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -80,6 +80,7 @@ jobs: echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT codeception-tests: + needs: setup-matrix strategy: matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix).matrix }} uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main @@ -87,11 +88,11 @@ jobs: APP_ENV: test PIMCORE_TEST: "1" PRIVATE_REPO: "false" - PHP_VERSION: ${{ matrix.php-version }} + PHP_VERSION: ${{ matrix.matrix.php-version }} DATABASE: "mariadb:10.11" - DEPENDENCIES: ${{ matrix.dependencies }} - EXPERIMENTAL: ${{ matrix.experimental }} - PIMCORE_VERSION: ${{ matrix.pimcore_version }} + DEPENDENCIES: ${{ matrix.matrix.dependencies }} + EXPERIMENTAL: ${{ matrix.matrix.experimental }} + PIMCORE_VERSION: ${{ matrix.matrix.pimcore_version }} REQUIRE_ADMIN_BUNDLE: "false" PIMCORE_OPEN_SEARCH_HOST: "39200" PIMCORE_OPENSEARCH_VERSION: "2" From a0b5b300876d82bb0d7e6d567abb4dc0ee84ed16 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 12:39:34 +0000 Subject: [PATCH 05/63] Fix: tests --- .github/workflows/elastic-search-codeception.yaml | 7 +++++++ .github/workflows/open-search-codeception.yaml | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index bad7f91f..668543da 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -13,6 +13,13 @@ on: branches: - "[0-9]+.[0-9]+" - "[0-9]+.x" +env: + PIMCORE_PROJECT_ROOT: ${{ github.workspace }} + PRIVATE_REPO: ${{ github.event.repository.private }} + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + cancel-in-progress: true jobs: setup-matrix: diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index 6e7c8dc0..687581fd 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -14,6 +14,14 @@ on: - "[0-9]+.[0-9]+" - "[0-9]+.x" +env: + PIMCORE_PROJECT_ROOT: ${{ github.workspace }} + PRIVATE_REPO: ${{ github.event.repository.private }} + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} + cancel-in-progress: true + jobs: setup-matrix: runs-on: ubuntu-latest @@ -82,7 +90,7 @@ jobs: codeception-tests: needs: setup-matrix strategy: - matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix).matrix }} + matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }} uses: pimcore/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main with: APP_ENV: test From f61048873a8ee298f995b5784a3589eea0c8cdfc Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 12:57:24 +0000 Subject: [PATCH 06/63] Fix: Tests --- .../setup-pimcore-environment-functional-tests.sh | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100755 .github/ci/scripts/setup-pimcore-environment-functional-tests.sh diff --git a/.github/ci/scripts/setup-pimcore-environment-functional-tests.sh b/.github/ci/scripts/setup-pimcore-environment-functional-tests.sh deleted file mode 100755 index 00e1bd81..00000000 --- a/.github/ci/scripts/setup-pimcore-environment-functional-tests.sh +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -.github/ci/scripts/setup-pimcore-environment.sh - -# Add Elasticsearch config if specified -if [ "$1" == "elasticsearch" ]; then - CONFIG_FILE_PATH="config/packages/test/config.yaml" - echo -e "\n# Added by functional test script\npimcore_generic_data_index:\n index_service:\n client_params:\n client_type: 'elasticsearch'" >> "$CONFIG_FILE_PATH" -fi - -cp .github/ci/files/composer.json . -cp bundles/pimcore/generic-data-index-bundle/codeception.dist.yml . \ No newline at end of file From 5556054aad1286830fc09ab4ee4a6f7ebbe809cf Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 13:09:58 +0000 Subject: [PATCH 07/63] Fix: Tests --- .../workflows/elastic-search-codeception.yaml | 40 ++++--------------- .../workflows/open-search-codeception.yaml | 40 ++++--------------- 2 files changed, 16 insertions(+), 64 deletions(-) diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index 668543da..1b575592 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -29,15 +29,8 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} private_repo: ${{ env.PRIVATE_REPO }} steps: - - name: Checkout PR head (only for pull_request_target) - if: github.event_name == 'pull_request_target' - uses: "actions/checkout@v4" - with: - ref: "refs/pull/${{ github.event.pull_request.number }}/merge" - - - name: Checkout PR head (for push or other events) - if: github.event_name != 'pull_request_target' - uses: "actions/checkout@v4" + - name: Checkout code + uses: actions/checkout@v4 - name: Checkout reusable workflow repo uses: actions/checkout@v4 @@ -52,39 +45,22 @@ jobs: if [ -f composer.json ]; then php_versions=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | tr '\n' ',' | sed 's/,$//') if [ -z "$php_versions" ]; then - echo "No PHP versions found in composer.json" - echo "Setting default PHP value" - echo "php_versions=default" >> $GITHUB_OUTPUT + echo "php_versions=default" >> "$GITHUB_OUTPUT" else - echo "php_versions=$php_versions" >> $GITHUB_OUTPUT - echo "#### php versions #### : $php_versions" + echo "php_versions=$php_versions" >> "$GITHUB_OUTPUT" fi else - echo "composer.json not found" exit 1 fi - - name: Set up matrix + - name: Set up matrix JSON id: set-matrix run: | php_versions="${{ steps.parse-php-versions.outputs.php_versions }}" - MATRIX_JSON=$(cat reusable-workflows/codeception-tests-configuration/matrix-config.json) - - IFS=',' read -ra VERSIONS_ARRAY <<< "$php_versions" - - FILTERED_MATRIX_JSON=$(echo $MATRIX_JSON | jq --arg php_versions "$php_versions" ' - { - matrix: [ - .configs[] | - select(.php_version == $php_versions) | - .matrix[] - ] - }') - - ENCODED_MATRIX_JSON=$(echo $FILTERED_MATRIX_JSON | jq -c .) - - echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT + FILTERED_MATRIX_JSON=$(echo "$MATRIX_JSON" | jq --arg php_versions "$php_versions" '{ matrix: [ .configs[] | select(.php_version == $php_versions) | .matrix[] ] }') + ENCODED_MATRIX_JSON=$(echo "$FILTERED_MATRIX_JSON" | jq -c .) + echo "matrix=$ENCODED_MATRIX_JSON" >> "$GITHUB_OUTPUT" codeception-tests: needs: setup-matrix diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index 687581fd..e3f6b6a1 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -30,15 +30,8 @@ jobs: matrix: ${{ steps.set-matrix.outputs.matrix }} private_repo: ${{ env.PRIVATE_REPO }} steps: - - name: Checkout PR head (only for pull_request_target) - if: github.event_name == 'pull_request_target' - uses: "actions/checkout@v4" - with: - ref: "refs/pull/${{ github.event.pull_request.number }}/merge" - - - name: Checkout PR head (for push or other events) - if: github.event_name != 'pull_request_target' - uses: "actions/checkout@v4" + - name: Checkout code + uses: actions/checkout@v4 - name: Checkout reusable workflow repo uses: actions/checkout@v4 @@ -53,39 +46,22 @@ jobs: if [ -f composer.json ]; then php_versions=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | tr '\n' ',' | sed 's/,$//') if [ -z "$php_versions" ]; then - echo "No PHP versions found in composer.json" - echo "Setting default PHP value" - echo "php_versions=default" >> $GITHUB_OUTPUT + echo "php_versions=default" >> "$GITHUB_OUTPUT" else - echo "php_versions=$php_versions" >> $GITHUB_OUTPUT - echo "#### php versions #### : $php_versions" + echo "php_versions=$php_versions" >> "$GITHUB_OUTPUT" fi else - echo "composer.json not found" exit 1 fi - - name: Set up matrix + - name: Set up matrix JSON id: set-matrix run: | php_versions="${{ steps.parse-php-versions.outputs.php_versions }}" - MATRIX_JSON=$(cat reusable-workflows/codeception-tests-configuration/matrix-config.json) - - IFS=',' read -ra VERSIONS_ARRAY <<< "$php_versions" - - FILTERED_MATRIX_JSON=$(echo $MATRIX_JSON | jq --arg php_versions "$php_versions" ' - { - matrix: [ - .configs[] | - select(.php_version == $php_versions) | - .matrix[] - ] - }') - - ENCODED_MATRIX_JSON=$(echo $FILTERED_MATRIX_JSON | jq -c .) - - echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT + FILTERED_MATRIX_JSON=$(echo "$MATRIX_JSON" | jq --arg php_versions "$php_versions" '{ matrix: [ .configs[] | select(.php_version == $php_versions) | .matrix[] ] }') + ENCODED_MATRIX_JSON=$(echo "$FILTERED_MATRIX_JSON" | jq -c .) + echo "matrix=$ENCODED_MATRIX_JSON" >> "$GITHUB_OUTPUT" codeception-tests: needs: setup-matrix From 48ce09b83cd767549bece580c70793efe415b568 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 13:19:11 +0000 Subject: [PATCH 08/63] Fix: Tests --- .github/workflows/elastic-search-codeception.yaml | 12 +++++++----- .github/workflows/open-search-codeception.yaml | 12 +++++++----- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index 1b575592..47e713a8 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -70,7 +70,7 @@ jobs: with: APP_ENV: test PIMCORE_TEST: "1" - PRIVATE_REPO: "false" + PRIVATE_REPO: ${{ needs.setup-matrix.outputs.private_repo }} PHP_VERSION: ${{ matrix.matrix.php-version }} DATABASE: "mariadb:10.11" DEPENDENCIES: ${{ matrix.matrix.dependencies }} @@ -80,8 +80,10 @@ jobs: PIMCORE_ELASTIC_SEARCH_HOST: "39201" PIMCORE_ELASTIC_SEARCH_VERSION: "8.5.3" ENABLE_ELASTICSEARCH: true - COVERAGE: "xdebug" + COVERAGE: "none" secrets: - PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} - PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} - PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} + SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} + COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} + PIMCORE_CI_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} + PIMCORE_CI_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} + PIMCORE_CI_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index e3f6b6a1..144b3a5c 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -71,7 +71,7 @@ jobs: with: APP_ENV: test PIMCORE_TEST: "1" - PRIVATE_REPO: "false" + PRIVATE_REPO: ${{ needs.setup-matrix.outputs.private_repo }} PHP_VERSION: ${{ matrix.matrix.php-version }} DATABASE: "mariadb:10.11" DEPENDENCIES: ${{ matrix.matrix.dependencies }} @@ -81,8 +81,10 @@ jobs: PIMCORE_OPEN_SEARCH_HOST: "39200" PIMCORE_OPENSEARCH_VERSION: "2" ENABLE_ELASTICSEARCH: false - COVERAGE: "xdebug" + COVERAGE: "none" secrets: - PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} - PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} - PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} + SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} + COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} + PIMCORE_CI_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} + PIMCORE_CI_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} + PIMCORE_CI_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} From 12d0a662c68f542367879a18b1fa0abfd4b621d6 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 13:46:33 +0000 Subject: [PATCH 09/63] Revert "Fix: Tests" This reverts commit 48ce09b83cd767549bece580c70793efe415b568. --- .github/workflows/elastic-search-codeception.yaml | 12 +++++------- .github/workflows/open-search-codeception.yaml | 12 +++++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index 47e713a8..1b575592 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -70,7 +70,7 @@ jobs: with: APP_ENV: test PIMCORE_TEST: "1" - PRIVATE_REPO: ${{ needs.setup-matrix.outputs.private_repo }} + PRIVATE_REPO: "false" PHP_VERSION: ${{ matrix.matrix.php-version }} DATABASE: "mariadb:10.11" DEPENDENCIES: ${{ matrix.matrix.dependencies }} @@ -80,10 +80,8 @@ jobs: PIMCORE_ELASTIC_SEARCH_HOST: "39201" PIMCORE_ELASTIC_SEARCH_VERSION: "8.5.3" ENABLE_ELASTICSEARCH: true - COVERAGE: "none" + COVERAGE: "xdebug" secrets: - SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} - COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} - PIMCORE_CI_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} - PIMCORE_CI_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} - PIMCORE_CI_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} + PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} + PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} + PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index 144b3a5c..e3f6b6a1 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -71,7 +71,7 @@ jobs: with: APP_ENV: test PIMCORE_TEST: "1" - PRIVATE_REPO: ${{ needs.setup-matrix.outputs.private_repo }} + PRIVATE_REPO: "false" PHP_VERSION: ${{ matrix.matrix.php-version }} DATABASE: "mariadb:10.11" DEPENDENCIES: ${{ matrix.matrix.dependencies }} @@ -81,10 +81,8 @@ jobs: PIMCORE_OPEN_SEARCH_HOST: "39200" PIMCORE_OPENSEARCH_VERSION: "2" ENABLE_ELASTICSEARCH: false - COVERAGE: "none" + COVERAGE: "xdebug" secrets: - SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} - COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} - PIMCORE_CI_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} - PIMCORE_CI_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} - PIMCORE_CI_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} + PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} + PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} + PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} From f739e0a50c544446afce81aa61589f0adf48c591 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 13:54:35 +0000 Subject: [PATCH 10/63] Fix: Tests --- .github/workflows/elastic-search-codeception.yaml | 2 ++ .github/workflows/open-search-codeception.yaml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/elastic-search-codeception.yaml b/.github/workflows/elastic-search-codeception.yaml index 1b575592..f9affc52 100644 --- a/.github/workflows/elastic-search-codeception.yaml +++ b/.github/workflows/elastic-search-codeception.yaml @@ -82,6 +82,8 @@ jobs: ENABLE_ELASTICSEARCH: true COVERAGE: "xdebug" secrets: + SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} + COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} diff --git a/.github/workflows/open-search-codeception.yaml b/.github/workflows/open-search-codeception.yaml index e3f6b6a1..febf535d 100644 --- a/.github/workflows/open-search-codeception.yaml +++ b/.github/workflows/open-search-codeception.yaml @@ -83,6 +83,8 @@ jobs: ENABLE_ELASTICSEARCH: false COVERAGE: "xdebug" secrets: + SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER: ${{ secrets.SSH_PRIVATE_KEY_PIMCORE_DEPLOYMENTS_USER }} + COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN: ${{ secrets.COMPOSER_PIMCORE_REPO_PACKAGIST_TOKEN }} PIMCORE_INSTANCE_IDENTIFIER: ${{ secrets.PIMCORE_CI_INSTANCE_IDENTIFIER }} PIMCORE_ENCRYPTION_SECRET: ${{ secrets.PIMCORE_CI_ENCRYPTION_SECRET }} PIMCORE_PRODUCT_KEY: ${{ secrets.PIMCORE_CI_PRODUCT_KEY }} From 2e94bed022adee2f14af781e26253f55013fd98a Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:09:18 +0000 Subject: [PATCH 11/63] Fix: Tests --- composer.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 5e87062f..324a5b09 100644 --- a/composer.json +++ b/composer.json @@ -47,7 +47,10 @@ "autoload-dev": { "psr-4": { "Pimcore\\Bundle\\GenericDataIndexBundle\\Tests\\": "tests/" - } + }, + "files": [ + "kernel/Kernel.php" + ] }, "extra": { "branch-alias": { From 2571073c86f009d2cc3cb3b01ef3b5d18b6c66fa Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:28:20 +0000 Subject: [PATCH 12/63] Fix: Tests --- .github/ci/files/config/services.yaml | 16 ----- .github/ci/files/config/services_test.yaml | 83 ++++++++++++---------- 2 files changed, 47 insertions(+), 52 deletions(-) delete mode 100644 .github/ci/files/config/services.yaml diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml deleted file mode 100644 index afa4b7e5..00000000 --- a/.github/ci/files/config/services.yaml +++ /dev/null @@ -1,16 +0,0 @@ -parameters: - secret: ThisTokenIsNotSoSecretChangeIt - -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - # - # INSTALLER - # - Pimcore\Bundle\GenericDataIndexBundle\Installer: - public: true - arguments: - $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" \ No newline at end of file diff --git a/.github/ci/files/config/services_test.yaml b/.github/ci/files/config/services_test.yaml index 82037b2f..95791b16 100644 --- a/.github/ci/files/config/services_test.yaml +++ b/.github/ci/files/config/services_test.yaml @@ -1,37 +1,48 @@ +parameters: + secret: ThisTokenIsNotSoSecretChangeIt + services: - _defaults: - autowire: true - autoconfigure: true - public: true - - generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' - generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' - generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' - generic-data-index.test.service.element-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface' - - test.calculatorservice: - class: Pimcore\Tests\Support\Helper\DataType\Calculator - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService - public: true \ No newline at end of file + _defaults: + autowire: true + autoconfigure: true + public: true + + # + # INSTALLER + # + Pimcore\Bundle\GenericDataIndexBundle\Installer: + public: true + arguments: + $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" + + generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' + generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' + generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' + generic-data-index.test.service.element-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface' + + test.calculatorservice: + class: Pimcore\Tests\Support\Helper\DataType\Calculator + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService + public: true From 769d9195a6762a55cb469f4fc3fa47129bacb6da Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:37:41 +0000 Subject: [PATCH 13/63] Fix: Tests --- .github/ci/files/config/services_test.yaml | 48 ---------------------- 1 file changed, 48 deletions(-) delete mode 100644 .github/ci/files/config/services_test.yaml diff --git a/.github/ci/files/config/services_test.yaml b/.github/ci/files/config/services_test.yaml deleted file mode 100644 index 95791b16..00000000 --- a/.github/ci/files/config/services_test.yaml +++ /dev/null @@ -1,48 +0,0 @@ -parameters: - secret: ThisTokenIsNotSoSecretChangeIt - -services: - _defaults: - autowire: true - autoconfigure: true - public: true - - # - # INSTALLER - # - Pimcore\Bundle\GenericDataIndexBundle\Installer: - public: true - arguments: - $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" - - generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' - generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' - generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' - generic-data-index.test.service.element-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface' - - test.calculatorservice: - class: Pimcore\Tests\Support\Helper\DataType\Calculator - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService - public: true From d7f9912c21b8e2ccff31db54be71819d2490d35b Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:42:50 +0000 Subject: [PATCH 14/63] Fix: Tests --- .../search-index-adapter/default-search.yaml | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/config/services/search-index-adapter/default-search.yaml b/config/services/search-index-adapter/default-search.yaml index e9c88168..ff214d97 100644 --- a/config/services/search-index-adapter/default-search.yaml +++ b/config/services/search-index-adapter/default-search.yaml @@ -1,6 +1,6 @@ imports: - - { resource: 'services/search-index-adapter/default-search/modifiers/*' } - - { resource: 'services/search-index-adapter/default-search/pql-field-name-transformers.yaml' } + - { resource: "default-search/modifiers/*" } + - { resource: "default-search/pql-field-name-transformers.yaml" } services: _defaults: @@ -11,32 +11,32 @@ services: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\SearchIndexServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DefaultSearchService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexAliasServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexAliasService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\BulkOperationService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\PathService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\ElementLockServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\ElementLockService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Pagination\PaginationInfoServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Pagination\PaginationInfoService @@ -56,7 +56,7 @@ services: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexStatsServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexStatsService arguments: - $client: '@generic-data-index.search-client' + $client: "@generic-data-index.search-client" Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexMappingServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexMappingService @@ -73,12 +73,11 @@ services: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\SubQueriesProcessorInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\SubQueriesProcessor - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameValidator\: - resource: '../../../src/SearchIndexAdapter/DefaultSearch/QueryLanguage/FieldNameValidator' - tags: ['pimcore.generic_data_index.pql_field_name_validator'] + resource: "../../../src/SearchIndexAdapter/DefaultSearch/QueryLanguage/FieldNameValidator" + tags: ["pimcore.generic_data_index.pql_field_name_validator"] Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\IndexIconUpdateServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\IndexIconUpdateService arguments: - $client: '@generic-data-index.search-client' \ No newline at end of file + $client: "@generic-data-index.search-client" From 024eca6552dbd507d0b08abb8aa476438cbfef86 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:43:45 +0000 Subject: [PATCH 15/63] Fix: Tests --- .github/ci/files/config/services.yaml | 48 +++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/ci/files/config/services.yaml diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml new file mode 100644 index 00000000..95791b16 --- /dev/null +++ b/.github/ci/files/config/services.yaml @@ -0,0 +1,48 @@ +parameters: + secret: ThisTokenIsNotSoSecretChangeIt + +services: + _defaults: + autowire: true + autoconfigure: true + public: true + + # + # INSTALLER + # + Pimcore\Bundle\GenericDataIndexBundle\Installer: + public: true + arguments: + $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" + + generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' + generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' + generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' + generic-data-index.test.service.element-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface' + + test.calculatorservice: + class: Pimcore\Tests\Support\Helper\DataType\Calculator + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService + public: true From 6d061b07b0132b76f11dd2a7f0772601de92c91e Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:51:57 +0000 Subject: [PATCH 16/63] Fix: Tests --- .github/ci/files/config/services.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 95791b16..e0f3063c 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -1,3 +1,6 @@ +imports: + - { resource: '../../../../../../config/services.yaml' } + parameters: secret: ThisTokenIsNotSoSecretChangeIt From 8b437d8736b385169595a7a3622038dfcbaf116c Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 14:56:20 +0000 Subject: [PATCH 17/63] Fix: Tests --- .github/ci/files/config/services.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index e0f3063c..6c43f039 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -1,6 +1,3 @@ -imports: - - { resource: '../../../../../../config/services.yaml' } - parameters: secret: ThisTokenIsNotSoSecretChangeIt @@ -18,6 +15,10 @@ services: arguments: $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" + # Make SearchIndexConfigService public for tests + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: + public: true + generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' From 3461f12f0c22dafe73c0315adf87edbb652c75e8 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:02:03 +0100 Subject: [PATCH 18/63] Fix: Tests --- .github/ci/files/config/services.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 6c43f039..2cc6c222 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -50,3 +50,6 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService public: true + + Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\DispatchQueueMessagesHandler: + public: true From ce8acc3eafd053c447aad6e0e3f983c7c72f27ff Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:10:29 +0100 Subject: [PATCH 19/63] Fix: Tests --- .github/ci/files/config/services.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 2cc6c222..1d09a10b 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -53,3 +53,14 @@ services: Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\DispatchQueueMessagesHandler: public: true + + Pimcore\Bundle\GenericDataIndexBundle\Repository\IndexQueueRepository: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessagesDispatcher: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ From 8b16ab7e71dacb0d44ad872d3270034bb80c7db9 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:16:02 +0100 Subject: [PATCH 20/63] Fix: Tests --- .github/ci/files/config/services.yaml | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 1d09a10b..ca3a7292 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -63,4 +63,47 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: public: true + # Service locators for field definitions + pimcore.generic_data_index.object.search_index_field_definition_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + public: true + + pimcore.generic_data_index.asset.search_index_field_definition_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + public: true + + pimcore.generic_data_index.asset.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + public: true + + pimcore.generic_data_index.data_object.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + public: true + + pimcore.generic_data_index.asset.mapping_provider_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + public: true + + pimcore.generic_data_index.document.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ From b8722e2b9cf473c0c74d8d43aa79196de1767546 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:19:55 +0100 Subject: [PATCH 21/63] Fix: Tests --- .github/ci/files/config/services.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index ca3a7292..82b5c0b4 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -106,4 +106,8 @@ services: - [ ] public: true + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Modifier\SearchModifierServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\SearchModifierService + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ From def7e522d109dd5640738dd25e8e9cf5f1078b90 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:25:50 +0100 Subject: [PATCH 22/63] Fix: Tests --- .github/ci/files/config/services.yaml | 88 +++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 82b5c0b4..fb240b6c 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -110,4 +110,92 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\SearchModifierService public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchService + public: true + + # Permission Services + Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionService + public: true + + # SearchIndexAdapter Services + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\SearchIndexServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DefaultSearchService + public: true + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexAliasServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexAliasService + public: true + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\BulkOperationService + public: true + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Pagination\PaginationInfoServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Pagination\PaginationInfoService + public: true + + # Search helpers and denormalizers + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProviderInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProvider + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingService + public: true + + # Data Object field definition service + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\FieldDefinitionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionService + public: true + arguments: + - '@pimcore.generic_data_index.object.search_index_field_definition_locator' + + # Asset field definition service + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Asset\FieldDefinitionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionService + public: true + arguments: + - '@pimcore.generic_data_index.asset.search_index_field_definition_locator' + + # Type adapters for index service + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AssetTypeAdapter: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DataObjectTypeAdapter: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DocumentTypeAdapter: + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ From fd42eb6a8a46b64f2db84d655f94b9beb021c72f Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:29:31 +0100 Subject: [PATCH 23/63] Fix: Tests --- .github/ci/files/config/services.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index fb240b6c..54363072 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -170,6 +170,10 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProvider public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolverInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolver + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingService public: true From 24ba5b0a08a51265d896cc2cd9323f33a2df0cc1 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:33:59 +0100 Subject: [PATCH 24/63] Fix: Tests --- .github/ci/files/config/services.yaml | 42 +++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 54363072..27870c0b 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -174,6 +174,48 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolver public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandlerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandler + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandlerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandler + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandlerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandler + public: true + + # Search helpers + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\SearchHelper: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\SearchHelper: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\SearchHelper: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchHelperInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\SearchHelper + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingService public: true From 6c84633bd15fb57d7e2c84ad86d68328aed438a3 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:38:03 +0100 Subject: [PATCH 25/63] Fix: Tests --- .github/ci/files/config/services.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 27870c0b..b374d450 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -178,10 +178,6 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchService public: true - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService - public: true - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListService public: true From 26c20194f9ed48190c4864c6f9db5b20c4adcd0a Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:44:18 +0100 Subject: [PATCH 26/63] Fix: Tests --- .github/ci/files/config/services.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index b374d450..c0cc3134 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -162,6 +162,20 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Pagination\PaginationInfoService public: true + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\FetchIdsServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionService + public: true + arguments: + $client: "@generic-data-index.search-client" + # Search helpers and denormalizers Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: public: true From 20ee023dc53307b5135edf4e9d09187a02336635 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Mon, 2 Feb 2026 16:47:57 +0100 Subject: [PATCH 27/63] Fix: Tests --- .github/ci/files/config/services.yaml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index c0cc3134..9f148b59 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -180,6 +180,19 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\SearchIndexAdapter\SearchResultDenormalizer: + public: true + + # Normalizers + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\AssetNormalizer: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DataObjectNormalizer: + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DocumentNormalizer: + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProviderInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProvider public: true From 232dd4d920f9c1c1bb15798b6c36bca455670a6c Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 07:35:41 +0000 Subject: [PATCH 28/63] Fix: tests --- .github/ci/files/config/services.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 9f148b59..b100e1b6 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -27,6 +27,11 @@ services: test.calculatorservice: class: Pimcore\Tests\Support\Helper\DataType\Calculator + # Denormalizers needed for transformers + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService public: true From 4ff72548fe0170509ececc3b15332731536e1682 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 07:43:42 +0000 Subject: [PATCH 29/63] Fix: tests --- .github/ci/files/config/services.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index b100e1b6..c4e59bf9 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -27,7 +27,7 @@ services: test.calculatorservice: class: Pimcore\Tests\Support\Helper\DataType\Calculator - # Denormalizers needed for transformers + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ From 8bdac845e0c3f3c698a8bf0ae425e2ea2ef21f88 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 07:53:38 +0000 Subject: [PATCH 30/63] Fix: tests --- .github/ci/files/config/services.yaml | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index c4e59bf9..8ba6d8e4 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -40,6 +40,45 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService public: true + # Serializer services for Assets + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandlerService: + arguments: + - '@pimcore.generic_data_index.asset.type_serialization_handler_locator' + + pimcore.generic_data_index.asset.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ + + # Serializer services for Documents + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandlerService: + arguments: + - '@pimcore.generic_data_index.document.type_serialization_handler_locator' + + pimcore.generic_data_index.document.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ + + # Serializer services for DataObjects + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandlerService: + arguments: + - '@pimcore.generic_data_index.data_object.type_serialization_handler_locator' + + pimcore.generic_data_index.data_object.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer public: true From 2a121ad9d57566a80dbf5f5feb9f5789c65c456c Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 07:59:59 +0000 Subject: [PATCH 31/63] Fix: tests --- .github/ci/files/config/services.yaml | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 8ba6d8e4..8366e8f5 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -40,43 +40,23 @@ services: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService public: true - # Serializer services for Assets + # Serializer services Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandlerService: arguments: - '@pimcore.generic_data_index.asset.type_serialization_handler_locator' - pimcore.generic_data_index.asset.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ - # Serializer services for Documents Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandlerService: arguments: - '@pimcore.generic_data_index.document.type_serialization_handler_locator' - pimcore.generic_data_index.document.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ - # Serializer services for DataObjects Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandlerService: arguments: - '@pimcore.generic_data_index.data_object.type_serialization_handler_locator' - pimcore.generic_data_index.data_object.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: From c7e9b7f1d636a1db508c9a05704dd2a2a749032f Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 08:04:44 +0000 Subject: [PATCH 32/63] Fix: tests --- .github/ci/files/config/services.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 8366e8f5..cd769dd7 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -77,6 +77,11 @@ services: Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\DispatchQueueMessagesHandler: public: true + arguments: + $queueSettings: + worker_count: 1 + min_batch_size: 5 + max_batch_size: 400 Pimcore\Bundle\GenericDataIndexBundle\Repository\IndexQueueRepository: public: true From 5b454151d90df68051c5aae96e3776ffcc2b92da Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 08:09:29 +0000 Subject: [PATCH 33/63] Fix: tests --- .github/ci/files/config/services.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index cd769dd7..3b712556 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -27,6 +27,21 @@ services: test.calculatorservice: class: Pimcore\Tests\Support\Helper\DataType\Calculator + # Core service interfaces + Pimcore\Bundle\GenericDataIndexBundle\Service\TimeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\TimeService + + Pimcore\Bundle\GenericDataIndexBundle\Service\EventServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\EventService + + Pimcore\Bundle\GenericDataIndexBundle\Service\ElementServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\ElementService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreService + + Pimcore\Bundle\GenericDataIndexBundle\Service\PathServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\PathService Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ From 1919850291836a0fd13008c3ad872c246c3b5773 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 08:13:18 +0000 Subject: [PATCH 34/63] Fix: tests --- .github/ci/files/config/services.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 3b712556..31b9db44 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -43,6 +43,9 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\PathServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\PathService + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasService + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ From ec465fc7a63b4f30c187ffd425495ee8c5249091 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Tue, 3 Feb 2026 08:16:43 +0000 Subject: [PATCH 35/63] Fix: tests --- .github/ci/files/config/services.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 31b9db44..f78d99b0 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -46,6 +46,9 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasService + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageService + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ From 7fd0daea338a321c3bf7e059ba089e08ac198d9b Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Wed, 4 Feb 2026 08:24:12 +0000 Subject: [PATCH 36/63] Fix: tests --- .github/ci/files/config/services.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index f78d99b0..7af74531 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -49,6 +49,9 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageService + Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceService + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ From c4ecc5821c7fd0c023169386e9cdbc0c0fbb0695 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:06:05 +0100 Subject: [PATCH 37/63] Fix: tests --- .github/ci/files/config/services.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 7af74531..347ab07e 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -116,6 +116,14 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsService + public: true + # Service locators for field definitions pimcore.generic_data_index.object.search_index_field_definition_locator: class: Symfony\Component\DependencyInjection\ServiceLocator From 0a4316048ceb59c180bc8290f3e67cf5eb853ce4 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:06:44 +0100 Subject: [PATCH 38/63] Fix: tests --- .github/ci/files/config/doctrine.yaml | 12 ++ .../ci/files/config/doctrine_migrations.yaml | 3 + .github/ci/files/config/pimcore/config.yaml | 194 ++++++++++++++++++ .../pimcore/default_index_settings.yaml | 48 +++++ .../ci/files/config/pimcore/messenger.yaml | 19 ++ .github/ci/files/config/pimcore/routing.yaml | 6 + .github/ci/files/config/services copy.yaml | 53 +++++ .../ci/files/config/services/commands.yaml | 10 + .../ci/files/config/services/dependency.yaml | 8 + .../ci/files/config/services/messenger.yaml | 7 + .../ci/files/config/services/permissions.yaml | 14 ++ .../files/config/services/query-language.yaml | 14 ++ .../ci/files/config/services/registry.yaml | 10 + .../search-index-adapter/default-search.yaml | 83 ++++++++ .../modifiers/modifier-service.yaml | 8 + .../modifiers/search-modifiers.yaml | 25 +++ .../pql-field-name-transformers.yaml | 41 ++++ .../asset/field-definition-adapters.yaml | 34 +++ .../search/asset/mapping-provider.yaml | 20 ++ .../data-object/field-definition-adapters.yml | 185 +++++++++++++++++ .../files/config/services/search/index.yaml | 87 ++++++++ .../services/search/search-services.yaml | 53 +++++ .../ci/files/config/services/serializer.yaml | 115 +++++++++++ .../ci/files/config/services/transformer.yaml | 14 ++ .../ci/files/config/services/workflow.yaml | 8 + .../ci/files/config/services/workspaces.yaml | 8 + 26 files changed, 1079 insertions(+) create mode 100644 .github/ci/files/config/doctrine.yaml create mode 100644 .github/ci/files/config/doctrine_migrations.yaml create mode 100644 .github/ci/files/config/pimcore/config.yaml create mode 100644 .github/ci/files/config/pimcore/default_index_settings.yaml create mode 100644 .github/ci/files/config/pimcore/messenger.yaml create mode 100644 .github/ci/files/config/pimcore/routing.yaml create mode 100644 .github/ci/files/config/services copy.yaml create mode 100644 .github/ci/files/config/services/commands.yaml create mode 100644 .github/ci/files/config/services/dependency.yaml create mode 100644 .github/ci/files/config/services/messenger.yaml create mode 100644 .github/ci/files/config/services/permissions.yaml create mode 100644 .github/ci/files/config/services/query-language.yaml create mode 100644 .github/ci/files/config/services/registry.yaml create mode 100644 .github/ci/files/config/services/search-index-adapter/default-search.yaml create mode 100644 .github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml create mode 100644 .github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml create mode 100644 .github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml create mode 100644 .github/ci/files/config/services/search/asset/field-definition-adapters.yaml create mode 100644 .github/ci/files/config/services/search/asset/mapping-provider.yaml create mode 100644 .github/ci/files/config/services/search/data-object/field-definition-adapters.yml create mode 100644 .github/ci/files/config/services/search/index.yaml create mode 100644 .github/ci/files/config/services/search/search-services.yaml create mode 100644 .github/ci/files/config/services/serializer.yaml create mode 100644 .github/ci/files/config/services/transformer.yaml create mode 100644 .github/ci/files/config/services/workflow.yaml create mode 100644 .github/ci/files/config/services/workspaces.yaml diff --git a/.github/ci/files/config/doctrine.yaml b/.github/ci/files/config/doctrine.yaml new file mode 100644 index 00000000..04b5bbc7 --- /dev/null +++ b/.github/ci/files/config/doctrine.yaml @@ -0,0 +1,12 @@ +doctrine: + orm: + entity_managers: + default: + connection: default + mappings: + PimcoreGenericDataIndexBundle: + type: attribute + is_bundle: true + dir: "src/Entity" + prefix: Pimcore\Bundle\GenericDataIndexBundle\Entity + alias: PimcoreGenericDataIndex diff --git a/.github/ci/files/config/doctrine_migrations.yaml b/.github/ci/files/config/doctrine_migrations.yaml new file mode 100644 index 00000000..df4fe00f --- /dev/null +++ b/.github/ci/files/config/doctrine_migrations.yaml @@ -0,0 +1,3 @@ +doctrine_migrations: + migrations_paths: + 'Pimcore\Bundle\GenericDataIndexBundle\Migrations': '@PimcoreGenericDataIndexBundle/src/Migrations' \ No newline at end of file diff --git a/.github/ci/files/config/pimcore/config.yaml b/.github/ci/files/config/pimcore/config.yaml new file mode 100644 index 00000000..584a1dce --- /dev/null +++ b/.github/ci/files/config/pimcore/config.yaml @@ -0,0 +1,194 @@ +imports: + - { resource: messenger.yaml } + +pimcore_generic_data_index: + index_service: + search_settings: + list_page_size: 60 + list_max_filter_options: 500 + search_analyzer_attributes: + text: + fields: + analyzed_ngram: + type: text + analyzer: generic_data_index_ngram_analyzer + search_analyzer: generic_data_index_whitespace_analyzer + analyzed: + type: text + analyzer: standard + search_analyzer: generic_data_index_whitespace_analyzer + system_fields_settings: + general: + id: + type: long + elementType: + type: keyword + parentId: + type: long + creationDate: + type: date + modificationDate: + type: date + type: + type: keyword + key: + type: keyword + fields: + analyzed_ngram: + type: text + analyzer: generic_data_index_ngram_analyzer + search_analyzer: generic_data_index_whitespace_analyzer + analyzed: + type: text + analyzer: standard + search_analyzer: generic_data_index_whitespace_analyzer + sort: + type: keyword + normalizer: generic_data_index_sort_normalizer + path: + type: text + analyzer: generic_data_index_path_analyzer + fields: + keyword: + type: keyword + sort: + type: keyword + normalizer: generic_data_index_sort_normalizer + fullPath: + type: text + analyzer: generic_data_index_path_analyzer + fields: + keyword: + type: keyword + sort: + type: keyword + normalizer: generic_data_index_sort_normalizer + pathLevels: + type: nested + properties: + level: + type: integer + name: + type: keyword + pathLevel: + type: integer + tags: + type: integer + parentTags: + type: integer + thumbnail: + type: keyword + userOwner: + type: integer + userModification: + type: integer + lock: + type: keyword + hasWorkflowWithPermissions: + type: boolean + dependencies: + type: object + properties: + asset: + type: long + document: + type: long + object: + type: long + document: + published: + type: boolean + index: + type: integer + controller: + type: keyword + template: + type: keyword + contentMainDocumentId: + type: integer + supportsContentMain: + type: boolean + missingRequiredEditable: + type: boolean + staticGeneratorEnabled: + type: boolean + staticGeneratorLifetime: + type: integer + title: + type: keyword + description: + type: keyword + prettyUrl: + type: keyword + sourceId: + type: integer + propertiesFromSource: + type: boolean + childrenFromSource: + type: boolean + subject: + type: keyword + from: + type: keyword + replyTo: + type: keyword + to: + type: keyword + cc: + type: keyword + bcc: + type: keyword + internal: + type: integer + internalType: + type: keyword + direct: + type: keyword + linktype: + type: keyword + href: + type: keyword + data_object: + published: + type: boolean + classname: + type: keyword + fields: + sort: + type: keyword + normalizer: generic_data_index_sort_normalizer + classDefinitionIcon: + type: keyword + index: + type: integer + childrenSortBy: + type: keyword + childrenSortOrder: + type: keyword + asset: + mimetype: + type: keyword + fileSize: + type: long + thumbnail: + type: keyword + imageThumbnail: + type: keyword + width: + type: integer + height: + type: integer + duration: + type: float + text: + type: keyword + ignore_above: 256 + fields: + analyzed_ngram: + type: text + analyzer: generic_data_index_ngram_analyzer + search_analyzer: generic_data_index_whitespace_analyzer + analyzed: + type: text + analyzer: standard + search_analyzer: generic_data_index_whitespace_analyzer \ No newline at end of file diff --git a/.github/ci/files/config/pimcore/default_index_settings.yaml b/.github/ci/files/config/pimcore/default_index_settings.yaml new file mode 100644 index 00000000..968f5a2a --- /dev/null +++ b/.github/ci/files/config/pimcore/default_index_settings.yaml @@ -0,0 +1,48 @@ +index: + mapping: + nested_fields: + limit: 200 + total_fields: + limit: 100000 +number_of_shards: 1 +number_of_replicas: 0 +max_ngram_diff: 30 +max_result_window: 10000000 +analysis: + analyzer: + generic_data_index_ngram_analyzer: + tokenizer: generic_data_index_ngram_tokenzier + filter: + - lowercase + generic_data_index_whitespace_analyzer: + tokenizer: generic_data_index_whitespace_tokenzier + filter: + - lowercase + generic_data_index_path_analyzer: + tokenizer: generic_data_index_path_tokenizer + normalizer: + generic_data_index_sort_normalizer: + type: custom + filter: + - lowercase + generic_data_index_sort_truncate_normalizer: + type: custom + char_filter: + - generic_data_index_sort_truncate + filter: + - lowercase + tokenizer: + generic_data_index_ngram_tokenzier: + type: ngram + min_gram: 3 + max_gram: 25 + token_chars: [ letter, digit ] + generic_data_index_whitespace_tokenzier: + type: whitespace + generic_data_index_path_tokenizer: + type: "path_hierarchy" + char_filter: + generic_data_index_sort_truncate: + type: pattern_replace + pattern: ^(.{256})(.*)$ + replacement: $1 diff --git a/.github/ci/files/config/pimcore/messenger.yaml b/.github/ci/files/config/pimcore/messenger.yaml new file mode 100644 index 00000000..cc8b2fd4 --- /dev/null +++ b/.github/ci/files/config/pimcore/messenger.yaml @@ -0,0 +1,19 @@ +framework: + messenger: + enabled: true + transports: + pimcore_generic_data_index_queue: + dsn: 'doctrine://default?queue_name=pimcore_generic_data_index_queue' + failure_transport: pimcore_generic_data_index_failed + pimcore_generic_data_index_sync: 'sync://' + pimcore_generic_data_index_failed: 'doctrine://default?queue_name=pimcore_generic_data_index_failed' + routing: + Pimcore\Bundle\GenericDataIndexBundle\Message\IndexUpdateQueueMessage: pimcore_generic_data_index_queue + Pimcore\Bundle\GenericDataIndexBundle\Message\DispatchQueueMessagesMessage: pimcore_generic_data_index_queue + Pimcore\Bundle\GenericDataIndexBundle\Message\UpdateLanguageSettingsMessage: pimcore_generic_data_index_queue + Pimcore\Bundle\GenericDataIndexBundle\Message\UpdateClassMappingMessage: pimcore_generic_data_index_queue + Pimcore\Bundle\GenericDataIndexBundle\Message\EnqueueRelatedIdsMessage: pimcore_generic_data_index_queue + buses: + messenger.bus.pimcore-generic-data-index: + middleware: + - 'Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware' diff --git a/.github/ci/files/config/pimcore/routing.yaml b/.github/ci/files/config/pimcore/routing.yaml new file mode 100644 index 00000000..fa7a8c9b --- /dev/null +++ b/.github/ci/files/config/pimcore/routing.yaml @@ -0,0 +1,6 @@ +pimcore_generic_data_index: + resource: "../../src/Controller/" + type: attribute + prefix: /pimcore_generic_data_index + options: + expose: true diff --git a/.github/ci/files/config/services copy.yaml b/.github/ci/files/config/services copy.yaml new file mode 100644 index 00000000..0a6d918a --- /dev/null +++ b/.github/ci/files/config/services copy.yaml @@ -0,0 +1,53 @@ +imports: + - { resource: 'services/search/*' } + - { resource: 'services/search-index-adapter/*' } + - { resource: 'services/search/data-object/*' } + - { resource: 'services/search/asset/*' } + - { resource: 'services/*' } +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + # controllers are imported separately to make sure they're public + # and have a tag that allows actions to type-hint services + Pimcore\Bundle\GenericDataIndexBundle\Controller\: + resource: '../src/Controller' + public: true + tags: ['controller.service_arguments'] + + Pimcore\Bundle\GenericDataIndexBundle\EventSubscriber\: + resource: '../src/EventSubscriber/*' + + Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\: + resource: '../src/MessageHandler' + tags: [ { name: messenger.message_handler, bus: messenger.bus.pimcore-generic-data-index } ] + + Pimcore\Bundle\GenericDataIndexBundle\Service\EventServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\EventService + + Pimcore\Bundle\GenericDataIndexBundle\Service\ElementServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\ElementService + + Pimcore\Bundle\GenericDataIndexBundle\Service\TimeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\TimeService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreService + + Pimcore\Bundle\GenericDataIndexBundle\Service\PathServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\PathService + + Pimcore\Bundle\GenericDataIndexBundle\Scheduler\GenericDataIndexScheduleProvider: ~ + Pimcore\Bundle\GenericDataIndexBundle\Installer: + public: true + arguments: + $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" + +# add more services, or override services that need manual wiring +# Pimcore\_generic-data-index-bundle\ExampleClass: +# arguments: +# - "@service_id" +# - "plain_value" +# - "%parameter%" diff --git a/.github/ci/files/config/services/commands.yaml b/.github/ci/files/config/services/commands.yaml new file mode 100644 index 00000000..7ab7e80d --- /dev/null +++ b/.github/ci/files/config/services/commands.yaml @@ -0,0 +1,10 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + # auto-register all commands as services + Pimcore\Bundle\GenericDataIndexBundle\Command\: + resource: '../../src/Command/*' + tags: ['console.command'] \ No newline at end of file diff --git a/.github/ci/files/config/services/dependency.yaml b/.github/ci/files/config/services/dependency.yaml new file mode 100644 index 00000000..0d04160c --- /dev/null +++ b/.github/ci/files/config/services/dependency.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Dependency\DependencyServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Dependency\DependencyService \ No newline at end of file diff --git a/.github/ci/files/config/services/messenger.yaml b/.github/ci/files/config/services/messenger.yaml new file mode 100644 index 00000000..c972c0dc --- /dev/null +++ b/.github/ci/files/config/services/messenger.yaml @@ -0,0 +1,7 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ \ No newline at end of file diff --git a/.github/ci/files/config/services/permissions.yaml b/.github/ci/files/config/services/permissions.yaml new file mode 100644 index 00000000..63152f33 --- /dev/null +++ b/.github/ci/files/config/services/permissions.yaml @@ -0,0 +1,14 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionService \ No newline at end of file diff --git a/.github/ci/files/config/services/query-language.yaml b/.github/ci/files/config/services/query-language.yaml new file mode 100644 index 00000000..8e26fca1 --- /dev/null +++ b/.github/ci/files/config/services/query-language.yaml @@ -0,0 +1,14 @@ +services: + _defaults: + autowire: true + autoconfigure: false + public: false + + Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\LexerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\Pql\Lexer + + Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\ParserInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\Pql\Parser + + Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\ProcessorInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\Pql\Processor diff --git a/.github/ci/files/config/services/registry.yaml b/.github/ci/files/config/services/registry.yaml new file mode 100644 index 00000000..40073b50 --- /dev/null +++ b/.github/ci/files/config/services/registry.yaml @@ -0,0 +1,10 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Repository\IndexQueueRepository: + arguments: + - "@doctrine.orm.default_entity_manager" + diff --git a/.github/ci/files/config/services/search-index-adapter/default-search.yaml b/.github/ci/files/config/services/search-index-adapter/default-search.yaml new file mode 100644 index 00000000..ff214d97 --- /dev/null +++ b/.github/ci/files/config/services/search-index-adapter/default-search.yaml @@ -0,0 +1,83 @@ +imports: + - { resource: "default-search/modifiers/*" } + - { resource: "default-search/pql-field-name-transformers.yaml" } + +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\SearchIndexServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DefaultSearchService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexAliasServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexAliasService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\BulkOperationService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\PathService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\ElementLockServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\ElementLockService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Pagination\PaginationInfoServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Pagination\PaginationInfoService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\FetchIdsServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\MappingAnalyzerServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\MappingAnalyzerService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexStatsServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexStatsService + arguments: + $client: "@generic-data-index.search-client" + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexMappingServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexMappingService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Workspace\QueryServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Workspace\QueryService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Workspace\ElementWorkspacesQueryServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Workspace\ElementWorkspacesQueryService + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\QueryLanguage\PqlAdapterInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\PqlAdapter + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\SubQueriesProcessorInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\SubQueriesProcessor + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameValidator\: + resource: "../../../src/SearchIndexAdapter/DefaultSearch/QueryLanguage/FieldNameValidator" + tags: ["pimcore.generic_data_index.pql_field_name_validator"] + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\IndexIconUpdateServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\IndexIconUpdateService + arguments: + $client: "@generic-data-index.search-client" diff --git a/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml b/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml new file mode 100644 index 00000000..5c2c55d7 --- /dev/null +++ b/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Modifier\SearchModifierServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\SearchModifierService \ No newline at end of file diff --git a/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml b/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml new file mode 100644 index 00000000..42bb704d --- /dev/null +++ b/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml @@ -0,0 +1,25 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Aggregation\AssetAggregations: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Aggregation\TreeAggregations: ~ + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\BasicFilters: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\AssetFilters: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\TreeFilters: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\DependencyFilters: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\FieldTypeFilters: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\NestedTypeFilters: ~ + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\FullTextSearch\FullTextSearchHandlers: ~ + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Sort\TreeSortHandlers: ~ + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Sort\OrderByFieldsHandlers: ~ + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\QueryLanguage\QueryLanguageHandlers: ~ + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\Workspace\WorkspaceQueryHandler: ~ \ No newline at end of file diff --git a/.github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml b/.github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml new file mode 100644 index 00000000..cc4f6f04 --- /dev/null +++ b/.github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml @@ -0,0 +1,41 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\AssetMetadataDefaultLanguageTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 9} + - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 9} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\FieldCategoryTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 10} + - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 10} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\IdTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 5} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\ImageGalleryTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 6} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\KeywordTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 0} + - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 0} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\RelationsTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 0} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\SortTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 1} + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\SynonymTransformer: + tags: + - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 11} + - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 11} \ No newline at end of file diff --git a/.github/ci/files/config/services/search/asset/field-definition-adapters.yaml b/.github/ci/files/config/services/search/asset/field-definition-adapters.yaml new file mode 100644 index 00000000..3c993d5f --- /dev/null +++ b/.github/ci/files/config/services/search/asset/field-definition-adapters.yaml @@ -0,0 +1,34 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\TextKeywordAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "input" } + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "textarea" } + + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\KeywordAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "select" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\RelationAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "asset" } + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "document" } + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "object" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\DateAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "date" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\BooleanAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "checkbox" } diff --git a/.github/ci/files/config/services/search/asset/mapping-provider.yaml b/.github/ci/files/config/services/search/asset/mapping-provider.yaml new file mode 100644 index 00000000..fc1730ad --- /dev/null +++ b/.github/ci/files/config/services/search/asset/mapping-provider.yaml @@ -0,0 +1,20 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\PredefinedAssetMetadataProvider: + tags: + - { name: "pimcore.generic_data_index.asset.mapping_provider", type: "predefined" } + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\Asset\MetadataProviderServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\Asset\MetadataProviderService + arguments: + - '@pimcore.generic_data_index.asset.mapping_provider_locator' + + pimcore.generic_data_index.asset.mapping_provider_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] \ No newline at end of file diff --git a/.github/ci/files/config/services/search/data-object/field-definition-adapters.yml b/.github/ci/files/config/services/search/data-object/field-definition-adapters.yml new file mode 100644 index 00000000..67e49500 --- /dev/null +++ b/.github/ci/files/config/services/search/data-object/field-definition-adapters.yml @@ -0,0 +1,185 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\TextKeywordAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "wysiwyg" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "textarea" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "select" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "multiselect" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "input" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "calculatedValue" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "country" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "countrymultiselect" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "language" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "languagemultiselect" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "password" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "user" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "firstname" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "lastname" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "email" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "gender" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\NumericAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "numeric" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "slider" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\DateAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "date" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\DatetimeAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "datetime" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\DateRangeAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "dateRange" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\TimeAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "time" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\LocalizedFieldsAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "localizedfields" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\QuantityValueAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "quantityValue" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\InputQuantityValueAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "inputQuantityValue" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\BooleanAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "checkbox" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "booleanSelect" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\RelationAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "manyToOneRelation" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "manyToManyObjectRelation" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "manyToManyRelation" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "reverseObjectRelation" } + + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\AdvancedManyToManyRelationAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "advancedManyToManyRelation" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "advancedManyToManyObjectRelation" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ObjectBrickAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "objectbricks" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\FieldCollectionAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "fieldcollections" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ClassificationStoreAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "classificationstore" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\RgbaColorAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "rgbaColor" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\QuantityValueRangeAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "quantityValueRange" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\NumericRangeAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "numericRange" } + + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\GeographicPointAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geopoint" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geopolygon" } + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geopolyline" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\GeographicBoundsAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geobounds" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\UrlSlugAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "urlSlug" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\LinkAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "link" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\BlockAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "block" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ConsentAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "consent" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ExternalImageAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "externalImage" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\VideoAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "video" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ImageAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "image" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\AdvancedImageAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "hotspotimage" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ImageGalleryAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "imageGallery" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\TableAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "table" } + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\StructuredTableAdapter: + shared: false + tags: + - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "structuredTable" } \ No newline at end of file diff --git a/.github/ci/files/config/services/search/index.yaml b/.github/ci/files/config/services/search/index.yaml new file mode 100644 index 00000000..2857a213 --- /dev/null +++ b/.github/ci/files/config/services/search/index.yaml @@ -0,0 +1,87 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexEntityServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexEntityService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexElementIndexServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexElementIndexService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexUpdateServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexUpdateService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ReindexServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ReindexService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessagesDispatcher: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\EnqueueServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\EnqueueService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AdapterServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AdapterService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AssetTypeAdapter: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DataObjectTypeAdapter: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DocumentTypeAdapter: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexHandler\AssetIndexHandler: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexHandler\DataObjectIndexHandler: ~ + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\FieldDefinitionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionService + arguments: + - '@pimcore.generic_data_index.object.search_index_field_definition_locator' + + pimcore.generic_data_index.object.search_index_field_definition_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Asset\FieldDefinitionServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionService + arguments: + - '@pimcore.generic_data_index.asset.search_index_field_definition_locator' + + pimcore.generic_data_index.asset.search_index_field_definition_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexHandler\DocumentIndexHandler: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingService + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ClassDefinition\ClassDefinitionReindexServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ClassDefinition\ClassDefinitionReindexService diff --git a/.github/ci/files/config/services/search/search-services.yaml b/.github/ci/files/config/services/search/search-services.yaml new file mode 100644 index 00000000..682cf04f --- /dev/null +++ b/.github/ci/files/config/services/search/search-services.yaml @@ -0,0 +1,53 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\SearchHelper: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\SearchHelper: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\SearchHelper: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchHelperInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\SearchHelper + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProviderInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProvider + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolverInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolver + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandlerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandler + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListService + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandlerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandler + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandlerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandler + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationService \ No newline at end of file diff --git a/.github/ci/files/config/services/serializer.yaml b/.github/ci/files/config/services/serializer.yaml new file mode 100644 index 00000000..9409a4f9 --- /dev/null +++ b/.github/ci/files/config/services/serializer.yaml @@ -0,0 +1,115 @@ +services: + _defaults: + autowire: true + autoconfigure: false + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DataObjectNormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\AssetNormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DocumentNormalizer: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\SearchIndexAdapter\SearchResultDenormalizer: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\ImageSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: image } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\FolderSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: folder } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\ArchiveSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: archive } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\AudioSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: audio } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\DocumentSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: document } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\TextSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: text } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\UnknownSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: unknown } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\VideoSerializationHandler: + tags: + - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: video } + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandlerService: + arguments: + - '@pimcore.generic_data_index.asset.type_serialization_handler_locator' + + pimcore.generic_data_index.asset.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandler\FolderSerializationHandler: + tags: + - { name: pimcore.generic_data_index.data_object_type_serialization_handler, type: folder } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandlerService: + arguments: + - '@pimcore.generic_data_index.data_object.type_serialization_handler_locator' + + pimcore.generic_data_index.data_object.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\PageSerializationHandler: + tags: + - { name: pimcore.generic_data_index.document_type_serialization_handler, type: page } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\SnippetSerializationHandler: + tags: + - { name: pimcore.generic_data_index.document_type_serialization_handler, type: snippet } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\EmailSerializationHandler: + tags: + - { name: pimcore.generic_data_index.document_type_serialization_handler, type: email } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\LinkSerializationHandler: + tags: + - { name: pimcore.generic_data_index.document_type_serialization_handler, type: link } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\HardLinkSerializationHandler: + tags: + - { name: pimcore.generic_data_index.document_type_serialization_handler, type: hardlink } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\FolderSerializationHandler: + tags: + - { name: pimcore.generic_data_index.document_type_serialization_handler, type: folder } + + + Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandlerService: + arguments: + - '@pimcore.generic_data_index.document.type_serialization_handler_locator' + + pimcore.generic_data_index.document.type_serialization_handler_locator: + class: Symfony\Component\DependencyInjection\ServiceLocator + tags: [ 'container.service_locator' ] + arguments: + - [ ] \ No newline at end of file diff --git a/.github/ci/files/config/services/transformer.yaml b/.github/ci/files/config/services/transformer.yaml new file mode 100644 index 00000000..b8629b97 --- /dev/null +++ b/.github/ci/files/config/services/transformer.yaml @@ -0,0 +1,14 @@ +services: + _defaults: + autowire: true + autoconfigure: false + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer \ No newline at end of file diff --git a/.github/ci/files/config/services/workflow.yaml b/.github/ci/files/config/services/workflow.yaml new file mode 100644 index 00000000..7b9cd769 --- /dev/null +++ b/.github/ci/files/config/services/workflow.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Workflow\WorkflowServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Workflow\WorkflowService \ No newline at end of file diff --git a/.github/ci/files/config/services/workspaces.yaml b/.github/ci/files/config/services/workspaces.yaml new file mode 100644 index 00000000..7d59725a --- /dev/null +++ b/.github/ci/files/config/services/workspaces.yaml @@ -0,0 +1,8 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: false + + Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceService From 52b5f54a23ed365f62193445e936640a050f50a4 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:07:23 +0100 Subject: [PATCH 39/63] Fix: tests --- .github/ci/files/config/services copy.yaml | 53 ---- .github/ci/files/config/services.yaml | 336 ++------------------- 2 files changed, 29 insertions(+), 360 deletions(-) delete mode 100644 .github/ci/files/config/services copy.yaml diff --git a/.github/ci/files/config/services copy.yaml b/.github/ci/files/config/services copy.yaml deleted file mode 100644 index 0a6d918a..00000000 --- a/.github/ci/files/config/services copy.yaml +++ /dev/null @@ -1,53 +0,0 @@ -imports: - - { resource: 'services/search/*' } - - { resource: 'services/search-index-adapter/*' } - - { resource: 'services/search/data-object/*' } - - { resource: 'services/search/asset/*' } - - { resource: 'services/*' } -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - # controllers are imported separately to make sure they're public - # and have a tag that allows actions to type-hint services - Pimcore\Bundle\GenericDataIndexBundle\Controller\: - resource: '../src/Controller' - public: true - tags: ['controller.service_arguments'] - - Pimcore\Bundle\GenericDataIndexBundle\EventSubscriber\: - resource: '../src/EventSubscriber/*' - - Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\: - resource: '../src/MessageHandler' - tags: [ { name: messenger.message_handler, bus: messenger.bus.pimcore-generic-data-index } ] - - Pimcore\Bundle\GenericDataIndexBundle\Service\EventServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\EventService - - Pimcore\Bundle\GenericDataIndexBundle\Service\ElementServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\ElementService - - Pimcore\Bundle\GenericDataIndexBundle\Service\TimeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\TimeService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreService - - Pimcore\Bundle\GenericDataIndexBundle\Service\PathServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\PathService - - Pimcore\Bundle\GenericDataIndexBundle\Scheduler\GenericDataIndexScheduleProvider: ~ - Pimcore\Bundle\GenericDataIndexBundle\Installer: - public: true - arguments: - $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" - -# add more services, or override services that need manual wiring -# Pimcore\_generic-data-index-bundle\ExampleClass: -# arguments: -# - "@service_id" -# - "plain_value" -# - "%parameter%" diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 347ab07e..0a6d918a 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -1,35 +1,28 @@ -parameters: - secret: ThisTokenIsNotSoSecretChangeIt - +imports: + - { resource: 'services/search/*' } + - { resource: 'services/search-index-adapter/*' } + - { resource: 'services/search/data-object/*' } + - { resource: 'services/search/asset/*' } + - { resource: 'services/*' } services: _defaults: autowire: true autoconfigure: true - public: true - - # - # INSTALLER - # - Pimcore\Bundle\GenericDataIndexBundle\Installer: - public: true - arguments: - $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" + public: false - # Make SearchIndexConfigService public for tests - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: + # controllers are imported separately to make sure they're public + # and have a tag that allows actions to type-hint services + Pimcore\Bundle\GenericDataIndexBundle\Controller\: + resource: '../src/Controller' public: true + tags: ['controller.service_arguments'] - generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' - generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' - generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' - generic-data-index.test.service.element-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface' - - test.calculatorservice: - class: Pimcore\Tests\Support\Helper\DataType\Calculator + Pimcore\Bundle\GenericDataIndexBundle\EventSubscriber\: + resource: '../src/EventSubscriber/*' - # Core service interfaces - Pimcore\Bundle\GenericDataIndexBundle\Service\TimeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\TimeService + Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\: + resource: '../src/MessageHandler' + tags: [ { name: messenger.message_handler, bus: messenger.bus.pimcore-generic-data-index } ] Pimcore\Bundle\GenericDataIndexBundle\Service\EventServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\EventService @@ -37,295 +30,24 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\ElementServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\ElementService + Pimcore\Bundle\GenericDataIndexBundle\Service\TimeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\TimeService + Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreService Pimcore\Bundle\GenericDataIndexBundle\Service\PathServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\PathService - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService - public: true - - # Serializer services - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandlerService: - arguments: - - '@pimcore.generic_data_index.asset.type_serialization_handler_locator' - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandlerService: - arguments: - - '@pimcore.generic_data_index.document.type_serialization_handler_locator' - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandlerService: - arguments: - - '@pimcore.generic_data_index.data_object.type_serialization_handler_locator' - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\DispatchQueueMessagesHandler: - public: true - arguments: - $queueSettings: - worker_count: 1 - min_batch_size: 5 - max_batch_size: 400 - - Pimcore\Bundle\GenericDataIndexBundle\Repository\IndexQueueRepository: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessagesDispatcher: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsService - public: true - - # Service locators for field definitions - pimcore.generic_data_index.object.search_index_field_definition_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - public: true - - pimcore.generic_data_index.asset.search_index_field_definition_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - public: true - - pimcore.generic_data_index.asset.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - public: true - - pimcore.generic_data_index.data_object.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - public: true - - pimcore.generic_data_index.asset.mapping_provider_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - public: true - - pimcore.generic_data_index.document.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - public: true - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Modifier\SearchModifierServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\SearchModifierService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchService - public: true - - # Permission Services - Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionService - public: true - - # SearchIndexAdapter Services - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\SearchIndexServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DefaultSearchService - public: true - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexAliasServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexAliasService - public: true - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\BulkOperationService - public: true - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Pagination\PaginationInfoServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Pagination\PaginationInfoService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\FetchIdsServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionService - public: true - arguments: - $client: "@generic-data-index.search-client" - - # Search helpers and denormalizers - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\SearchIndexAdapter\SearchResultDenormalizer: - public: true - - # Normalizers - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\AssetNormalizer: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DataObjectNormalizer: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DocumentNormalizer: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProviderInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProvider - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolverInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolver - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationService - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandlerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandler - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandlerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandler - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandlerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandler - public: true - - # Search helpers - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\SearchHelper: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\SearchHelper: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\SearchHelper: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchHelperInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\SearchHelper - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingService - public: true - - # Data Object field definition service - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\FieldDefinitionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionService - public: true - arguments: - - '@pimcore.generic_data_index.object.search_index_field_definition_locator' - - # Asset field definition service - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Asset\FieldDefinitionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionService + Pimcore\Bundle\GenericDataIndexBundle\Scheduler\GenericDataIndexScheduleProvider: ~ + Pimcore\Bundle\GenericDataIndexBundle\Installer: public: true arguments: - - '@pimcore.generic_data_index.asset.search_index_field_definition_locator' - - # Type adapters for index service - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AssetTypeAdapter: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DataObjectTypeAdapter: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DocumentTypeAdapter: - public: true + $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" - Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ +# add more services, or override services that need manual wiring +# Pimcore\_generic-data-index-bundle\ExampleClass: +# arguments: +# - "@service_id" +# - "plain_value" +# - "%parameter%" From ae2667ad156703b586bee6b91c1d187ecb8bce00 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:12:58 +0100 Subject: [PATCH 40/63] Fix: tests --- .github/ci/files/config/packages/test/config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ci/files/config/packages/test/config.yaml b/.github/ci/files/config/packages/test/config.yaml index 1172b0a3..72062784 100644 --- a/.github/ci/files/config/packages/test/config.yaml +++ b/.github/ci/files/config/packages/test/config.yaml @@ -27,6 +27,7 @@ doctrine: bit: boolean parameters: + secret: ThisTokenIsNotSoSecretChangeIt pimcore_test.db.dsn: '%env(PIMCORE_TEST_DB_DSN)%' env(PIMCORE_TEST_DB_DSN): ~ pimcore.encryption.secret: '%env(PIMCORE_ENCRYPTION_SECRET)%' From f5d91b9dd1bc1c2517e9e40189259a93c6a50cad Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:19:12 +0100 Subject: [PATCH 41/63] Fix: tests --- .github/ci/files/config/pimcore/config.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/ci/files/config/pimcore/config.yaml b/.github/ci/files/config/pimcore/config.yaml index 584a1dce..ad785020 100644 --- a/.github/ci/files/config/pimcore/config.yaml +++ b/.github/ci/files/config/pimcore/config.yaml @@ -3,6 +3,10 @@ imports: pimcore_generic_data_index: index_service: + client_params: + client_name: default + client_type: opensearch + index_prefix: pimcore_ search_settings: list_page_size: 60 list_max_filter_options: 500 From 5fb31c10ef388e73cb524fc2a6a75b17e61a654c Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:22:35 +0100 Subject: [PATCH 42/63] Fix: tests --- .github/ci/files/config/pimcore/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ci/files/config/pimcore/config.yaml b/.github/ci/files/config/pimcore/config.yaml index ad785020..2069d1e9 100644 --- a/.github/ci/files/config/pimcore/config.yaml +++ b/.github/ci/files/config/pimcore/config.yaml @@ -5,7 +5,7 @@ pimcore_generic_data_index: index_service: client_params: client_name: default - client_type: opensearch + client_type: openSearch index_prefix: pimcore_ search_settings: list_page_size: 60 From 04edcb1413c8124fc7352bdc5e3086f39e9e127d Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:25:58 +0100 Subject: [PATCH 43/63] Fix: tests --- .github/ci/files/config/pimcore/config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ci/files/config/pimcore/config.yaml b/.github/ci/files/config/pimcore/config.yaml index 2069d1e9..962d45e2 100644 --- a/.github/ci/files/config/pimcore/config.yaml +++ b/.github/ci/files/config/pimcore/config.yaml @@ -5,7 +5,7 @@ pimcore_generic_data_index: index_service: client_params: client_name: default - client_type: openSearch + client_type: 'openSearch' index_prefix: pimcore_ search_settings: list_page_size: 60 From 37c9432b96ec05af4bd3c77c9436ce89879e9c00 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:30:45 +0100 Subject: [PATCH 44/63] Fix: tests --- .github/ci/files/config/services/search/index.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/ci/files/config/services/search/index.yaml b/.github/ci/files/config/services/search/index.yaml index 2857a213..6a147bfe 100644 --- a/.github/ci/files/config/services/search/index.yaml +++ b/.github/ci/files/config/services/search/index.yaml @@ -36,9 +36,6 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageService - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigService - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexService From 132d4d7cc4c145c59a103e01ef464c124e461f01 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Thu, 5 Feb 2026 09:41:46 +0100 Subject: [PATCH 45/63] Fix: tests --- .github/ci/files/config/services/search/index.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ci/files/config/services/search/index.yaml b/.github/ci/files/config/services/search/index.yaml index 6a147bfe..d2c4b062 100644 --- a/.github/ci/files/config/services/search/index.yaml +++ b/.github/ci/files/config/services/search/index.yaml @@ -36,6 +36,9 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageService + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: + public: true + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexService From 449f69a005b943f6c21a7640297a7ec404e187d3 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 10:55:03 +0100 Subject: [PATCH 46/63] Readded services_test.yaml --- .github/ci/files/config/services_test.yaml | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/ci/files/config/services_test.yaml diff --git a/.github/ci/files/config/services_test.yaml b/.github/ci/files/config/services_test.yaml new file mode 100644 index 00000000..bffc08a4 --- /dev/null +++ b/.github/ci/files/config/services_test.yaml @@ -0,0 +1,37 @@ +services: + _defaults: + autowire: true + autoconfigure: true + public: true + + generic-data-index.test.service.asset-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface' + generic-data-index.test.service.data-object-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface' + generic-data-index.test.service.document-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface' + generic-data-index.test.service.element-search-service: '@Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface' + + test.calculatorservice: + class: Pimcore\Tests\Support\Helper\DataType\Calculator + + Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer + public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService + public: true From 7ca5e8ba41ddcc838830a924d549faae1f4d22ec Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 11:03:29 +0100 Subject: [PATCH 47/63] Moving SearchIndexConfigServiceInterface to services_test.yaml, therefore making it public, revert to minimal services.yaml --- .github/ci/files/config/services.yaml | 49 +---- .../ci/files/config/services/commands.yaml | 10 - .../ci/files/config/services/dependency.yaml | 8 - .../ci/files/config/services/messenger.yaml | 7 - .../ci/files/config/services/permissions.yaml | 14 -- .../files/config/services/query-language.yaml | 14 -- .../ci/files/config/services/registry.yaml | 10 - .../search-index-adapter/default-search.yaml | 83 -------- .../modifiers/modifier-service.yaml | 8 - .../modifiers/search-modifiers.yaml | 25 --- .../pql-field-name-transformers.yaml | 41 ---- .../asset/field-definition-adapters.yaml | 34 ---- .../search/asset/mapping-provider.yaml | 20 -- .../data-object/field-definition-adapters.yml | 185 ------------------ .../files/config/services/search/index.yaml | 87 -------- .../services/search/search-services.yaml | 53 ----- .../ci/files/config/services/serializer.yaml | 115 ----------- .../ci/files/config/services/transformer.yaml | 14 -- .../ci/files/config/services/workflow.yaml | 8 - .../ci/files/config/services/workspaces.yaml | 8 - .github/ci/files/config/services_test.yaml | 4 + 21 files changed, 10 insertions(+), 787 deletions(-) delete mode 100644 .github/ci/files/config/services/commands.yaml delete mode 100644 .github/ci/files/config/services/dependency.yaml delete mode 100644 .github/ci/files/config/services/messenger.yaml delete mode 100644 .github/ci/files/config/services/permissions.yaml delete mode 100644 .github/ci/files/config/services/query-language.yaml delete mode 100644 .github/ci/files/config/services/registry.yaml delete mode 100644 .github/ci/files/config/services/search-index-adapter/default-search.yaml delete mode 100644 .github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml delete mode 100644 .github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml delete mode 100644 .github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml delete mode 100644 .github/ci/files/config/services/search/asset/field-definition-adapters.yaml delete mode 100644 .github/ci/files/config/services/search/asset/mapping-provider.yaml delete mode 100644 .github/ci/files/config/services/search/data-object/field-definition-adapters.yml delete mode 100644 .github/ci/files/config/services/search/index.yaml delete mode 100644 .github/ci/files/config/services/search/search-services.yaml delete mode 100644 .github/ci/files/config/services/serializer.yaml delete mode 100644 .github/ci/files/config/services/transformer.yaml delete mode 100644 .github/ci/files/config/services/workflow.yaml delete mode 100644 .github/ci/files/config/services/workspaces.yaml diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml index 0a6d918a..6fc80816 100644 --- a/.github/ci/files/config/services.yaml +++ b/.github/ci/files/config/services.yaml @@ -1,53 +1,16 @@ -imports: - - { resource: 'services/search/*' } - - { resource: 'services/search-index-adapter/*' } - - { resource: 'services/search/data-object/*' } - - { resource: 'services/search/asset/*' } - - { resource: 'services/*' } +parameters: + secret: ThisTokenIsNotSoSecretChangeIt + services: _defaults: autowire: true autoconfigure: true public: false - # controllers are imported separately to make sure they're public - # and have a tag that allows actions to type-hint services - Pimcore\Bundle\GenericDataIndexBundle\Controller\: - resource: '../src/Controller' - public: true - tags: ['controller.service_arguments'] - - Pimcore\Bundle\GenericDataIndexBundle\EventSubscriber\: - resource: '../src/EventSubscriber/*' - - Pimcore\Bundle\GenericDataIndexBundle\MessageHandler\: - resource: '../src/MessageHandler' - tags: [ { name: messenger.message_handler, bus: messenger.bus.pimcore-generic-data-index } ] - - Pimcore\Bundle\GenericDataIndexBundle\Service\EventServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\EventService - - Pimcore\Bundle\GenericDataIndexBundle\Service\ElementServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\ElementService - - Pimcore\Bundle\GenericDataIndexBundle\Service\TimeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\TimeService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SettingsStoreService - - Pimcore\Bundle\GenericDataIndexBundle\Service\PathServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\PathService - - Pimcore\Bundle\GenericDataIndexBundle\Scheduler\GenericDataIndexScheduleProvider: ~ + # + # INSTALLER + # Pimcore\Bundle\GenericDataIndexBundle\Installer: public: true arguments: $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" - -# add more services, or override services that need manual wiring -# Pimcore\_generic-data-index-bundle\ExampleClass: -# arguments: -# - "@service_id" -# - "plain_value" -# - "%parameter%" diff --git a/.github/ci/files/config/services/commands.yaml b/.github/ci/files/config/services/commands.yaml deleted file mode 100644 index 7ab7e80d..00000000 --- a/.github/ci/files/config/services/commands.yaml +++ /dev/null @@ -1,10 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - # auto-register all commands as services - Pimcore\Bundle\GenericDataIndexBundle\Command\: - resource: '../../src/Command/*' - tags: ['console.command'] \ No newline at end of file diff --git a/.github/ci/files/config/services/dependency.yaml b/.github/ci/files/config/services/dependency.yaml deleted file mode 100644 index 0d04160c..00000000 --- a/.github/ci/files/config/services/dependency.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Dependency\DependencyServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Dependency\DependencyService \ No newline at end of file diff --git a/.github/ci/files/config/services/messenger.yaml b/.github/ci/files/config/services/messenger.yaml deleted file mode 100644 index c972c0dc..00000000 --- a/.github/ci/files/config/services/messenger.yaml +++ /dev/null @@ -1,7 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Messenger\Middleware\CollectGarbageMiddleware: ~ \ No newline at end of file diff --git a/.github/ci/files/config/services/permissions.yaml b/.github/ci/files/config/services/permissions.yaml deleted file mode 100644 index 63152f33..00000000 --- a/.github/ci/files/config/services/permissions.yaml +++ /dev/null @@ -1,14 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\ElementPermissionService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\PermissionService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Permission\UserPermissionService \ No newline at end of file diff --git a/.github/ci/files/config/services/query-language.yaml b/.github/ci/files/config/services/query-language.yaml deleted file mode 100644 index 8e26fca1..00000000 --- a/.github/ci/files/config/services/query-language.yaml +++ /dev/null @@ -1,14 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: false - public: false - - Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\LexerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\Pql\Lexer - - Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\ParserInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\Pql\Parser - - Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\ProcessorInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\QueryLanguage\Pql\Processor diff --git a/.github/ci/files/config/services/registry.yaml b/.github/ci/files/config/services/registry.yaml deleted file mode 100644 index 40073b50..00000000 --- a/.github/ci/files/config/services/registry.yaml +++ /dev/null @@ -1,10 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Repository\IndexQueueRepository: - arguments: - - "@doctrine.orm.default_entity_manager" - diff --git a/.github/ci/files/config/services/search-index-adapter/default-search.yaml b/.github/ci/files/config/services/search-index-adapter/default-search.yaml deleted file mode 100644 index ff214d97..00000000 --- a/.github/ci/files/config/services/search-index-adapter/default-search.yaml +++ /dev/null @@ -1,83 +0,0 @@ -imports: - - { resource: "default-search/modifiers/*" } - - { resource: "default-search/pql-field-name-transformers.yaml" } - -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\SearchIndexServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DefaultSearchService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexAliasServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexAliasService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\SearchExecutionService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\BulkOperationService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\PathService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\ElementLockServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\ElementLockService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Pagination\PaginationInfoServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Pagination\PaginationInfoService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\LocateInTreeServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\LocateInTreeService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\FetchIdsServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\FetchIdsBySearchService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\MappingAnalyzerServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\MappingAnalyzerService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexStatsServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexStatsService - arguments: - $client: "@generic-data-index.search-client" - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\IndexMappingServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\IndexMappingService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Workspace\QueryServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Workspace\QueryService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Workspace\ElementWorkspacesQueryServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Workspace\ElementWorkspacesQueryService - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\QueryLanguage\PqlAdapterInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\PqlAdapter - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\SubQueriesProcessorInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\SubQueriesProcessor - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameValidator\: - resource: "../../../src/SearchIndexAdapter/DefaultSearch/QueryLanguage/FieldNameValidator" - tags: ["pimcore.generic_data_index.pql_field_name_validator"] - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\IndexIconUpdateServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\IndexIconUpdateService - arguments: - $client: "@generic-data-index.search-client" diff --git a/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml b/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml deleted file mode 100644 index 5c2c55d7..00000000 --- a/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/modifier-service.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Search\Modifier\SearchModifierServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\SearchModifierService \ No newline at end of file diff --git a/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml b/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml deleted file mode 100644 index 42bb704d..00000000 --- a/.github/ci/files/config/services/search-index-adapter/default-search/modifiers/search-modifiers.yaml +++ /dev/null @@ -1,25 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Aggregation\AssetAggregations: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Aggregation\TreeAggregations: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\BasicFilters: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\AssetFilters: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\TreeFilters: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\DependencyFilters: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\FieldTypeFilters: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\NestedTypeFilters: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\FullTextSearch\FullTextSearchHandlers: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Sort\TreeSortHandlers: ~ - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Sort\OrderByFieldsHandlers: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\QueryLanguage\QueryLanguageHandlers: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Filter\Workspace\WorkspaceQueryHandler: ~ \ No newline at end of file diff --git a/.github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml b/.github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml deleted file mode 100644 index cc4f6f04..00000000 --- a/.github/ci/files/config/services/search-index-adapter/default-search/pql-field-name-transformers.yaml +++ /dev/null @@ -1,41 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\AssetMetadataDefaultLanguageTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 9} - - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 9} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\FieldCategoryTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 10} - - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 10} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\IdTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 5} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\ImageGalleryTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 6} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\KeywordTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 0} - - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 0} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\RelationsTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 0} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\SortTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 1} - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\QueryLanguage\FieldNameTransformer\SynonymTransformer: - tags: - - {name: pimcore.generic_data_index.pql_field_name_transformer, priority: 11} - - {name: pimcore.generic_data_index.pql_field_name_transformer_sort, priority: 11} \ No newline at end of file diff --git a/.github/ci/files/config/services/search/asset/field-definition-adapters.yaml b/.github/ci/files/config/services/search/asset/field-definition-adapters.yaml deleted file mode 100644 index 3c993d5f..00000000 --- a/.github/ci/files/config/services/search/asset/field-definition-adapters.yaml +++ /dev/null @@ -1,34 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\TextKeywordAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "input" } - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "textarea" } - - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\KeywordAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "select" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\RelationAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "asset" } - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "document" } - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "object" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\DateAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "date" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionAdapter\BooleanAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.asset.search_index_field_definition", type: "checkbox" } diff --git a/.github/ci/files/config/services/search/asset/mapping-provider.yaml b/.github/ci/files/config/services/search/asset/mapping-provider.yaml deleted file mode 100644 index fc1730ad..00000000 --- a/.github/ci/files/config/services/search/asset/mapping-provider.yaml +++ /dev/null @@ -1,20 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\PredefinedAssetMetadataProvider: - tags: - - { name: "pimcore.generic_data_index.asset.mapping_provider", type: "predefined" } - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\Asset\MetadataProviderServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\Asset\MetadataProviderService - arguments: - - '@pimcore.generic_data_index.asset.mapping_provider_locator' - - pimcore.generic_data_index.asset.mapping_provider_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] \ No newline at end of file diff --git a/.github/ci/files/config/services/search/data-object/field-definition-adapters.yml b/.github/ci/files/config/services/search/data-object/field-definition-adapters.yml deleted file mode 100644 index 67e49500..00000000 --- a/.github/ci/files/config/services/search/data-object/field-definition-adapters.yml +++ /dev/null @@ -1,185 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\TextKeywordAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "wysiwyg" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "textarea" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "select" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "multiselect" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "input" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "calculatedValue" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "country" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "countrymultiselect" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "language" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "languagemultiselect" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "password" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "user" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "firstname" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "lastname" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "email" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "gender" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\NumericAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "numeric" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "slider" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\DateAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "date" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\DatetimeAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "datetime" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\DateRangeAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "dateRange" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\TimeAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "time" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\LocalizedFieldsAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "localizedfields" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\QuantityValueAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "quantityValue" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\InputQuantityValueAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "inputQuantityValue" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\BooleanAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "checkbox" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "booleanSelect" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\RelationAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "manyToOneRelation" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "manyToManyObjectRelation" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "manyToManyRelation" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "reverseObjectRelation" } - - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\AdvancedManyToManyRelationAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "advancedManyToManyRelation" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "advancedManyToManyObjectRelation" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ObjectBrickAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "objectbricks" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\FieldCollectionAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "fieldcollections" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ClassificationStoreAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "classificationstore" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\RgbaColorAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "rgbaColor" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\QuantityValueRangeAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "quantityValueRange" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\NumericRangeAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "numericRange" } - - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\GeographicPointAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geopoint" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geopolygon" } - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geopolyline" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\GeographicBoundsAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "geobounds" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\UrlSlugAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "urlSlug" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\LinkAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "link" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\BlockAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "block" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ConsentAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "consent" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ExternalImageAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "externalImage" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\VideoAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "video" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ImageAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "image" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\AdvancedImageAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "hotspotimage" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\ImageGalleryAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "imageGallery" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\TableAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "table" } - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionAdapter\StructuredTableAdapter: - shared: false - tags: - - { name: "pimcore.generic_data_index.data-object.search_index_field_definition", type: "structuredTable" } \ No newline at end of file diff --git a/.github/ci/files/config/services/search/index.yaml b/.github/ci/files/config/services/search/index.yaml deleted file mode 100644 index d2c4b062..00000000 --- a/.github/ci/files/config/services/search/index.yaml +++ /dev/null @@ -1,87 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\LanguageService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexEntityServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexEntityService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexElementIndexServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexElementIndexService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexUpdateServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexUpdateService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ReindexServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ReindexService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessagesDispatcher: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\EnqueueServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\EnqueueService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessageService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: - public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AdapterServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AdapterService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\AssetTypeAdapter: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DataObjectTypeAdapter: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\ElementTypeAdapter\DocumentTypeAdapter: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexHandler\AssetIndexHandler: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexHandler\DataObjectIndexHandler: ~ - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DataObject\FieldDefinitionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\DataObject\FieldDefinitionService - arguments: - - '@pimcore.generic_data_index.object.search_index_field_definition_locator' - - pimcore.generic_data_index.object.search_index_field_definition_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - - Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\Asset\FieldDefinitionServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Asset\FieldDefinitionService - arguments: - - '@pimcore.generic_data_index.asset.search_index_field_definition_locator' - - pimcore.generic_data_index.asset.search_index_field_definition_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexHandler\DocumentIndexHandler: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\GlobalIndexAliasService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\CachedSearchIndexMappingService - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ClassDefinition\ClassDefinitionReindexServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\ClassDefinition\ClassDefinitionReindexService diff --git a/.github/ci/files/config/services/search/search-services.yaml b/.github/ci/files/config/services/search/search-services.yaml deleted file mode 100644 index 682cf04f..00000000 --- a/.github/ci/files/config/services/search/search-services.yaml +++ /dev/null @@ -1,53 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\DataObjectSearchService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\DocumentSearchService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\DataObject\SearchHelper: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\SearchHelper: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Document\SearchHelper: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\ElementSearchHelperInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Element\SearchHelper - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProviderInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchProvider - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolverInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\IndexNameResolver - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\TransformToAdapterSearchService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchResultIdListService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandlerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\AssetLazyLoadingHandler - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\RequiredByElementListService - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandlerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DataObjectLazyLoadingHandler - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandlerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchResultItem\LazyLoading\DocumentLazyLoadingHandler - - Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\SearchPqlFieldNameTransformationService \ No newline at end of file diff --git a/.github/ci/files/config/services/serializer.yaml b/.github/ci/files/config/services/serializer.yaml deleted file mode 100644 index 9409a4f9..00000000 --- a/.github/ci/files/config/services/serializer.yaml +++ /dev/null @@ -1,115 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: false - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DataObjectNormalizer: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\AssetNormalizer: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Normalizer\DocumentNormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\AssetSearchResultDenormalizer: ~ - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\SearchIndexAdapter\SearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\ImageSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: image } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\FolderSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: folder } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\ArchiveSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: archive } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\AudioSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: audio } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\DocumentSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: document } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\TextSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: text } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\UnknownSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: unknown } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandler\VideoSerializationHandler: - tags: - - { name: pimcore.generic_data_index.asset_type_serialization_handler, type: video } - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\AssetTypeSerializationHandlerService: - arguments: - - '@pimcore.generic_data_index.asset.type_serialization_handler_locator' - - pimcore.generic_data_index.asset.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DataObjectSearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandler\FolderSerializationHandler: - tags: - - { name: pimcore.generic_data_index.data_object_type_serialization_handler, type: folder } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DataObjectTypeSerializationHandlerService: - arguments: - - '@pimcore.generic_data_index.data_object.type_serialization_handler_locator' - - pimcore.generic_data_index.data_object.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\Denormalizer\Search\DocumentSearchResultDenormalizer: ~ - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\PageSerializationHandler: - tags: - - { name: pimcore.generic_data_index.document_type_serialization_handler, type: page } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\SnippetSerializationHandler: - tags: - - { name: pimcore.generic_data_index.document_type_serialization_handler, type: snippet } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\EmailSerializationHandler: - tags: - - { name: pimcore.generic_data_index.document_type_serialization_handler, type: email } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\LinkSerializationHandler: - tags: - - { name: pimcore.generic_data_index.document_type_serialization_handler, type: link } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\HardLinkSerializationHandler: - tags: - - { name: pimcore.generic_data_index.document_type_serialization_handler, type: hardlink } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandler\FolderSerializationHandler: - tags: - - { name: pimcore.generic_data_index.document_type_serialization_handler, type: folder } - - - Pimcore\Bundle\GenericDataIndexBundle\Service\Serializer\DocumentTypeSerializationHandlerService: - arguments: - - '@pimcore.generic_data_index.document.type_serialization_handler_locator' - - pimcore.generic_data_index.document.type_serialization_handler_locator: - class: Symfony\Component\DependencyInjection\ServiceLocator - tags: [ 'container.service_locator' ] - arguments: - - [ ] \ No newline at end of file diff --git a/.github/ci/files/config/services/transformer.yaml b/.github/ci/files/config/services/transformer.yaml deleted file mode 100644 index b8629b97..00000000 --- a/.github/ci/files/config/services/transformer.yaml +++ /dev/null @@ -1,14 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: false - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\AssetToSearchResultItemTransformer - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DataObjectToSearchResultItemTransformer - - Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformerInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Transformer\SearchResultItem\DocumentToSearchResultItemTransformer \ No newline at end of file diff --git a/.github/ci/files/config/services/workflow.yaml b/.github/ci/files/config/services/workflow.yaml deleted file mode 100644 index 7b9cd769..00000000 --- a/.github/ci/files/config/services/workflow.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Workflow\WorkflowServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Workflow\WorkflowService \ No newline at end of file diff --git a/.github/ci/files/config/services/workspaces.yaml b/.github/ci/files/config/services/workspaces.yaml deleted file mode 100644 index 7d59725a..00000000 --- a/.github/ci/files/config/services/workspaces.yaml +++ /dev/null @@ -1,8 +0,0 @@ -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\Workspace\WorkspaceService diff --git a/.github/ci/files/config/services_test.yaml b/.github/ci/files/config/services_test.yaml index bffc08a4..5b426763 100644 --- a/.github/ci/files/config/services_test.yaml +++ b/.github/ci/files/config/services_test.yaml @@ -35,3 +35,7 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService public: true + + Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: + class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigService + public: true From 3cac8e251cbecad679331309709f45df90a53ccc Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 11:33:04 +0100 Subject: [PATCH 48/63] Overwrite for configureContainer method to prevent double loading --- .github/ci/files/config/config.yaml | 1 - .github/ci/files/config/services.yaml | 16 --------- .github/ci/files/config/services_test.yaml | 4 --- .github/ci/files/kernel/Kernel.php | 42 +++++++++++++++++----- 4 files changed, 34 insertions(+), 29 deletions(-) delete mode 100644 .github/ci/files/config/services.yaml diff --git a/.github/ci/files/config/config.yaml b/.github/ci/files/config/config.yaml index 459522ee..f2c5c29e 100644 --- a/.github/ci/files/config/config.yaml +++ b/.github/ci/files/config/config.yaml @@ -1,3 +1,2 @@ imports: - - { resource: services.yaml } - { resource: system.yaml } \ No newline at end of file diff --git a/.github/ci/files/config/services.yaml b/.github/ci/files/config/services.yaml deleted file mode 100644 index 6fc80816..00000000 --- a/.github/ci/files/config/services.yaml +++ /dev/null @@ -1,16 +0,0 @@ -parameters: - secret: ThisTokenIsNotSoSecretChangeIt - -services: - _defaults: - autowire: true - autoconfigure: true - public: false - - # - # INSTALLER - # - Pimcore\Bundle\GenericDataIndexBundle\Installer: - public: true - arguments: - $bundle: "@=service('kernel').getBundle('PimcoreGenericDataIndexBundle')" diff --git a/.github/ci/files/config/services_test.yaml b/.github/ci/files/config/services_test.yaml index 5b426763..bffc08a4 100644 --- a/.github/ci/files/config/services_test.yaml +++ b/.github/ci/files/config/services_test.yaml @@ -35,7 +35,3 @@ services: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationServiceInterface: class: Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\Aggregation\FileSizeAggregationService public: true - - Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface: - class: Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigService - public: true diff --git a/.github/ci/files/kernel/Kernel.php b/.github/ci/files/kernel/Kernel.php index 69921b00..bf19282e 100644 --- a/.github/ci/files/kernel/Kernel.php +++ b/.github/ci/files/kernel/Kernel.php @@ -1,19 +1,45 @@ getProjectDir() . '/{config}'; + $container->import($configDir . '/{packages}/*.{php,yaml}'); + $container->import($configDir . '/{packages}/' . $this->environment . '/*.{php,yaml}'); + + // Skip loading config/services.yaml — it is the bundle's own service config + // and is already loaded by PimcoreGenericDataIndexExtension::load(). + // Only load the environment-specific services file (e.g., services_test.yaml). + $container->import($configDir . '/{services}_' . $this->environment . '.yaml'); + } } From 684f406e95c226fed4857d3b5dc1014e404d8344 Mon Sep 17 00:00:00 2001 From: robertSt7 Date: Wed, 11 Feb 2026 11:04:56 +0000 Subject: [PATCH 49/63] add codeception stub --- composer.json | 1 + 1 file changed, 1 insertion(+) diff --git a/composer.json b/composer.json index 324a5b09..62dd22d9 100644 --- a/composer.json +++ b/composer.json @@ -31,6 +31,7 @@ "codeception/codeception": "^5.3.4", "codeception/module-asserts": "^3.0", "codeception/module-symfony": "^3.7.1", + "codeception/stub": "^4.1.4", "phpstan/phpstan": "1.12.15", "phpstan/phpstan-symfony": "^1.2.20", "phpunit/phpunit": "^10.5", From 1958a6e90604cd21b0c906952580754b62d69f40 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 12:59:52 +0100 Subject: [PATCH 50/63] Added diagnostics to investigate failing tests --- tests/Functional/Service/PathServiceTest.php | 67 ++++++++++++++++++++ 1 file changed, 67 insertions(+) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index 0677b063..fe54dcae 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -12,7 +12,9 @@ namespace Pimcore\Bundle\GenericDataIndexBundle\Tests\Functional\Service; +use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface; use Pimcore\Tests\Support\Util\TestHelper; class PathServiceTest extends \Codeception\Test\Unit @@ -47,8 +49,73 @@ public function testAssetPathRewrite() ->setKey('test-asset') ->save(); + // DIAGNOSTIC: Check maxSynchronousChildrenRenameLimit before rename + /** @var SearchIndexConfigServiceInterface $configService */ + $configService = $this->tester->grabService(SearchIndexConfigServiceInterface::class); + $renameLimit = $configService->getMaxSynchronousChildrenRenameLimit(); + $searchSettings = $configService->getSearchSettings(); + $this->assertGreaterThan( + 0, + $renameLimit, + sprintf( + 'DIAGNOSTIC: maxSynchronousChildrenRenameLimit is %d (expected 500). searchSettings keys: [%s]. searchSettings dump: %s', + $renameLimit, + implode(', ', array_keys($searchSettings)), + json_encode($searchSettings) + ) + ); + + // DIAGNOSTIC: Check folder is indexed before rename + /** @var PathServiceInterface $pathService */ + $pathService = $this->tester->grabService(PathServiceInterface::class); + $folderIndexedPath = $pathService->getCurrentIndexFullPath($folder); + $this->assertNotNull( + $folderIndexedPath, + 'DIAGNOSTIC: Folder is NOT indexed in OpenSearch before rename' + ); + $this->assertNotEmpty( + $folderIndexedPath, + 'DIAGNOSTIC: Folder indexed path is empty before rename' + ); + + // DIAGNOSTIC: Check asset is indexed before rename + $assetIndexedPathBefore = $pathService->getCurrentIndexFullPath($asset); + $this->assertNotNull( + $assetIndexedPathBefore, + 'DIAGNOSTIC: Asset is NOT indexed in OpenSearch before rename' + ); + $folder->setKey('test-folder')->save(); + // DIAGNOSTIC: Check folder indexed path after rename (should be /test-folder) + $folderIndexedPathAfter = $pathService->getCurrentIndexFullPath($folder); + $this->assertEquals( + '/test-folder', + $folderIndexedPathAfter, + sprintf( + 'DIAGNOSTIC: Folder indexed path after rename is "%s" (expected "/test-folder"). Path before rename was "%s"', + $folderIndexedPathAfter, + $folderIndexedPath + ) + ); + + // DIAGNOSTIC: Check asset indexed path after rename (the actual test) + $assetIndexedPathAfter = $pathService->getCurrentIndexFullPath($asset); + $this->assertEquals( + '/test-folder/test-asset', + $assetIndexedPathAfter, + sprintf( + 'DIAGNOSTIC: Asset indexed path after rename is "%s" (expected "/test-folder/test-asset"). ' + . 'Asset path before rename was "%s". ' + . 'Folder path before rename was "%s". ' + . 'maxSynchronousChildrenRenameLimit=%d', + $assetIndexedPathAfter, + $assetIndexedPathBefore, + $folderIndexedPath, + $renameLimit + ) + ); + /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); From 7a1a1f1f2c5d2b4a1cf6de835785a35c7e5fb43d Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 13:33:34 +0100 Subject: [PATCH 51/63] Adapted config setup for ES, more diagnostics --- .github/ci/files/config/pimcore/config.yaml | 4 - .../ci/scripts/setup-pimcore-environment.sh | 17 ++- tests/Functional/Service/PathServiceTest.php | 106 +++++++++++++++--- 3 files changed, 109 insertions(+), 18 deletions(-) diff --git a/.github/ci/files/config/pimcore/config.yaml b/.github/ci/files/config/pimcore/config.yaml index 962d45e2..584a1dce 100644 --- a/.github/ci/files/config/pimcore/config.yaml +++ b/.github/ci/files/config/pimcore/config.yaml @@ -3,10 +3,6 @@ imports: pimcore_generic_data_index: index_service: - client_params: - client_name: default - client_type: 'openSearch' - index_prefix: pimcore_ search_settings: list_page_size: 60 list_max_filter_options: 500 diff --git a/.github/ci/scripts/setup-pimcore-environment.sh b/.github/ci/scripts/setup-pimcore-environment.sh index 29e5a1d7..f10d688e 100755 --- a/.github/ci/scripts/setup-pimcore-environment.sh +++ b/.github/ci/scripts/setup-pimcore-environment.sh @@ -10,4 +10,19 @@ cp -r .github/ci/files/templates/. templates cp -r .github/ci/files/bin/console bin/console chmod 755 bin/console cp -r .github/ci/files/kernel/. kernel -cp -r .github/ci/files/public/. public \ No newline at end of file +cp -r .github/ci/files/public/. public + +# Detect Elasticsearch: if the ES host is reachable, switch client_type to elasticsearch +if [ -n "${PIMCORE_ELASTIC_SEARCH_HOST:-}" ]; then + if curl -s --max-time 5 "http://${PIMCORE_ELASTIC_SEARCH_HOST}" > /dev/null 2>&1; then + echo "Elasticsearch detected at ${PIMCORE_ELASTIC_SEARCH_HOST}, switching client_type to elasticsearch" + cat >> config/packages/test/config.yaml <<'ESCONFIG' + +# Elasticsearch client type (auto-detected by setup script) +pimcore_generic_data_index: + index_service: + client_params: + client_type: 'elasticsearch' +ESCONFIG + fi +fi \ No newline at end of file diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index fe54dcae..34a8b6c9 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -99,22 +99,102 @@ public function testAssetPathRewrite() ) ); - // DIAGNOSTIC: Check asset indexed path after rename (the actual test) + // DIAGNOSTIC: Check asset indexed path after rename $assetIndexedPathAfter = $pathService->getCurrentIndexFullPath($asset); - $this->assertEquals( - '/test-folder/test-asset', - $assetIndexedPathAfter, - sprintf( - 'DIAGNOSTIC: Asset indexed path after rename is "%s" (expected "/test-folder/test-asset"). ' - . 'Asset path before rename was "%s". ' - . 'Folder path before rename was "%s". ' - . 'maxSynchronousChildrenRenameLimit=%d', + + // If the path rewrite didn't work during save, try calling it manually + // to see if it throws an exception or if the conditions aren't met + if ($assetIndexedPathAfter !== '/test-folder/test-asset') { + // Check what getCurrentIndexFullPath returns for the folder NOW + // (after commit - should be /test-folder) + $folderPathNow = $pathService->getCurrentIndexFullPath($folder); + + // Manually attempt the rewrite and capture any exception + // Note: this will likely return early because folder's indexed path + // now matches getRealFullPath() after commit + $rewriteException = null; + try { + $pathService->rewriteChildrenIndexPaths($folder); + } catch (\Exception $e) { + $rewriteException = $e->getMessage(); + } + + // Now try a direct updateByQuery using the old path to see if OpenSearch can do it + /** @var \Pimcore\SearchClient\SearchClientInterface $client */ + $client = $this->tester->getIndexSearchClient(); + + // First, search for docs with the old folder path to understand the index state + $oldPath = $folderIndexedPath; // the path before rename e.g. /698c7043453b912 + $configService2 = $this->tester->grabService(SearchIndexConfigServiceInterface::class); + $indexName = $configService2->getIndexName('asset'); + + // Count docs matching old path via term query on fullPath + $countOldPath = $client->search([ + 'index' => $indexName, + 'track_total_hits' => true, + 'rest_total_hits_as_int' => true, + 'body' => [ + 'query' => ['term' => ['system_fields.fullPath' => $oldPath]], + 'size' => 0, + ], + ]); + $countOld = $countOldPath['hits']['total'] ?? 'N/A'; + + // Count docs matching new path + $countNewPath = $client->search([ + 'index' => $indexName, + 'track_total_hits' => true, + 'rest_total_hits_as_int' => true, + 'body' => [ + 'query' => ['term' => ['system_fields.fullPath' => '/test-folder']], + 'size' => 0, + ], + ]); + $countNew = $countNewPath['hits']['total'] ?? 'N/A'; + + // Get the asset document directly by ID to see its actual data + $assetDoc = $client->get([ + 'index' => $indexName, + 'id' => $asset->getId(), + ]); + $assetDocPath = $assetDoc['_source']['system_fields']['fullPath'] ?? 'N/A'; + $assetDocSysPath = $assetDoc['_source']['system_fields']['path'] ?? 'N/A'; + + // Flush to ensure visibility + $this->tester->flushIndex(); + + // Check asset path after manual rewrite attempt + $assetPathAfterManualRewrite = $pathService->getCurrentIndexFullPath($asset); + + $this->fail(sprintf( + 'DIAGNOSTIC: Asset path not rewritten during save. ' + . 'Asset indexed path after save: "%s". ' + . 'Asset indexed path after manual rewrite: "%s". ' + . 'Folder indexed path after save: "%s". ' + . 'Folder realFullPath: "%s". ' + . 'Folder indexed path before rename: "%s". ' + . 'Rewrite exception: %s. ' + . 'maxSynchronousChildrenRenameLimit=%d. ' + . 'Docs matching old path "%s": %s. ' + . 'Docs matching new path "/test-folder": %s. ' + . 'Asset doc fullPath (direct GET): "%s". ' + . 'Asset doc path (direct GET): "%s". ' + . 'Index name: "%s"', $assetIndexedPathAfter, - $assetIndexedPathBefore, + $assetPathAfterManualRewrite, + $folderPathNow, + $folder->getRealFullPath(), $folderIndexedPath, - $renameLimit - ) - ); + $rewriteException ?? 'none', + $renameLimit, + $oldPath, + $countOld, + $countNew, + $assetDocPath, + $assetDocSysPath, + $indexName + )); + } /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); From 8477a3ba66af50efe34e2e19cc4d6a1d45f72926 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 13:39:10 +0100 Subject: [PATCH 52/63] Removed credentials for es, not needed with new setup --- .github/ci/files/config/packages/test/config.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/ci/files/config/packages/test/config.yaml b/.github/ci/files/config/packages/test/config.yaml index 72062784..7421ea0f 100644 --- a/.github/ci/files/config/packages/test/config.yaml +++ b/.github/ci/files/config/packages/test/config.yaml @@ -41,9 +41,7 @@ pimcore_elasticsearch_client: es_clients: default: hosts: ['%env(PIMCORE_ELASTIC_SEARCH_HOST)%'] - username: 'elastic' - password: 'somethingsecret' - logger_channel: 'pimcore.elasicsearch' + logger_channel: 'pimcore.elasticsearch' ssl_verification: false pimcore: From dd53159b5d2bcdf7eb43687e0a0d5408202fa9a8 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 13:49:02 +0100 Subject: [PATCH 53/63] Added diagnostics for update query --- tests/Functional/Service/PathServiceTest.php | 138 ++++++++++--------- 1 file changed, 71 insertions(+), 67 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index 34a8b6c9..c61e83dd 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -102,96 +102,100 @@ public function testAssetPathRewrite() // DIAGNOSTIC: Check asset indexed path after rename $assetIndexedPathAfter = $pathService->getCurrentIndexFullPath($asset); - // If the path rewrite didn't work during save, try calling it manually - // to see if it throws an exception or if the conditions aren't met + // If the path rewrite didn't work during save, capture detailed diagnostics if ($assetIndexedPathAfter !== '/test-folder/test-asset') { - // Check what getCurrentIndexFullPath returns for the folder NOW - // (after commit - should be /test-folder) - $folderPathNow = $pathService->getCurrentIndexFullPath($folder); - - // Manually attempt the rewrite and capture any exception - // Note: this will likely return early because folder's indexed path - // now matches getRealFullPath() after commit - $rewriteException = null; - try { - $pathService->rewriteChildrenIndexPaths($folder); - } catch (\Exception $e) { - $rewriteException = $e->getMessage(); - } - - // Now try a direct updateByQuery using the old path to see if OpenSearch can do it /** @var \Pimcore\SearchClient\SearchClientInterface $client */ $client = $this->tester->getIndexSearchClient(); - - // First, search for docs with the old folder path to understand the index state - $oldPath = $folderIndexedPath; // the path before rename e.g. /698c7043453b912 + $oldPath = $folderIndexedPath; $configService2 = $this->tester->grabService(SearchIndexConfigServiceInterface::class); $indexName = $configService2->getIndexName('asset'); - // Count docs matching old path via term query on fullPath - $countOldPath = $client->search([ + // Try running the exact same updateByQuery that PathService would run + // using the OLD path (which is still on the asset) + $updateByQueryResult = null; + $updateByQueryError = null; + try { + $updateByQueryResult = $client->updateByQuery([ + 'index' => $indexName, + 'refresh' => true, + 'conflicts' => 'proceed', + 'body' => [ + 'script' => [ + 'lang' => 'painless', + 'source' => 'ctx._source.system_fields.fullPath = params.newPath + ctx._source.system_fields.key; ctx._source.system_fields.path = params.newPath;', + 'params' => [ + 'newPath' => '/test-folder/', + ], + ], + 'query' => [ + 'term' => [ + 'system_fields.fullPath' => $oldPath, + ], + ], + ], + ]); + } catch (\Exception $e) { + $updateByQueryError = $e->getMessage(); + } + + // Check asset after our manual updateByQuery + $assetPathAfterManualUBQ = $pathService->getCurrentIndexFullPath($asset); + + // Also try a match query instead of term to see if analysis difference matters + $matchResult = $client->search([ 'index' => $indexName, - 'track_total_hits' => true, - 'rest_total_hits_as_int' => true, 'body' => [ - 'query' => ['term' => ['system_fields.fullPath' => $oldPath]], - 'size' => 0, + 'query' => ['match' => ['system_fields.fullPath' => $oldPath]], ], ]); - $countOld = $countOldPath['hits']['total'] ?? 'N/A'; + $matchCount = $matchResult['hits']['total']['value'] ?? ($matchResult['hits']['total'] ?? 'N/A'); - // Count docs matching new path - $countNewPath = $client->search([ + // Also try with keyword subfield + $keywordResult = $client->search([ 'index' => $indexName, - 'track_total_hits' => true, - 'rest_total_hits_as_int' => true, 'body' => [ - 'query' => ['term' => ['system_fields.fullPath' => '/test-folder']], - 'size' => 0, + 'query' => ['wildcard' => ['system_fields.fullPath.keyword' => $oldPath . '/*']], ], ]); - $countNew = $countNewPath['hits']['total'] ?? 'N/A'; + $keywordCount = $keywordResult['hits']['total']['value'] ?? ($keywordResult['hits']['total'] ?? 'N/A'); - // Get the asset document directly by ID to see its actual data - $assetDoc = $client->get([ + // Get all docs to see what's in the index + $allDocs = $client->search([ 'index' => $indexName, - 'id' => $asset->getId(), + 'body' => [ + 'query' => ['match_all' => (object)[]], + '_source' => ['system_fields.fullPath', 'system_fields.path', 'system_fields.key'], + 'size' => 20, + ], ]); - $assetDocPath = $assetDoc['_source']['system_fields']['fullPath'] ?? 'N/A'; - $assetDocSysPath = $assetDoc['_source']['system_fields']['path'] ?? 'N/A'; - - // Flush to ensure visibility - $this->tester->flushIndex(); - - // Check asset path after manual rewrite attempt - $assetPathAfterManualRewrite = $pathService->getCurrentIndexFullPath($asset); + $allDocsSummary = []; + foreach ($allDocs['hits']['hits'] as $hit) { + $allDocsSummary[] = sprintf( + 'id=%s fullPath=%s', + $hit['_id'], + $hit['_source']['system_fields']['fullPath'] ?? 'N/A' + ); + } $this->fail(sprintf( - 'DIAGNOSTIC: Asset path not rewritten during save. ' - . 'Asset indexed path after save: "%s". ' - . 'Asset indexed path after manual rewrite: "%s". ' - . 'Folder indexed path after save: "%s". ' - . 'Folder realFullPath: "%s". ' - . 'Folder indexed path before rename: "%s". ' - . 'Rewrite exception: %s. ' - . 'maxSynchronousChildrenRenameLimit=%d. ' - . 'Docs matching old path "%s": %s. ' - . 'Docs matching new path "/test-folder": %s. ' - . 'Asset doc fullPath (direct GET): "%s". ' - . 'Asset doc path (direct GET): "%s". ' + 'DIAGNOSTIC: Asset path not rewritten. ' + . 'Asset path after save: "%s". ' + . 'Asset path after manual updateByQuery: "%s". ' + . 'updateByQuery result: %s. ' + . 'updateByQuery error: %s. ' + . 'match query count for old path: %s. ' + . 'keyword wildcard count for old path children: %s. ' + . 'All docs in index: [%s]. ' + . 'Folder path before rename: "%s". ' . 'Index name: "%s"', $assetIndexedPathAfter, - $assetPathAfterManualRewrite, - $folderPathNow, - $folder->getRealFullPath(), + $assetPathAfterManualUBQ, + json_encode($updateByQueryResult), + $updateByQueryError ?? 'none', + $matchCount, + $keywordCount, + implode(' | ', $allDocsSummary), $folderIndexedPath, - $rewriteException ?? 'none', - $renameLimit, - $oldPath, - $countOld, - $countNew, - $assetDocPath, - $assetDocSysPath, $indexName )); } From b962c2ea82fdff7081d146ba627a0822964e4811 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 14:49:57 +0100 Subject: [PATCH 54/63] Added diagnostics for update query --- tests/Functional/Service/PathServiceTest.php | 254 ++++++++----------- 1 file changed, 108 insertions(+), 146 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index c61e83dd..3340f0da 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -41,7 +41,17 @@ protected function _after() public function testAssetPathRewrite() { + /** @var \Pimcore\SearchClient\SearchClientInterface $client */ + $client = $this->tester->getIndexSearchClient(); + /** @var SearchIndexConfigServiceInterface $configService */ + $configService = $this->tester->grabService(SearchIndexConfigServiceInterface::class); + $indexName = $configService->getIndexName('asset'); + + /** @var PathServiceInterface $pathService */ + $pathService = $this->tester->grabService(PathServiceInterface::class); + + // Step 1: Create asset and folder, save asset under folder $asset = TestHelper::createImageAsset(); $folder = TestHelper::createAssetFolder(); $asset @@ -49,162 +59,114 @@ public function testAssetPathRewrite() ->setKey('test-asset') ->save(); - // DIAGNOSTIC: Check maxSynchronousChildrenRenameLimit before rename - /** @var SearchIndexConfigServiceInterface $configService */ - $configService = $this->tester->grabService(SearchIndexConfigServiceInterface::class); - $renameLimit = $configService->getMaxSynchronousChildrenRenameLimit(); - $searchSettings = $configService->getSearchSettings(); - $this->assertGreaterThan( - 0, - $renameLimit, - sprintf( - 'DIAGNOSTIC: maxSynchronousChildrenRenameLimit is %d (expected 500). searchSettings keys: [%s]. searchSettings dump: %s', - $renameLimit, - implode(', ', array_keys($searchSettings)), - json_encode($searchSettings) - ) - ); + // Step 2: Capture pre-rename state from OpenSearch + $folderPathBefore = $pathService->getCurrentIndexFullPath($folder); + $assetPathBefore = $pathService->getCurrentIndexFullPath($asset); + + // Get document versions before rename (to detect if updateByQuery touched them) + $assetDocBefore = $client->get([ + 'index' => $indexName, + 'id' => $asset->getId(), + ]); + $assetVersionBefore = $assetDocBefore['_version'] ?? 'N/A'; + $assetSeqNoBefore = $assetDocBefore['_seq_no'] ?? 'N/A'; + $assetPrimaryTermBefore = $assetDocBefore['_primary_term'] ?? 'N/A'; + + $folderDocBefore = $client->get([ + 'index' => $indexName, + 'id' => $folder->getId(), + ]); + $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; + + // Replicate the countDocumentsByPath query that rewriteChildrenIndexPaths uses + $countBeforeRename = $client->search([ + 'index' => $indexName, + 'track_total_hits' => true, + 'rest_total_hits_as_int' => true, + 'body' => [ + 'query' => [ + 'term' => [ + 'system_fields.fullPath' => $folderPathBefore, + ], + ], + 'size' => 0, + ], + ]); + $countBeforeRenameTotal = $countBeforeRename['hits']['total'] ?? 'N/A'; - // DIAGNOSTIC: Check folder is indexed before rename - /** @var PathServiceInterface $pathService */ - $pathService = $this->tester->grabService(PathServiceInterface::class); - $folderIndexedPath = $pathService->getCurrentIndexFullPath($folder); - $this->assertNotNull( - $folderIndexedPath, - 'DIAGNOSTIC: Folder is NOT indexed in OpenSearch before rename' - ); - $this->assertNotEmpty( - $folderIndexedPath, - 'DIAGNOSTIC: Folder indexed path is empty before rename' - ); + // Step 3: Rename folder (triggers subscriber -> updateIndexQueue -> rewriteChildrenIndexPaths -> commit) + $folder->setKey('test-folder')->save(); - // DIAGNOSTIC: Check asset is indexed before rename - $assetIndexedPathBefore = $pathService->getCurrentIndexFullPath($asset); - $this->assertNotNull( - $assetIndexedPathBefore, - 'DIAGNOSTIC: Asset is NOT indexed in OpenSearch before rename' - ); + // Step 4: Capture post-rename state + $assetPathAfter = $pathService->getCurrentIndexFullPath($asset); + $folderPathAfter = $pathService->getCurrentIndexFullPath($folder); + + $assetDocAfter = $client->get([ + 'index' => $indexName, + 'id' => $asset->getId(), + ]); + $assetVersionAfter = $assetDocAfter['_version'] ?? 'N/A'; + $assetSeqNoAfter = $assetDocAfter['_seq_no'] ?? 'N/A'; + $assetSourceAfter = $assetDocAfter['_source']['system_fields'] ?? []; + + $folderDocAfter = $client->get([ + 'index' => $indexName, + 'id' => $folder->getId(), + ]); + $folderVersionAfter = $folderDocAfter['_version'] ?? 'N/A'; + + // Step 5: Check rename limit config + $renameLimit = $configService->getMaxSynchronousChildrenRenameLimit(); - $folder->setKey('test-folder')->save(); + // Collect all diagnostics into one message + $assetDocBeforeKeys = implode(',', array_keys($assetDocBefore)); + $diagnostics = sprintf( + "DIAGNOSTICS:\n" + . " renameLimit=%d\n" + . " folderPath: before='%s' after='%s'\n" + . " assetPath: before='%s' after='%s'\n" + . " assetVersion: before=%s after=%s (delta=%s)\n" + . " assetSeqNo: before=%s after=%s\n" + . " assetPrimaryTerm: before=%s\n" + . " folderVersion: before=%s after=%s (delta=%s)\n" + . " countDocsByPath('%s') before rename=%s\n" + . " assetSystemFieldsAfter: path='%s' fullPath='%s' key='%s' checksum=%s\n" + . " assetDocBeforeKeys=[%s]\n" + . " indexName='%s'\n" + . " folder.getRealFullPath()='%s' asset.getRealFullPath()='%s'", + $renameLimit, + $folderPathBefore, $folderPathAfter, + $assetPathBefore, $assetPathAfter, + $assetVersionBefore, $assetVersionAfter, + (is_numeric($assetVersionBefore) && is_numeric($assetVersionAfter)) + ? ($assetVersionAfter - $assetVersionBefore) : '?', + $assetSeqNoBefore, $assetSeqNoAfter, + $assetPrimaryTermBefore, + $folderVersionBefore, $folderVersionAfter, + (is_numeric($folderVersionBefore) && is_numeric($folderVersionAfter)) + ? ($folderVersionAfter - $folderVersionBefore) : '?', + $folderPathBefore, $countBeforeRenameTotal, + $assetSourceAfter['path'] ?? 'N/A', + $assetSourceAfter['fullPath'] ?? 'N/A', + $assetSourceAfter['key'] ?? 'N/A', + $assetSourceAfter['checksum'] ?? 'N/A', + $assetDocBeforeKeys, + $indexName, + $folder->getRealFullPath(), + $asset->getRealFullPath() + ); - // DIAGNOSTIC: Check folder indexed path after rename (should be /test-folder) - $folderIndexedPathAfter = $pathService->getCurrentIndexFullPath($folder); + // Assert the result — include diagnostics in failure message $this->assertEquals( - '/test-folder', - $folderIndexedPathAfter, - sprintf( - 'DIAGNOSTIC: Folder indexed path after rename is "%s" (expected "/test-folder"). Path before rename was "%s"', - $folderIndexedPathAfter, - $folderIndexedPath - ) + '/test-folder/test-asset', + $assetPathAfter, + $diagnostics ); - // DIAGNOSTIC: Check asset indexed path after rename - $assetIndexedPathAfter = $pathService->getCurrentIndexFullPath($asset); - - // If the path rewrite didn't work during save, capture detailed diagnostics - if ($assetIndexedPathAfter !== '/test-folder/test-asset') { - /** @var \Pimcore\SearchClient\SearchClientInterface $client */ - $client = $this->tester->getIndexSearchClient(); - $oldPath = $folderIndexedPath; - $configService2 = $this->tester->grabService(SearchIndexConfigServiceInterface::class); - $indexName = $configService2->getIndexName('asset'); - - // Try running the exact same updateByQuery that PathService would run - // using the OLD path (which is still on the asset) - $updateByQueryResult = null; - $updateByQueryError = null; - try { - $updateByQueryResult = $client->updateByQuery([ - 'index' => $indexName, - 'refresh' => true, - 'conflicts' => 'proceed', - 'body' => [ - 'script' => [ - 'lang' => 'painless', - 'source' => 'ctx._source.system_fields.fullPath = params.newPath + ctx._source.system_fields.key; ctx._source.system_fields.path = params.newPath;', - 'params' => [ - 'newPath' => '/test-folder/', - ], - ], - 'query' => [ - 'term' => [ - 'system_fields.fullPath' => $oldPath, - ], - ], - ], - ]); - } catch (\Exception $e) { - $updateByQueryError = $e->getMessage(); - } - - // Check asset after our manual updateByQuery - $assetPathAfterManualUBQ = $pathService->getCurrentIndexFullPath($asset); - - // Also try a match query instead of term to see if analysis difference matters - $matchResult = $client->search([ - 'index' => $indexName, - 'body' => [ - 'query' => ['match' => ['system_fields.fullPath' => $oldPath]], - ], - ]); - $matchCount = $matchResult['hits']['total']['value'] ?? ($matchResult['hits']['total'] ?? 'N/A'); - - // Also try with keyword subfield - $keywordResult = $client->search([ - 'index' => $indexName, - 'body' => [ - 'query' => ['wildcard' => ['system_fields.fullPath.keyword' => $oldPath . '/*']], - ], - ]); - $keywordCount = $keywordResult['hits']['total']['value'] ?? ($keywordResult['hits']['total'] ?? 'N/A'); - - // Get all docs to see what's in the index - $allDocs = $client->search([ - 'index' => $indexName, - 'body' => [ - 'query' => ['match_all' => (object)[]], - '_source' => ['system_fields.fullPath', 'system_fields.path', 'system_fields.key'], - 'size' => 20, - ], - ]); - $allDocsSummary = []; - foreach ($allDocs['hits']['hits'] as $hit) { - $allDocsSummary[] = sprintf( - 'id=%s fullPath=%s', - $hit['_id'], - $hit['_source']['system_fields']['fullPath'] ?? 'N/A' - ); - } - - $this->fail(sprintf( - 'DIAGNOSTIC: Asset path not rewritten. ' - . 'Asset path after save: "%s". ' - . 'Asset path after manual updateByQuery: "%s". ' - . 'updateByQuery result: %s. ' - . 'updateByQuery error: %s. ' - . 'match query count for old path: %s. ' - . 'keyword wildcard count for old path children: %s. ' - . 'All docs in index: [%s]. ' - . 'Folder path before rename: "%s". ' - . 'Index name: "%s"', - $assetIndexedPathAfter, - $assetPathAfterManualUBQ, - json_encode($updateByQueryResult), - $updateByQueryError ?? 'none', - $matchCount, - $keywordCount, - implode(' | ', $allDocsSummary), - $folderIndexedPath, - $indexName - )); - } - + // Also verify via the search service /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); - $searchResultItem = $searchService->byId($asset->getId()); - $this->assertEquals('/test-folder/test-asset', $searchResultItem->getFullPath()); } } From 7f117c0cca65fc5107e894af6e77af5d443e1235 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 15:06:43 +0100 Subject: [PATCH 55/63] Added diagnostics for update query --- tests/Functional/Service/PathServiceTest.php | 72 +++++++++++--------- 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index 3340f0da..75cf0e89 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -12,10 +12,13 @@ namespace Pimcore\Bundle\GenericDataIndexBundle\Tests\Functional\Service; +use Pimcore\Bundle\GenericDataIndexBundle\Enum\SearchIndex\ElementType; +use Pimcore\Bundle\GenericDataIndexBundle\Message\EnqueueRelatedIdsMessage; use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface; use Pimcore\Tests\Support\Util\TestHelper; +use Symfony\Component\Messenger\MessageBusInterface; class PathServiceTest extends \Codeception\Test\Unit { @@ -63,14 +66,12 @@ public function testAssetPathRewrite() $folderPathBefore = $pathService->getCurrentIndexFullPath($folder); $assetPathBefore = $pathService->getCurrentIndexFullPath($asset); - // Get document versions before rename (to detect if updateByQuery touched them) + // Get document versions before rename $assetDocBefore = $client->get([ 'index' => $indexName, 'id' => $asset->getId(), ]); $assetVersionBefore = $assetDocBefore['_version'] ?? 'N/A'; - $assetSeqNoBefore = $assetDocBefore['_seq_no'] ?? 'N/A'; - $assetPrimaryTermBefore = $assetDocBefore['_primary_term'] ?? 'N/A'; $folderDocBefore = $client->get([ 'index' => $indexName, @@ -78,23 +79,24 @@ public function testAssetPathRewrite() ]); $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; - // Replicate the countDocumentsByPath query that rewriteChildrenIndexPaths uses - $countBeforeRename = $client->search([ - 'index' => $indexName, - 'track_total_hits' => true, - 'rest_total_hits_as_int' => true, - 'body' => [ - 'query' => [ - 'term' => [ - 'system_fields.fullPath' => $folderPathBefore, - ], - ], - 'size' => 0, - ], - ]); - $countBeforeRenameTotal = $countBeforeRename['hits']['total'] ?? 'N/A'; - - // Step 3: Rename folder (triggers subscriber -> updateIndexQueue -> rewriteChildrenIndexPaths -> commit) + // Step 2b: Test if message bus dispatch works (theory: this throws and prevents rewriteChildrenIndexPaths) + $messageBusError = 'none'; + try { + /** @var MessageBusInterface $messageBus */ + $messageBus = $this->tester->grabService(MessageBusInterface::class); + $messageBus->dispatch( + new EnqueueRelatedIdsMessage( + $folder->getId(), + ElementType::ASSET, + 'update', + false + ) + ); + } catch (\Exception $e) { + $messageBusError = get_class($e) . ': ' . $e->getMessage(); + } + + // Step 3: Rename folder $folder->setKey('test-folder')->save(); // Step 4: Capture post-rename state @@ -106,7 +108,6 @@ public function testAssetPathRewrite() 'id' => $asset->getId(), ]); $assetVersionAfter = $assetDocAfter['_version'] ?? 'N/A'; - $assetSeqNoAfter = $assetDocAfter['_seq_no'] ?? 'N/A'; $assetSourceAfter = $assetDocAfter['_source']['system_fields'] ?? []; $folderDocAfter = $client->get([ @@ -115,23 +116,30 @@ public function testAssetPathRewrite() ]); $folderVersionAfter = $folderDocAfter['_version'] ?? 'N/A'; - // Step 5: Check rename limit config + // Step 5: If test would fail, try manual rewriteChildrenIndexPaths to prove it works + $manualRewriteResult = 'not attempted'; + if ($assetPathAfter !== '/test-folder/test-asset') { + try { + $pathService->rewriteChildrenIndexPaths($folder); + $assetPathAfterManualRewrite = $pathService->getCurrentIndexFullPath($asset); + $manualRewriteResult = sprintf('success, assetPath=%s', $assetPathAfterManualRewrite); + } catch (\Exception $e) { + $manualRewriteResult = get_class($e) . ': ' . $e->getMessage(); + } + } + $renameLimit = $configService->getMaxSynchronousChildrenRenameLimit(); - // Collect all diagnostics into one message - $assetDocBeforeKeys = implode(',', array_keys($assetDocBefore)); $diagnostics = sprintf( "DIAGNOSTICS:\n" . " renameLimit=%d\n" . " folderPath: before='%s' after='%s'\n" . " assetPath: before='%s' after='%s'\n" . " assetVersion: before=%s after=%s (delta=%s)\n" - . " assetSeqNo: before=%s after=%s\n" - . " assetPrimaryTerm: before=%s\n" . " folderVersion: before=%s after=%s (delta=%s)\n" - . " countDocsByPath('%s') before rename=%s\n" + . " messageBusDispatchTest: %s\n" + . " manualRewriteChildrenIndexPaths: %s\n" . " assetSystemFieldsAfter: path='%s' fullPath='%s' key='%s' checksum=%s\n" - . " assetDocBeforeKeys=[%s]\n" . " indexName='%s'\n" . " folder.getRealFullPath()='%s' asset.getRealFullPath()='%s'", $renameLimit, @@ -140,23 +148,21 @@ public function testAssetPathRewrite() $assetVersionBefore, $assetVersionAfter, (is_numeric($assetVersionBefore) && is_numeric($assetVersionAfter)) ? ($assetVersionAfter - $assetVersionBefore) : '?', - $assetSeqNoBefore, $assetSeqNoAfter, - $assetPrimaryTermBefore, $folderVersionBefore, $folderVersionAfter, (is_numeric($folderVersionBefore) && is_numeric($folderVersionAfter)) ? ($folderVersionAfter - $folderVersionBefore) : '?', - $folderPathBefore, $countBeforeRenameTotal, + $messageBusError, + $manualRewriteResult, $assetSourceAfter['path'] ?? 'N/A', $assetSourceAfter['fullPath'] ?? 'N/A', $assetSourceAfter['key'] ?? 'N/A', $assetSourceAfter['checksum'] ?? 'N/A', - $assetDocBeforeKeys, $indexName, $folder->getRealFullPath(), $asset->getRealFullPath() ); - // Assert the result — include diagnostics in failure message + // Assert the result $this->assertEquals( '/test-folder/test-asset', $assetPathAfter, From a08b80bb1c8c502c3b0c5a73eacc93db8b45bcc0 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 15:44:15 +0100 Subject: [PATCH 56/63] Added diagnostics for update query --- tests/Functional/Service/PathServiceTest.php | 210 +++++++++++-------- 1 file changed, 126 insertions(+), 84 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index 75cf0e89..eaff214f 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -12,13 +12,16 @@ namespace Pimcore\Bundle\GenericDataIndexBundle\Tests\Functional\Service; -use Pimcore\Bundle\GenericDataIndexBundle\Enum\SearchIndex\ElementType; -use Pimcore\Bundle\GenericDataIndexBundle\Message\EnqueueRelatedIdsMessage; +use Pimcore\Bundle\GenericDataIndexBundle\Enum\SearchIndex\IndexQueueOperation; +use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface; +use Pimcore\Event\AssetEvents; +use Pimcore\Event\Model\AssetEvent; use Pimcore\Tests\Support\Util\TestHelper; -use Symfony\Component\Messenger\MessageBusInterface; class PathServiceTest extends \Codeception\Test\Unit { @@ -54,6 +57,12 @@ public function testAssetPathRewrite() /** @var PathServiceInterface $pathService */ $pathService = $this->tester->grabService(PathServiceInterface::class); + /** @var IndexServiceInterface $indexService */ + $indexService = $this->tester->grabService(IndexServiceInterface::class); + + /** @var BulkOperationServiceInterface $bulkService */ + $bulkService = $this->tester->grabService(BulkOperationServiceInterface::class); + // Step 1: Create asset and folder, save asset under folder $asset = TestHelper::createImageAsset(); $folder = TestHelper::createAssetFolder(); @@ -62,114 +71,147 @@ public function testAssetPathRewrite() ->setKey('test-asset') ->save(); - // Step 2: Capture pre-rename state from OpenSearch + // Capture pre-rename state $folderPathBefore = $pathService->getCurrentIndexFullPath($folder); $assetPathBefore = $pathService->getCurrentIndexFullPath($asset); - // Get document versions before rename - $assetDocBefore = $client->get([ - 'index' => $indexName, - 'id' => $asset->getId(), - ]); + $assetDocBefore = $client->get(['index' => $indexName, 'id' => $asset->getId()]); $assetVersionBefore = $assetDocBefore['_version'] ?? 'N/A'; + $folderDocBefore = $client->get(['index' => $indexName, 'id' => $folder->getId()]); + $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; + + // Step 2: Disable the event subscriber so we can manually replicate the flow + $eventDispatcher = $this->tester->grabService('event_dispatcher'); + $listeners = $eventDispatcher->getListeners(AssetEvents::POST_UPDATE); + foreach ($listeners as $listener) { + $eventDispatcher->removeListener(AssetEvents::POST_UPDATE, $listener); + } + + // Step 3: Rename folder (DB only, no index update because subscriber is disabled) + $folder->setKey('test-folder')->save(); + + // Step 4: Now manually replicate what IndexQueueService::updateIndexQueue does, step by step + + // 4a: doHandleIndexData — adds folder to bulk buffer (NOT committed yet) + $doHandleError = 'none'; + try { + $indexService->updateIndexData($folder); + } catch (\Exception $e) { + $doHandleError = get_class($e) . ': ' . $e->getMessage(); + } + + // 4b: Check what getCurrentIndexFullPath returns BEFORE commit (should be OLD path) + $folderPathInOsBeforeCommit = $pathService->getCurrentIndexFullPath($folder); - $folderDocBefore = $client->get([ + // 4c: Check countDocumentsByPath BEFORE commit + $countBeforeCommit = $client->search([ 'index' => $indexName, - 'id' => $folder->getId(), + 'track_total_hits' => true, + 'rest_total_hits_as_int' => true, + 'body' => [ + 'query' => ['term' => ['system_fields.fullPath' => $folderPathInOsBeforeCommit]], + 'size' => 0, + ], ]); - $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; + $countBeforeCommitTotal = $countBeforeCommit['hits']['total'] ?? 'N/A'; - // Step 2b: Test if message bus dispatch works (theory: this throws and prevents rewriteChildrenIndexPaths) - $messageBusError = 'none'; + // 4d: rewriteChildrenIndexPaths BEFORE commit + $rewriteError = 'none'; try { - /** @var MessageBusInterface $messageBus */ - $messageBus = $this->tester->grabService(MessageBusInterface::class); - $messageBus->dispatch( - new EnqueueRelatedIdsMessage( - $folder->getId(), - ElementType::ASSET, - 'update', - false - ) - ); + $pathService->rewriteChildrenIndexPaths($folder); } catch (\Exception $e) { - $messageBusError = get_class($e) . ': ' . $e->getMessage(); + $rewriteError = get_class($e) . ': ' . $e->getMessage(); } - // Step 3: Rename folder - $folder->setKey('test-folder')->save(); + // 4e: Check asset path AFTER rewrite but BEFORE commit + $assetPathAfterRewriteBeforeCommit = $pathService->getCurrentIndexFullPath($asset); - // Step 4: Capture post-rename state - $assetPathAfter = $pathService->getCurrentIndexFullPath($asset); - $folderPathAfter = $pathService->getCurrentIndexFullPath($folder); + $assetDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $asset->getId()]); + $assetVersionAfterRewrite = $assetDocAfterRewrite['_version'] ?? 'N/A'; - $assetDocAfter = $client->get([ - 'index' => $indexName, - 'id' => $asset->getId(), - ]); - $assetVersionAfter = $assetDocAfter['_version'] ?? 'N/A'; - $assetSourceAfter = $assetDocAfter['_source']['system_fields'] ?? []; + $folderDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $folder->getId()]); + $folderVersionAfterRewrite = $folderDocAfterRewrite['_version'] ?? 'N/A'; - $folderDocAfter = $client->get([ - 'index' => $indexName, - 'id' => $folder->getId(), - ]); - $folderVersionAfter = $folderDocAfter['_version'] ?? 'N/A'; - - // Step 5: If test would fail, try manual rewriteChildrenIndexPaths to prove it works - $manualRewriteResult = 'not attempted'; - if ($assetPathAfter !== '/test-folder/test-asset') { - try { - $pathService->rewriteChildrenIndexPaths($folder); - $assetPathAfterManualRewrite = $pathService->getCurrentIndexFullPath($asset); - $manualRewriteResult = sprintf('success, assetPath=%s', $assetPathAfterManualRewrite); - } catch (\Exception $e) { - $manualRewriteResult = get_class($e) . ': ' . $e->getMessage(); - } + // 4f: Now commit the bulk + $commitError = 'none'; + try { + $bulkService->commit(); + } catch (\Exception $e) { + $commitError = get_class($e) . ': ' . $e->getMessage(); } - $renameLimit = $configService->getMaxSynchronousChildrenRenameLimit(); + // Step 5: Final state + $assetPathFinal = $pathService->getCurrentIndexFullPath($asset); + $folderPathFinal = $pathService->getCurrentIndexFullPath($folder); + + $assetDocFinal = $client->get(['index' => $indexName, 'id' => $asset->getId()]); + $assetVersionFinal = $assetDocFinal['_version'] ?? 'N/A'; + $assetSourceFinal = $assetDocFinal['_source']['system_fields'] ?? []; + + $folderDocFinal = $client->get(['index' => $indexName, 'id' => $folder->getId()]); + $folderVersionFinal = $folderDocFinal['_version'] ?? 'N/A'; $diagnostics = sprintf( - "DIAGNOSTICS:\n" - . " renameLimit=%d\n" - . " folderPath: before='%s' after='%s'\n" - . " assetPath: before='%s' after='%s'\n" - . " assetVersion: before=%s after=%s (delta=%s)\n" - . " folderVersion: before=%s after=%s (delta=%s)\n" - . " messageBusDispatchTest: %s\n" - . " manualRewriteChildrenIndexPaths: %s\n" - . " assetSystemFieldsAfter: path='%s' fullPath='%s' key='%s' checksum=%s\n" - . " indexName='%s'\n" - . " folder.getRealFullPath()='%s' asset.getRealFullPath()='%s'", - $renameLimit, - $folderPathBefore, $folderPathAfter, - $assetPathBefore, $assetPathAfter, - $assetVersionBefore, $assetVersionAfter, - (is_numeric($assetVersionBefore) && is_numeric($assetVersionAfter)) - ? ($assetVersionAfter - $assetVersionBefore) : '?', - $folderVersionBefore, $folderVersionAfter, - (is_numeric($folderVersionBefore) && is_numeric($folderVersionAfter)) - ? ($folderVersionAfter - $folderVersionBefore) : '?', - $messageBusError, - $manualRewriteResult, - $assetSourceAfter['path'] ?? 'N/A', - $assetSourceAfter['fullPath'] ?? 'N/A', - $assetSourceAfter['key'] ?? 'N/A', - $assetSourceAfter['checksum'] ?? 'N/A', - $indexName, + "STEP-BY-STEP DIAGNOSTICS:\n" + . " BEFORE RENAME:\n" + . " folderPath='%s' assetPath='%s'\n" + . " assetVersion=%s folderVersion=%s\n" + . " AFTER doHandleIndexData (bulk buffer has folder, NOT committed):\n" + . " doHandleError: %s\n" + . " folderPathInOS='%s' (should be OLD path)\n" + . " countDocsByPath('%s')=%s\n" + . " folder.getRealFullPath()='%s'\n" + . " oldPath==newPath? %s\n" + . " AFTER rewriteChildrenIndexPaths (BEFORE commit):\n" + . " rewriteError: %s\n" + . " assetPath='%s'\n" + . " assetVersion: %s (delta from before=%s)\n" + . " folderVersion: %s (delta from before=%s)\n" + . " AFTER commit:\n" + . " commitError: %s\n" + . " assetPath='%s' folderPath='%s'\n" + . " assetVersion: %s (delta from before=%s)\n" + . " folderVersion: %s (delta from before=%s)\n" + . " assetSystemFields: path='%s' fullPath='%s' key='%s' checksum=%s", + $folderPathBefore, $assetPathBefore, + $assetVersionBefore, $folderVersionBefore, + $doHandleError, + $folderPathInOsBeforeCommit, + $folderPathInOsBeforeCommit, $countBeforeCommitTotal, $folder->getRealFullPath(), - $asset->getRealFullPath() + $folderPathInOsBeforeCommit === $folder->getRealFullPath() ? 'YES (early return!)' : 'NO (proceeds)', + $rewriteError, + $assetPathAfterRewriteBeforeCommit, + $assetVersionAfterRewrite, + is_numeric($assetVersionBefore) && is_numeric($assetVersionAfterRewrite) + ? ($assetVersionAfterRewrite - $assetVersionBefore) : '?', + $folderVersionAfterRewrite, + is_numeric($folderVersionBefore) && is_numeric($folderVersionAfterRewrite) + ? ($folderVersionAfterRewrite - $folderVersionBefore) : '?', + $commitError, + $assetPathFinal, $folderPathFinal, + $assetVersionFinal, + is_numeric($assetVersionBefore) && is_numeric($assetVersionFinal) + ? ($assetVersionFinal - $assetVersionBefore) : '?', + $folderVersionFinal, + is_numeric($folderVersionBefore) && is_numeric($folderVersionFinal) + ? ($folderVersionFinal - $folderVersionBefore) : '?', + $assetSourceFinal['path'] ?? 'N/A', + $assetSourceFinal['fullPath'] ?? 'N/A', + $assetSourceFinal['key'] ?? 'N/A', + $assetSourceFinal['checksum'] ?? 'N/A' ); - // Assert the result + // If this all works correctly, we've found the issue + // If assetPathFinal is correct, the step-by-step approach works (timing issue in original) + // If assetPathFinal is wrong, the diagnostics show us exactly which step failed + $this->assertEquals( '/test-folder/test-asset', - $assetPathAfter, + $assetPathFinal, $diagnostics ); - // Also verify via the search service /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); $searchResultItem = $searchService->byId($asset->getId()); From 51935c94187d732857aee5a8a33d0b460a44d41d Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Wed, 11 Feb 2026 16:17:19 +0100 Subject: [PATCH 57/63] Fixed painless script --- .../DefaultSearch/PathService.php | 3 +- tests/Functional/Service/PathServiceTest.php | 165 +----------------- 2 files changed, 4 insertions(+), 164 deletions(-) diff --git a/src/SearchIndexAdapter/DefaultSearch/PathService.php b/src/SearchIndexAdapter/DefaultSearch/PathService.php index b27632de..d0ec9feb 100644 --- a/src/SearchIndexAdapter/DefaultSearch/PathService.php +++ b/src/SearchIndexAdapter/DefaultSearch/PathService.php @@ -124,6 +124,7 @@ private function updatePath(string $indexName, string $currentPath, string $newP 'params' => [ 'currentPath' => $currentPath . '/', 'newPath' => $newPath . '/', + 'now' => date('c'), ], ], @@ -210,7 +211,7 @@ private function getScriptSource(): string } ctx._source.system_fields.pathLevels = newLevels; } - ctx._source.system_fields.modificationDate = Instant.now().toString(); + ctx._source.system_fields.modificationDate = params.now; ctx._source.system_fields.checksum = 0'; } diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index eaff214f..0677b063 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -12,15 +12,7 @@ namespace Pimcore\Bundle\GenericDataIndexBundle\Tests\Functional\Service; -use Pimcore\Bundle\GenericDataIndexBundle\Enum\SearchIndex\IndexQueueOperation; -use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface; -use Pimcore\Event\AssetEvents; -use Pimcore\Event\Model\AssetEvent; use Pimcore\Tests\Support\Util\TestHelper; class PathServiceTest extends \Codeception\Test\Unit @@ -47,23 +39,7 @@ protected function _after() public function testAssetPathRewrite() { - /** @var \Pimcore\SearchClient\SearchClientInterface $client */ - $client = $this->tester->getIndexSearchClient(); - /** @var SearchIndexConfigServiceInterface $configService */ - $configService = $this->tester->grabService(SearchIndexConfigServiceInterface::class); - $indexName = $configService->getIndexName('asset'); - - /** @var PathServiceInterface $pathService */ - $pathService = $this->tester->grabService(PathServiceInterface::class); - - /** @var IndexServiceInterface $indexService */ - $indexService = $this->tester->grabService(IndexServiceInterface::class); - - /** @var BulkOperationServiceInterface $bulkService */ - $bulkService = $this->tester->grabService(BulkOperationServiceInterface::class); - - // Step 1: Create asset and folder, save asset under folder $asset = TestHelper::createImageAsset(); $folder = TestHelper::createAssetFolder(); $asset @@ -71,150 +47,13 @@ public function testAssetPathRewrite() ->setKey('test-asset') ->save(); - // Capture pre-rename state - $folderPathBefore = $pathService->getCurrentIndexFullPath($folder); - $assetPathBefore = $pathService->getCurrentIndexFullPath($asset); - - $assetDocBefore = $client->get(['index' => $indexName, 'id' => $asset->getId()]); - $assetVersionBefore = $assetDocBefore['_version'] ?? 'N/A'; - $folderDocBefore = $client->get(['index' => $indexName, 'id' => $folder->getId()]); - $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; - - // Step 2: Disable the event subscriber so we can manually replicate the flow - $eventDispatcher = $this->tester->grabService('event_dispatcher'); - $listeners = $eventDispatcher->getListeners(AssetEvents::POST_UPDATE); - foreach ($listeners as $listener) { - $eventDispatcher->removeListener(AssetEvents::POST_UPDATE, $listener); - } - - // Step 3: Rename folder (DB only, no index update because subscriber is disabled) $folder->setKey('test-folder')->save(); - // Step 4: Now manually replicate what IndexQueueService::updateIndexQueue does, step by step - - // 4a: doHandleIndexData — adds folder to bulk buffer (NOT committed yet) - $doHandleError = 'none'; - try { - $indexService->updateIndexData($folder); - } catch (\Exception $e) { - $doHandleError = get_class($e) . ': ' . $e->getMessage(); - } - - // 4b: Check what getCurrentIndexFullPath returns BEFORE commit (should be OLD path) - $folderPathInOsBeforeCommit = $pathService->getCurrentIndexFullPath($folder); - - // 4c: Check countDocumentsByPath BEFORE commit - $countBeforeCommit = $client->search([ - 'index' => $indexName, - 'track_total_hits' => true, - 'rest_total_hits_as_int' => true, - 'body' => [ - 'query' => ['term' => ['system_fields.fullPath' => $folderPathInOsBeforeCommit]], - 'size' => 0, - ], - ]); - $countBeforeCommitTotal = $countBeforeCommit['hits']['total'] ?? 'N/A'; - - // 4d: rewriteChildrenIndexPaths BEFORE commit - $rewriteError = 'none'; - try { - $pathService->rewriteChildrenIndexPaths($folder); - } catch (\Exception $e) { - $rewriteError = get_class($e) . ': ' . $e->getMessage(); - } - - // 4e: Check asset path AFTER rewrite but BEFORE commit - $assetPathAfterRewriteBeforeCommit = $pathService->getCurrentIndexFullPath($asset); - - $assetDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $asset->getId()]); - $assetVersionAfterRewrite = $assetDocAfterRewrite['_version'] ?? 'N/A'; - - $folderDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $folder->getId()]); - $folderVersionAfterRewrite = $folderDocAfterRewrite['_version'] ?? 'N/A'; - - // 4f: Now commit the bulk - $commitError = 'none'; - try { - $bulkService->commit(); - } catch (\Exception $e) { - $commitError = get_class($e) . ': ' . $e->getMessage(); - } - - // Step 5: Final state - $assetPathFinal = $pathService->getCurrentIndexFullPath($asset); - $folderPathFinal = $pathService->getCurrentIndexFullPath($folder); - - $assetDocFinal = $client->get(['index' => $indexName, 'id' => $asset->getId()]); - $assetVersionFinal = $assetDocFinal['_version'] ?? 'N/A'; - $assetSourceFinal = $assetDocFinal['_source']['system_fields'] ?? []; - - $folderDocFinal = $client->get(['index' => $indexName, 'id' => $folder->getId()]); - $folderVersionFinal = $folderDocFinal['_version'] ?? 'N/A'; - - $diagnostics = sprintf( - "STEP-BY-STEP DIAGNOSTICS:\n" - . " BEFORE RENAME:\n" - . " folderPath='%s' assetPath='%s'\n" - . " assetVersion=%s folderVersion=%s\n" - . " AFTER doHandleIndexData (bulk buffer has folder, NOT committed):\n" - . " doHandleError: %s\n" - . " folderPathInOS='%s' (should be OLD path)\n" - . " countDocsByPath('%s')=%s\n" - . " folder.getRealFullPath()='%s'\n" - . " oldPath==newPath? %s\n" - . " AFTER rewriteChildrenIndexPaths (BEFORE commit):\n" - . " rewriteError: %s\n" - . " assetPath='%s'\n" - . " assetVersion: %s (delta from before=%s)\n" - . " folderVersion: %s (delta from before=%s)\n" - . " AFTER commit:\n" - . " commitError: %s\n" - . " assetPath='%s' folderPath='%s'\n" - . " assetVersion: %s (delta from before=%s)\n" - . " folderVersion: %s (delta from before=%s)\n" - . " assetSystemFields: path='%s' fullPath='%s' key='%s' checksum=%s", - $folderPathBefore, $assetPathBefore, - $assetVersionBefore, $folderVersionBefore, - $doHandleError, - $folderPathInOsBeforeCommit, - $folderPathInOsBeforeCommit, $countBeforeCommitTotal, - $folder->getRealFullPath(), - $folderPathInOsBeforeCommit === $folder->getRealFullPath() ? 'YES (early return!)' : 'NO (proceeds)', - $rewriteError, - $assetPathAfterRewriteBeforeCommit, - $assetVersionAfterRewrite, - is_numeric($assetVersionBefore) && is_numeric($assetVersionAfterRewrite) - ? ($assetVersionAfterRewrite - $assetVersionBefore) : '?', - $folderVersionAfterRewrite, - is_numeric($folderVersionBefore) && is_numeric($folderVersionAfterRewrite) - ? ($folderVersionAfterRewrite - $folderVersionBefore) : '?', - $commitError, - $assetPathFinal, $folderPathFinal, - $assetVersionFinal, - is_numeric($assetVersionBefore) && is_numeric($assetVersionFinal) - ? ($assetVersionFinal - $assetVersionBefore) : '?', - $folderVersionFinal, - is_numeric($folderVersionBefore) && is_numeric($folderVersionFinal) - ? ($folderVersionFinal - $folderVersionBefore) : '?', - $assetSourceFinal['path'] ?? 'N/A', - $assetSourceFinal['fullPath'] ?? 'N/A', - $assetSourceFinal['key'] ?? 'N/A', - $assetSourceFinal['checksum'] ?? 'N/A' - ); - - // If this all works correctly, we've found the issue - // If assetPathFinal is correct, the step-by-step approach works (timing issue in original) - // If assetPathFinal is wrong, the diagnostics show us exactly which step failed - - $this->assertEquals( - '/test-folder/test-asset', - $assetPathFinal, - $diagnostics - ); - /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); + $searchResultItem = $searchService->byId($asset->getId()); + $this->assertEquals('/test-folder/test-asset', $searchResultItem->getFullPath()); } } From 347802e84f2d8893869c0fc44eb062a9d639b9bc Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Thu, 12 Feb 2026 09:08:15 +0100 Subject: [PATCH 58/63] Added diagnostics --- tests/Functional/Service/PathServiceTest.php | 204 ++++++++++++++++++- 1 file changed, 202 insertions(+), 2 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index 0677b063..40b89a3b 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -12,7 +12,15 @@ namespace Pimcore\Bundle\GenericDataIndexBundle\Tests\Functional\Service; +use Pimcore\Bundle\GenericDataIndexBundle\Enum\SearchIndex\IndexQueueOperation; +use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface; +use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface; +use Pimcore\Event\AssetEvents; +use Pimcore\Event\Model\AssetEvent; use Pimcore\Tests\Support\Util\TestHelper; class PathServiceTest extends \Codeception\Test\Unit @@ -39,7 +47,23 @@ protected function _after() public function testAssetPathRewrite() { + /** @var \Pimcore\SearchClient\SearchClientInterface $client */ + $client = $this->tester->getIndexSearchClient(); + /** @var SearchIndexConfigServiceInterface $configService */ + $configService = $this->tester->grabService(SearchIndexConfigServiceInterface::class); + $indexName = $configService->getIndexName('asset'); + + /** @var PathServiceInterface $pathService */ + $pathService = $this->tester->grabService(PathServiceInterface::class); + + /** @var IndexServiceInterface $indexService */ + $indexService = $this->tester->grabService(IndexServiceInterface::class); + + /** @var BulkOperationServiceInterface $bulkService */ + $bulkService = $this->tester->grabService(BulkOperationServiceInterface::class); + + // Step 1: Create asset and folder, save asset under folder $asset = TestHelper::createImageAsset(); $folder = TestHelper::createAssetFolder(); $asset @@ -47,13 +71,189 @@ public function testAssetPathRewrite() ->setKey('test-asset') ->save(); + // Capture pre-rename state + $folderPathBefore = $pathService->getCurrentIndexFullPath($folder); + $assetPathBefore = $pathService->getCurrentIndexFullPath($asset); + + $assetDocBefore = $client->get(['index' => $indexName, 'id' => $asset->getId()]); + $assetVersionBefore = $assetDocBefore['_version'] ?? 'N/A'; + $folderDocBefore = $client->get(['index' => $indexName, 'id' => $folder->getId()]); + $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; + + // Step 2: Disable the event subscriber so we can manually replicate the flow + $eventDispatcher = $this->tester->grabService('event_dispatcher'); + $listeners = $eventDispatcher->getListeners(AssetEvents::POST_UPDATE); + foreach ($listeners as $listener) { + $eventDispatcher->removeListener(AssetEvents::POST_UPDATE, $listener); + } + + // Step 3: Rename folder (DB only, no index update because subscriber is disabled) $folder->setKey('test-folder')->save(); + // Step 4: Now manually replicate what IndexQueueService::updateIndexQueue does, step by step + + // 4a: doHandleIndexData — adds folder to bulk buffer (NOT committed yet) + $doHandleError = 'none'; + try { + $indexService->updateIndexData($folder); + } catch (\Exception $e) { + $doHandleError = get_class($e) . ': ' . $e->getMessage(); + } + + // 4b: Check what getCurrentIndexFullPath returns BEFORE commit (should be OLD path) + $folderPathInOsBeforeCommit = $pathService->getCurrentIndexFullPath($folder); + + // 4c: Check countDocumentsByPath BEFORE commit + $countBeforeCommit = $client->search([ + 'index' => $indexName, + 'track_total_hits' => true, + 'rest_total_hits_as_int' => true, + 'body' => [ + 'query' => ['term' => ['system_fields.fullPath' => $folderPathInOsBeforeCommit]], + 'size' => 0, + ], + ]); + $countBeforeCommitTotal = $countBeforeCommit['hits']['total'] ?? 'N/A'; + + // 4d: rewriteChildrenIndexPaths BEFORE commit — capture exception if any + $rewriteError = 'none'; + try { + $pathService->rewriteChildrenIndexPaths($folder); + } catch (\Exception $e) { + $rewriteError = get_class($e) . ': ' . $e->getMessage(); + } + + // 4e: Check asset path AFTER rewrite but BEFORE commit + $assetPathAfterRewriteBeforeCommit = $pathService->getCurrentIndexFullPath($asset); + + $assetDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $asset->getId()]); + $assetVersionAfterRewrite = $assetDocAfterRewrite['_version'] ?? 'N/A'; + + $folderDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $folder->getId()]); + $folderVersionAfterRewrite = $folderDocAfterRewrite['_version'] ?? 'N/A'; + + // 4f: Also do a manual updateByQuery to see the raw response + $manualUbqResponse = 'N/A'; + $manualUbqError = 'none'; + try { + $oldPath = $folderPathInOsBeforeCommit; + $newPath = $folder->getRealFullPath(); + $ubqResult = $client->updateByQuery([ + 'index' => $indexName, + 'refresh' => true, + 'conflicts' => 'proceed', + 'body' => [ + 'script' => [ + 'lang' => 'painless', + 'source' => "ctx._source.system_fields.checksum = 0", + 'params' => [], + ], + 'query' => [ + 'term' => [ + 'system_fields.fullPath' => $oldPath, + ], + ], + ], + ]); + $manualUbqResponse = json_encode($ubqResult); + } catch (\Exception $e) { + $manualUbqError = get_class($e) . ': ' . $e->getMessage(); + } + + // 4g: Now commit the bulk + $commitError = 'none'; + try { + $bulkService->commit(); + } catch (\Exception $e) { + $commitError = get_class($e) . ': ' . $e->getMessage(); + } + + // Step 5: Final state + $assetPathFinal = $pathService->getCurrentIndexFullPath($asset); + $folderPathFinal = $pathService->getCurrentIndexFullPath($folder); + + $assetDocFinal = $client->get(['index' => $indexName, 'id' => $asset->getId()]); + $assetVersionFinal = $assetDocFinal['_version'] ?? 'N/A'; + $assetSourceFinal = $assetDocFinal['_source']['system_fields'] ?? []; + + $folderDocFinal = $client->get(['index' => $indexName, 'id' => $folder->getId()]); + $folderVersionFinal = $folderDocFinal['_version'] ?? 'N/A'; + + // Also query OpenSearch server info to confirm which engine we're on + $serverInfo = 'N/A'; + try { + $info = $client->info(); + $serverInfo = ($info['version']['distribution'] ?? 'elasticsearch') . ' ' . ($info['version']['number'] ?? '?'); + } catch (\Exception $e) { + $serverInfo = 'error: ' . $e->getMessage(); + } + + $diagnostics = sprintf( + "STEP-BY-STEP DIAGNOSTICS (engine: %s):\n" + . " BEFORE RENAME:\n" + . " folderPath='%s' assetPath='%s'\n" + . " assetVersion=%s folderVersion=%s\n" + . " AFTER doHandleIndexData (bulk buffer has folder, NOT committed):\n" + . " doHandleError: %s\n" + . " folderPathInOS='%s' (should be OLD path)\n" + . " countDocsByPath('%s')=%s\n" + . " folder.getRealFullPath()='%s'\n" + . " oldPath==newPath? %s\n" + . " AFTER rewriteChildrenIndexPaths (BEFORE commit):\n" + . " rewriteError: %s\n" + . " assetPath='%s'\n" + . " assetVersion: %s->%s (delta=%s)\n" + . " folderVersion: %s->%s (delta=%s)\n" + . " MANUAL updateByQuery (simple checksum=0 script):\n" + . " response: %s\n" + . " error: %s\n" + . " AFTER commit:\n" + . " commitError: %s\n" + . " assetPath='%s' folderPath='%s'\n" + . " assetVersion: %s (total delta=%s)\n" + . " folderVersion: %s (total delta=%s)\n" + . " assetSystemFields: path='%s' fullPath='%s' key='%s' checksum=%s", + $serverInfo, + $folderPathBefore, $assetPathBefore, + $assetVersionBefore, $folderVersionBefore, + $doHandleError, + $folderPathInOsBeforeCommit, + $folderPathInOsBeforeCommit, $countBeforeCommitTotal, + $folder->getRealFullPath(), + $folderPathInOsBeforeCommit === $folder->getRealFullPath() ? 'YES (early return!)' : 'NO (proceeds)', + $rewriteError, + $assetPathAfterRewriteBeforeCommit, + $assetVersionBefore, $assetVersionAfterRewrite, + is_numeric($assetVersionBefore) && is_numeric($assetVersionAfterRewrite) + ? ($assetVersionAfterRewrite - $assetVersionBefore) : '?', + $folderVersionBefore, $folderVersionAfterRewrite, + is_numeric($folderVersionBefore) && is_numeric($folderVersionAfterRewrite) + ? ($folderVersionAfterRewrite - $folderVersionBefore) : '?', + $manualUbqResponse, + $manualUbqError, + $commitError, + $assetPathFinal, $folderPathFinal, + $assetVersionFinal, + is_numeric($assetVersionBefore) && is_numeric($assetVersionFinal) + ? ($assetVersionFinal - $assetVersionBefore) : '?', + $folderVersionFinal, + is_numeric($folderVersionBefore) && is_numeric($folderVersionFinal) + ? ($folderVersionFinal - $folderVersionBefore) : '?', + $assetSourceFinal['path'] ?? 'N/A', + $assetSourceFinal['fullPath'] ?? 'N/A', + $assetSourceFinal['key'] ?? 'N/A', + $assetSourceFinal['checksum'] ?? 'N/A' + ); + + $this->assertEquals( + '/test-folder/test-asset', + $assetPathFinal, + $diagnostics + ); + /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); - $searchResultItem = $searchService->byId($asset->getId()); - $this->assertEquals('/test-folder/test-asset', $searchResultItem->getFullPath()); } } From 323e86ce7083ef510fa50d59b5cb6252e5a27fef Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Thu, 12 Feb 2026 09:17:27 +0100 Subject: [PATCH 59/63] Added diagnostics --- tests/Functional/Service/PathServiceTest.php | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index 40b89a3b..acd70096 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -179,14 +179,10 @@ public function testAssetPathRewrite() $folderDocFinal = $client->get(['index' => $indexName, 'id' => $folder->getId()]); $folderVersionFinal = $folderDocFinal['_version'] ?? 'N/A'; - // Also query OpenSearch server info to confirm which engine we're on - $serverInfo = 'N/A'; - try { - $info = $client->info(); - $serverInfo = ($info['version']['distribution'] ?? 'elasticsearch') . ' ' . ($info['version']['number'] ?? '?'); - } catch (\Exception $e) { - $serverInfo = 'error: ' . $e->getMessage(); - } + // Detect engine from env vars + $esHost = getenv('PIMCORE_ELASTIC_SEARCH_HOST'); + $osHost = getenv('PIMCORE_OPEN_SEARCH_HOST'); + $serverInfo = sprintf('OS_HOST=%s ES_HOST=%s client=%s', $osHost ?: 'unset', $esHost ?: 'unset', get_class($client)); $diagnostics = sprintf( "STEP-BY-STEP DIAGNOSTICS (engine: %s):\n" From 70fdbfbf9c3458858d7afc4b307c127b0f1c5d9b Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Thu, 12 Feb 2026 09:33:17 +0100 Subject: [PATCH 60/63] Added check for custom_fields type --- src/SearchIndexAdapter/DefaultSearch/PathService.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/SearchIndexAdapter/DefaultSearch/PathService.php b/src/SearchIndexAdapter/DefaultSearch/PathService.php index d0ec9feb..50e25c03 100644 --- a/src/SearchIndexAdapter/DefaultSearch/PathService.php +++ b/src/SearchIndexAdapter/DefaultSearch/PathService.php @@ -168,8 +168,11 @@ private function getScriptSource(): string } if(ctx._source.containsKey("custom_fields") && + ctx._source.custom_fields instanceof Map && ctx._source.custom_fields.containsKey("PortalEngineBundle") && + ctx._source.custom_fields.PortalEngineBundle instanceof Map && ctx._source.custom_fields.PortalEngineBundle.containsKey("system_fields") && + ctx._source.custom_fields.PortalEngineBundle.system_fields instanceof Map && ctx._source.custom_fields.PortalEngineBundle.system_fields.containsKey("thumbnail")) { def customFields = ctx._source.custom_fields.PortalEngineBundle.system_fields; if(customFields.thumbnail != null && customFields.thumbnail instanceof String) { From e9c8489b44c707e3544498cb4ec81b9da6d568a3 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Thu, 12 Feb 2026 09:51:48 +0100 Subject: [PATCH 61/63] Removed diagnostics --- tests/Functional/Service/PathServiceTest.php | 200 +------------------ 1 file changed, 2 insertions(+), 198 deletions(-) diff --git a/tests/Functional/Service/PathServiceTest.php b/tests/Functional/Service/PathServiceTest.php index acd70096..0677b063 100644 --- a/tests/Functional/Service/PathServiceTest.php +++ b/tests/Functional/Service/PathServiceTest.php @@ -12,15 +12,7 @@ namespace Pimcore\Bundle\GenericDataIndexBundle\Tests\Functional\Service; -use Pimcore\Bundle\GenericDataIndexBundle\Enum\SearchIndex\IndexQueueOperation; -use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\BulkOperationServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\PathServiceInterface; use Pimcore\Bundle\GenericDataIndexBundle\Service\Search\SearchService\Asset\AssetSearchServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueueServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexService\IndexServiceInterface; -use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\SearchIndexConfigServiceInterface; -use Pimcore\Event\AssetEvents; -use Pimcore\Event\Model\AssetEvent; use Pimcore\Tests\Support\Util\TestHelper; class PathServiceTest extends \Codeception\Test\Unit @@ -47,23 +39,7 @@ protected function _after() public function testAssetPathRewrite() { - /** @var \Pimcore\SearchClient\SearchClientInterface $client */ - $client = $this->tester->getIndexSearchClient(); - /** @var SearchIndexConfigServiceInterface $configService */ - $configService = $this->tester->grabService(SearchIndexConfigServiceInterface::class); - $indexName = $configService->getIndexName('asset'); - - /** @var PathServiceInterface $pathService */ - $pathService = $this->tester->grabService(PathServiceInterface::class); - - /** @var IndexServiceInterface $indexService */ - $indexService = $this->tester->grabService(IndexServiceInterface::class); - - /** @var BulkOperationServiceInterface $bulkService */ - $bulkService = $this->tester->grabService(BulkOperationServiceInterface::class); - - // Step 1: Create asset and folder, save asset under folder $asset = TestHelper::createImageAsset(); $folder = TestHelper::createAssetFolder(); $asset @@ -71,185 +47,13 @@ public function testAssetPathRewrite() ->setKey('test-asset') ->save(); - // Capture pre-rename state - $folderPathBefore = $pathService->getCurrentIndexFullPath($folder); - $assetPathBefore = $pathService->getCurrentIndexFullPath($asset); - - $assetDocBefore = $client->get(['index' => $indexName, 'id' => $asset->getId()]); - $assetVersionBefore = $assetDocBefore['_version'] ?? 'N/A'; - $folderDocBefore = $client->get(['index' => $indexName, 'id' => $folder->getId()]); - $folderVersionBefore = $folderDocBefore['_version'] ?? 'N/A'; - - // Step 2: Disable the event subscriber so we can manually replicate the flow - $eventDispatcher = $this->tester->grabService('event_dispatcher'); - $listeners = $eventDispatcher->getListeners(AssetEvents::POST_UPDATE); - foreach ($listeners as $listener) { - $eventDispatcher->removeListener(AssetEvents::POST_UPDATE, $listener); - } - - // Step 3: Rename folder (DB only, no index update because subscriber is disabled) $folder->setKey('test-folder')->save(); - // Step 4: Now manually replicate what IndexQueueService::updateIndexQueue does, step by step - - // 4a: doHandleIndexData — adds folder to bulk buffer (NOT committed yet) - $doHandleError = 'none'; - try { - $indexService->updateIndexData($folder); - } catch (\Exception $e) { - $doHandleError = get_class($e) . ': ' . $e->getMessage(); - } - - // 4b: Check what getCurrentIndexFullPath returns BEFORE commit (should be OLD path) - $folderPathInOsBeforeCommit = $pathService->getCurrentIndexFullPath($folder); - - // 4c: Check countDocumentsByPath BEFORE commit - $countBeforeCommit = $client->search([ - 'index' => $indexName, - 'track_total_hits' => true, - 'rest_total_hits_as_int' => true, - 'body' => [ - 'query' => ['term' => ['system_fields.fullPath' => $folderPathInOsBeforeCommit]], - 'size' => 0, - ], - ]); - $countBeforeCommitTotal = $countBeforeCommit['hits']['total'] ?? 'N/A'; - - // 4d: rewriteChildrenIndexPaths BEFORE commit — capture exception if any - $rewriteError = 'none'; - try { - $pathService->rewriteChildrenIndexPaths($folder); - } catch (\Exception $e) { - $rewriteError = get_class($e) . ': ' . $e->getMessage(); - } - - // 4e: Check asset path AFTER rewrite but BEFORE commit - $assetPathAfterRewriteBeforeCommit = $pathService->getCurrentIndexFullPath($asset); - - $assetDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $asset->getId()]); - $assetVersionAfterRewrite = $assetDocAfterRewrite['_version'] ?? 'N/A'; - - $folderDocAfterRewrite = $client->get(['index' => $indexName, 'id' => $folder->getId()]); - $folderVersionAfterRewrite = $folderDocAfterRewrite['_version'] ?? 'N/A'; - - // 4f: Also do a manual updateByQuery to see the raw response - $manualUbqResponse = 'N/A'; - $manualUbqError = 'none'; - try { - $oldPath = $folderPathInOsBeforeCommit; - $newPath = $folder->getRealFullPath(); - $ubqResult = $client->updateByQuery([ - 'index' => $indexName, - 'refresh' => true, - 'conflicts' => 'proceed', - 'body' => [ - 'script' => [ - 'lang' => 'painless', - 'source' => "ctx._source.system_fields.checksum = 0", - 'params' => [], - ], - 'query' => [ - 'term' => [ - 'system_fields.fullPath' => $oldPath, - ], - ], - ], - ]); - $manualUbqResponse = json_encode($ubqResult); - } catch (\Exception $e) { - $manualUbqError = get_class($e) . ': ' . $e->getMessage(); - } - - // 4g: Now commit the bulk - $commitError = 'none'; - try { - $bulkService->commit(); - } catch (\Exception $e) { - $commitError = get_class($e) . ': ' . $e->getMessage(); - } - - // Step 5: Final state - $assetPathFinal = $pathService->getCurrentIndexFullPath($asset); - $folderPathFinal = $pathService->getCurrentIndexFullPath($folder); - - $assetDocFinal = $client->get(['index' => $indexName, 'id' => $asset->getId()]); - $assetVersionFinal = $assetDocFinal['_version'] ?? 'N/A'; - $assetSourceFinal = $assetDocFinal['_source']['system_fields'] ?? []; - - $folderDocFinal = $client->get(['index' => $indexName, 'id' => $folder->getId()]); - $folderVersionFinal = $folderDocFinal['_version'] ?? 'N/A'; - - // Detect engine from env vars - $esHost = getenv('PIMCORE_ELASTIC_SEARCH_HOST'); - $osHost = getenv('PIMCORE_OPEN_SEARCH_HOST'); - $serverInfo = sprintf('OS_HOST=%s ES_HOST=%s client=%s', $osHost ?: 'unset', $esHost ?: 'unset', get_class($client)); - - $diagnostics = sprintf( - "STEP-BY-STEP DIAGNOSTICS (engine: %s):\n" - . " BEFORE RENAME:\n" - . " folderPath='%s' assetPath='%s'\n" - . " assetVersion=%s folderVersion=%s\n" - . " AFTER doHandleIndexData (bulk buffer has folder, NOT committed):\n" - . " doHandleError: %s\n" - . " folderPathInOS='%s' (should be OLD path)\n" - . " countDocsByPath('%s')=%s\n" - . " folder.getRealFullPath()='%s'\n" - . " oldPath==newPath? %s\n" - . " AFTER rewriteChildrenIndexPaths (BEFORE commit):\n" - . " rewriteError: %s\n" - . " assetPath='%s'\n" - . " assetVersion: %s->%s (delta=%s)\n" - . " folderVersion: %s->%s (delta=%s)\n" - . " MANUAL updateByQuery (simple checksum=0 script):\n" - . " response: %s\n" - . " error: %s\n" - . " AFTER commit:\n" - . " commitError: %s\n" - . " assetPath='%s' folderPath='%s'\n" - . " assetVersion: %s (total delta=%s)\n" - . " folderVersion: %s (total delta=%s)\n" - . " assetSystemFields: path='%s' fullPath='%s' key='%s' checksum=%s", - $serverInfo, - $folderPathBefore, $assetPathBefore, - $assetVersionBefore, $folderVersionBefore, - $doHandleError, - $folderPathInOsBeforeCommit, - $folderPathInOsBeforeCommit, $countBeforeCommitTotal, - $folder->getRealFullPath(), - $folderPathInOsBeforeCommit === $folder->getRealFullPath() ? 'YES (early return!)' : 'NO (proceeds)', - $rewriteError, - $assetPathAfterRewriteBeforeCommit, - $assetVersionBefore, $assetVersionAfterRewrite, - is_numeric($assetVersionBefore) && is_numeric($assetVersionAfterRewrite) - ? ($assetVersionAfterRewrite - $assetVersionBefore) : '?', - $folderVersionBefore, $folderVersionAfterRewrite, - is_numeric($folderVersionBefore) && is_numeric($folderVersionAfterRewrite) - ? ($folderVersionAfterRewrite - $folderVersionBefore) : '?', - $manualUbqResponse, - $manualUbqError, - $commitError, - $assetPathFinal, $folderPathFinal, - $assetVersionFinal, - is_numeric($assetVersionBefore) && is_numeric($assetVersionFinal) - ? ($assetVersionFinal - $assetVersionBefore) : '?', - $folderVersionFinal, - is_numeric($folderVersionBefore) && is_numeric($folderVersionFinal) - ? ($folderVersionFinal - $folderVersionBefore) : '?', - $assetSourceFinal['path'] ?? 'N/A', - $assetSourceFinal['fullPath'] ?? 'N/A', - $assetSourceFinal['key'] ?? 'N/A', - $assetSourceFinal['checksum'] ?? 'N/A' - ); - - $this->assertEquals( - '/test-folder/test-asset', - $assetPathFinal, - $diagnostics - ); - /** @var AssetSearchServiceInterface $searchService */ $searchService = $this->tester->grabService('generic-data-index.test.service.asset-search-service'); + $searchResultItem = $searchService->byId($asset->getId()); + $this->assertEquals('/test-folder/test-asset', $searchResultItem->getFullPath()); } } From d8e6cb637065c8e12beb6fcef58dc514fc2ad5d8 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Thu, 12 Feb 2026 10:11:44 +0100 Subject: [PATCH 62/63] Delete pimcore indices only for gdi --- tests/Support/Helper/GenericDataIndex.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/Support/Helper/GenericDataIndex.php b/tests/Support/Helper/GenericDataIndex.php index b52bbba9..818e3c67 100644 --- a/tests/Support/Helper/GenericDataIndex.php +++ b/tests/Support/Helper/GenericDataIndex.php @@ -17,7 +17,6 @@ use Codeception\Lib\ModuleContainer; use Pimcore\Bundle\GenericDataIndexBundle\Installer; -use Pimcore\Bundle\GenericDataIndexBundle\Installer as GenericDataIndexInstaller; use Pimcore\Bundle\GenericDataIndexBundle\SearchIndexAdapter\DefaultSearch\Search\Modifier\Sort\TreeSortHandlers; use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\QueueMessagesDispatcher; use Pimcore\Bundle\GenericDataIndexBundle\Service\SearchIndex\IndexQueue\SynchronousProcessingRelatedIdsServiceInterface; @@ -175,8 +174,13 @@ public function cleanupIndex() { /** @var SearchClientInterface $client */ $client = $this->getIndexSearchClient(); + + /** @var SearchIndexConfigServiceInterface $configService */ + $configService = $this->grabService(SearchIndexConfigServiceInterface::class); + $indexPrefix = $configService->getIndexPrefix(); + $client->deleteByQuery([ - 'index' => '*', + 'index' => $indexPrefix . '*', 'body' => [ 'query' => [ 'match_all' => (object)[], From 13b7cf03edebf028abb14fb537e7cc5363e3a4f8 Mon Sep 17 00:00:00 2001 From: Marco Perberschlager Date: Thu, 12 Feb 2026 11:00:51 +0100 Subject: [PATCH 63/63] Fixed class reference --- tests/Support/Helper/GenericDataIndex.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Support/Helper/GenericDataIndex.php b/tests/Support/Helper/GenericDataIndex.php index 818e3c67..abe742f2 100644 --- a/tests/Support/Helper/GenericDataIndex.php +++ b/tests/Support/Helper/GenericDataIndex.php @@ -74,7 +74,7 @@ public function _beforeSuite($settings = []): void $this->debug('[Generic Data Index] Running bundle installer'); $genericDataIndexInstaller = $pimcoreModule->getContainer()->get( - GenericDataIndexInstaller::class + Installer::class ); $genericDataIndexInstaller->install();