12225 Fix hydration issue when using indexBy, SQL filter, and inheritance mapping #9761
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "CI: PHPUnit" | |
| on: | |
| pull_request: | |
| branches: | |
| - "*.x" | |
| paths: | |
| - .github/workflows/continuous-integration.yml | |
| - ci/** | |
| - composer.* | |
| - src/** | |
| - phpunit.xml.dist | |
| - tests/** | |
| push: | |
| branches: | |
| - "*.x" | |
| paths: | |
| - .github/workflows/continuous-integration.yml | |
| - ci/** | |
| - composer.* | |
| - src/** | |
| - phpunit.xml.dist | |
| - tests/** | |
| env: | |
| fail-fast: true | |
| jobs: | |
| phpunit-smoke-check: | |
| name: > | |
| SQLite - | |
| ${{ format('PHP {0} - DBAL {1} - ext. {2} - proxy {3}', | |
| matrix.php-version || 'Ø', | |
| matrix.dbal-version || 'Ø', | |
| matrix.extension || 'Ø', | |
| matrix.proxy || 'Ø' | |
| ) }} | |
| runs-on: "ubuntu-22.04" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "7.2" | |
| - "7.3" | |
| - "7.4" | |
| - "8.0" | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| dbal-version: | |
| - "default" | |
| extension: | |
| - "pdo_sqlite" | |
| proxy: | |
| - "common" | |
| include: | |
| - php-version: "8.0" | |
| dbal-version: "2.13" | |
| extension: "pdo_sqlite" | |
| - php-version: "8.2" | |
| dbal-version: "3@dev" | |
| extension: "pdo_sqlite" | |
| - php-version: "8.2" | |
| dbal-version: "default" | |
| extension: "sqlite3" | |
| - php-version: "8.1" | |
| dbal-version: "default" | |
| proxy: "lazy-ghost" | |
| extension: "pdo_sqlite" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| extensions: "apcu, pdo, ${{ matrix.extension }}" | |
| coverage: "pcov" | |
| ini-values: "zend.assertions=1, apc.enable_cli=1" | |
| - name: "Require specific DBAL version" | |
| run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update" | |
| if: "${{ matrix.dbal-version != 'default' }}" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--ignore-platform-req=php+" | |
| - name: "Run PHPUnit" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage-no-cache.xml" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 0 | |
| ORM_PROXY_IMPLEMENTATION: "${{ matrix.proxy }}" | |
| - name: "Run PHPUnit with Second Level Cache" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-cache.xml" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 1 | |
| ORM_PROXY_IMPLEMENTATION: "${{ matrix.proxy }}" | |
| - name: "Upload coverage file" | |
| uses: "actions/upload-artifact@v6" | |
| with: | |
| name: "phpunit-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.proxy }}-coverage" | |
| path: "coverage*.xml" | |
| phpunit-postgres: | |
| name: > | |
| ${{ format('PostgreSQL {0} - PHP {1} - DBAL {2} - ext. {3}', | |
| matrix.postgres-version || 'Ø', | |
| matrix.php-version || 'Ø', | |
| matrix.dbal-version || 'Ø', | |
| matrix.extension || 'Ø' | |
| ) }} | |
| runs-on: "ubuntu-22.04" | |
| needs: "phpunit-smoke-check" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| dbal-version: | |
| - "default" | |
| - "3@dev" | |
| postgres-version: | |
| - "17" | |
| extension: | |
| - pdo_pgsql | |
| - pgsql | |
| include: | |
| - php-version: "8.0" | |
| dbal-version: "2.13" | |
| postgres-version: "14" | |
| extension: pdo_pgsql | |
| - php-version: "8.2" | |
| dbal-version: "default" | |
| postgres-version: "9.6" | |
| extension: pdo_pgsql | |
| services: | |
| postgres: | |
| image: "postgres:${{ matrix.postgres-version }}" | |
| env: | |
| POSTGRES_PASSWORD: "postgres" | |
| options: >- | |
| --health-cmd "pg_isready" | |
| ports: | |
| - "5432:5432" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| extensions: "pgsql pdo_pgsql" | |
| coverage: "pcov" | |
| ini-values: "zend.assertions=1, apc.enable_cli=1" | |
| - name: "Require specific DBAL version" | |
| run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update" | |
| if: "${{ matrix.dbal-version != 'default' }}" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--ignore-platform-req=php+" | |
| - name: "Run PHPUnit" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_pgsql.xml --coverage-clover=coverage.xml" | |
| - name: "Upload coverage file" | |
| uses: "actions/upload-artifact@v6" | |
| with: | |
| name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.extension }}-coverage" | |
| path: "coverage.xml" | |
| phpunit-mariadb: | |
| name: > | |
| ${{ format('MariaDB {0} - PHP {1} - DBAL {2} - ext. {3}', | |
| matrix.mariadb-version || 'Ø', | |
| matrix.php-version || 'Ø', | |
| matrix.dbal-version || 'Ø', | |
| matrix.extension || 'Ø' | |
| ) }} | |
| runs-on: "ubuntu-22.04" | |
| needs: "phpunit-smoke-check" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| dbal-version: | |
| - "default" | |
| - "3@dev" | |
| mariadb-version: | |
| - "11.4" | |
| extension: | |
| - "mysqli" | |
| - "pdo_mysql" | |
| include: | |
| - php-version: "8.0" | |
| dbal-version: "2.13" | |
| mariadb-version: "10.6" | |
| extension: "pdo_mysql" | |
| services: | |
| mariadb: | |
| image: "mariadb:${{ matrix.mariadb-version }}" | |
| env: | |
| MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes | |
| MARIADB_DATABASE: "doctrine_tests" | |
| options: >- | |
| --health-cmd "healthcheck.sh --connect --innodb_initialized" | |
| ports: | |
| - "3306:3306" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Require specific DBAL version" | |
| run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update" | |
| if: "${{ matrix.dbal-version != 'default' }}" | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "pcov" | |
| ini-values: "zend.assertions=1, apc.enable_cli=1" | |
| extensions: "${{ matrix.extension }}" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--ignore-platform-req=php+" | |
| - name: "Run PHPUnit" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage.xml" | |
| - name: "Upload coverage file" | |
| uses: "actions/upload-artifact@v6" | |
| with: | |
| name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage" | |
| path: "coverage.xml" | |
| phpunit-mysql: | |
| name: > | |
| ${{ format('MySQL {0} - PHP {1} - DBAL {2} - ext. {3}', | |
| matrix.mysql-version || 'Ø', | |
| matrix.php-version || 'Ø', | |
| matrix.dbal-version || 'Ø', | |
| matrix.extension || 'Ø' | |
| ) }} | |
| runs-on: "ubuntu-22.04" | |
| needs: "phpunit-smoke-check" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| dbal-version: | |
| - "default" | |
| - "3@dev" | |
| mysql-version: | |
| - "5.7" | |
| - "8.0" | |
| extension: | |
| - "mysqli" | |
| - "pdo_mysql" | |
| include: | |
| - php-version: "8.0" | |
| dbal-version: "2.13" | |
| mysql-version: "8.0" | |
| extension: "pdo_mysql" | |
| services: | |
| mysql: | |
| image: "mysql:${{ matrix.mysql-version }}" | |
| options: >- | |
| --health-cmd "mysqladmin ping --silent" | |
| -e MYSQL_ALLOW_EMPTY_PASSWORD=yes | |
| -e MYSQL_DATABASE=doctrine_tests | |
| ports: | |
| - "3306:3306" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| coverage: "pcov" | |
| ini-values: "zend.assertions=1, apc.enable_cli=1" | |
| extensions: "${{ matrix.extension }}" | |
| - name: "Require specific DBAL version" | |
| run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update" | |
| if: "${{ matrix.dbal-version != 'default' }}" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--ignore-platform-req=php+" | |
| - name: "Run PHPUnit" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --coverage-clover=coverage-no-cache.xml" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 0 | |
| - name: "Run PHPUnit with Second Level Cache" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml --exclude-group performance,non-cacheable,locking_functional --coverage-clover=coverage-no-cache.xml" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 1 | |
| - name: "Upload coverage files" | |
| uses: "actions/upload-artifact@v6" | |
| with: | |
| name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage" | |
| path: "coverage*.xml" | |
| phpunit-lower-php-versions: | |
| name: > | |
| SQLite - | |
| ${{ format('PHP {0} - deps {1}', | |
| matrix.php-version || 'Ø', | |
| matrix.deps || 'Ø' | |
| ) }} | |
| runs-on: "ubuntu-22.04" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "7.1" | |
| deps: | |
| - "highest" | |
| - "lowest" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "${{ matrix.php-version }}" | |
| ini-values: "zend.assertions=1, apc.enable_cli=1" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| dependency-versions: "${{ matrix.deps }}" | |
| - name: "Run PHPUnit" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/pdo_sqlite.xml" | |
| upload_coverage: | |
| name: "Upload coverage to Codecov" | |
| runs-on: "ubuntu-22.04" | |
| # Only run on PRs from forks | |
| if: "github.event.pull_request.head.repo.full_name != github.repository" | |
| needs: | |
| - "phpunit-smoke-check" | |
| - "phpunit-postgres" | |
| - "phpunit-mariadb" | |
| - "phpunit-mysql" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v6" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Download coverage files" | |
| uses: "actions/download-artifact@v7" | |
| with: | |
| path: "reports" | |
| - name: "Upload to Codecov" | |
| uses: "codecov/codecov-action@v5" | |
| with: | |
| directory: reports | |
| env: | |
| CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" |