Deprecate string default expressions #9653
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" | |
| on: | |
| pull_request: | |
| branches: | |
| - "*.x" | |
| paths: | |
| - .github/workflows/continuous-integration.yml | |
| - ci/** | |
| - composer.* | |
| - src/** | |
| - tests/** | |
| push: | |
| branches: | |
| - "*.x" | |
| paths: | |
| - .github/workflows/continuous-integration.yml | |
| - ci/** | |
| - composer.* | |
| - src/** | |
| - tests/** | |
| env: | |
| fail-fast: true | |
| jobs: | |
| phpunit-smoke-check: | |
| name: "PHPUnit with SQLite" | |
| runs-on: "ubuntu-22.04" | |
| strategy: | |
| matrix: | |
| php-version: | |
| - "8.1" | |
| - "8.2" | |
| - "8.3" | |
| - "8.4" | |
| - "8.5" | |
| dbal-version: | |
| - "default" | |
| - "3.7" | |
| extension: | |
| - "sqlite3" | |
| - "pdo_sqlite" | |
| deps: | |
| - "highest" | |
| stability: | |
| - "stable" | |
| native_lazy: | |
| - "0" | |
| include: | |
| - php-version: "8.2" | |
| dbal-version: "4@dev" | |
| extension: "pdo_sqlite" | |
| stability: "stable" | |
| native_lazy: "0" | |
| - php-version: "8.2" | |
| dbal-version: "4@dev" | |
| extension: "sqlite3" | |
| stability: "stable" | |
| native_lazy: "0" | |
| - php-version: "8.1" | |
| dbal-version: "default" | |
| deps: "lowest" | |
| extension: "pdo_sqlite" | |
| stability: "stable" | |
| native_lazy: "0" | |
| - php-version: "8.4" | |
| dbal-version: "default" | |
| deps: "highest" | |
| extension: "pdo_sqlite" | |
| stability: "stable" | |
| native_lazy: "1" | |
| - php-version: "8.4" | |
| dbal-version: "default" | |
| deps: "highest" | |
| extension: "sqlite3" | |
| stability: "dev" | |
| native_lazy: "1" | |
| 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: "Allow dev dependencies" | |
| run: | | |
| composer config minimum-stability dev | |
| composer remove --no-update --dev phpbench/phpbench phpdocumentor/guides-cli | |
| composer require --no-update symfony/console:^8 symfony/var-exporter:^8 doctrine/dbal:^4.4 | |
| composer require --dev --no-update symfony/cache:^8 | |
| if: "${{ matrix.stability == 'dev' }}" | |
| - name: "Require specific DBAL version" | |
| run: "composer require doctrine/dbal ^${{ matrix.dbal-version }} --no-update" | |
| if: "${{ matrix.dbal-version != 'default' }}" | |
| - name: "Downgrade VarExporter" | |
| run: 'composer require --no-update "symfony/var-exporter:^6.4 || ^7.4"' | |
| if: "${{ matrix.native_lazy == '0' }}" | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--ignore-platform-req=php+" | |
| dependency-versions: "${{ matrix.deps }}" | |
| - 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 | |
| ENABLE_NATIVE_LAZY_OBJECTS: ${{ matrix.native_lazy }} | |
| - name: "Run PHPUnit with Second Level Cache and PHPUnit 10" | |
| run: | | |
| vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \ | |
| --exclude-group=performance,non-cacheable,locking_functional \ | |
| --coverage-clover=coverage-cache.xml | |
| if: "${{ matrix.php-version == '8.1' }}" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 1 | |
| ENABLE_NATIVE_LAZY_OBJECTS: ${{ matrix.native_lazy }} | |
| - name: "Run PHPUnit with Second Level Cache and PHPUnit 11+" | |
| run: | | |
| vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \ | |
| --exclude-group=performance \ | |
| --exclude-group=non-cacheable \ | |
| --exclude-group=locking_functional \ | |
| --coverage-clover=coverage-cache.xml | |
| if: "${{ matrix.php-version != '8.1' }}" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 1 | |
| ENABLE_NATIVE_LAZY_OBJECTS: ${{ matrix.native_lazy }} | |
| - name: "Upload coverage file" | |
| uses: "actions/upload-artifact@v5" | |
| with: | |
| name: "phpunit-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.deps }}-${{ matrix.stability }}-${{ matrix.native_lazy }}-coverage" | |
| path: "coverage*.xml" | |
| phpunit-deprecations: | |
| name: "PHPUnit (fail on deprecations)" | |
| runs-on: "ubuntu-24.04" | |
| steps: | |
| - name: "Checkout" | |
| uses: "actions/checkout@v5" | |
| with: | |
| fetch-depth: 2 | |
| - name: "Install PHP" | |
| uses: "shivammathur/setup-php@v2" | |
| with: | |
| php-version: "8.5" | |
| extensions: "apcu, pdo, sqlite3" | |
| coverage: "pcov" | |
| ini-values: "zend.assertions=1, apc.enable_cli=1" | |
| - name: "Allow dev dependencies" | |
| run: composer config minimum-stability dev | |
| - name: "Install dependencies with Composer" | |
| uses: "ramsey/composer-install@v3" | |
| with: | |
| composer-options: "--ignore-platform-req=php+" | |
| dependency-versions: "highest" | |
| - name: "Run PHPUnit" | |
| run: "vendor/bin/phpunit -c ci/github/phpunit/sqlite3.xml --fail-on-deprecation" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 0 | |
| ENABLE_NATIVE_LAZY_OBJECTS: 1 | |
| phpunit-postgres: | |
| name: "PHPUnit with PostgreSQL" | |
| 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.7" | |
| postgres-version: | |
| - "17" | |
| extension: | |
| - pdo_pgsql | |
| - pgsql | |
| include: | |
| - php-version: "8.2" | |
| dbal-version: "4@dev" | |
| postgres-version: "14" | |
| extension: pdo_pgsql | |
| - php-version: "8.2" | |
| dbal-version: "3.7" | |
| 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@v5" | |
| with: | |
| name: "${{ github.job }}-${{ matrix.postgres-version }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-${{ matrix.extension }}-coverage" | |
| path: "coverage.xml" | |
| phpunit-mariadb: | |
| name: "PHPUnit with MariaDB" | |
| 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.7" | |
| - "4@dev" | |
| mariadb-version: | |
| - "11.4" | |
| extension: | |
| - "mysqli" | |
| - "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@v5" | |
| with: | |
| name: "${{ github.job }}-${{ matrix.mariadb-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage" | |
| path: "coverage.xml" | |
| phpunit-mysql: | |
| name: "PHPUnit with MySQL" | |
| 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.7" | |
| mysql-version: | |
| - "5.7" | |
| - "8.0" | |
| extension: | |
| - "mysqli" | |
| - "pdo_mysql" | |
| include: | |
| - php-version: "8.2" | |
| dbal-version: "4@dev" | |
| mysql-version: "8.0" | |
| extension: "mysqli" | |
| - php-version: "8.2" | |
| dbal-version: "4@dev" | |
| 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 and PHPUnit 10" | |
| run: | | |
| vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \ | |
| --exclude-group=performance,non-cacheable,locking_functional \ | |
| --coverage-clover=coverage-no-cache.xml" | |
| if: "${{ matrix.php-version == '8.1' }}" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 1 | |
| - name: "Run PHPUnit with Second Level Cache and PHPUnit 11+" | |
| run: | | |
| vendor/bin/phpunit -c ci/github/phpunit/${{ matrix.extension }}.xml \ | |
| --exclude-group=performance \ | |
| --exclude-group=non-cacheable \ | |
| --exclude-group=locking_functional \ | |
| --coverage-clover=coverage-no-cache.xml | |
| if: "${{ matrix.php-version != '8.1' }}" | |
| env: | |
| ENABLE_SECOND_LEVEL_CACHE: 1 | |
| - name: "Upload coverage files" | |
| uses: "actions/upload-artifact@v5" | |
| with: | |
| name: "${{ github.job }}-${{ matrix.mysql-version }}-${{ matrix.extension }}-${{ matrix.php-version }}-${{ matrix.dbal-version }}-coverage" | |
| path: "coverage*.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@v6" | |
| with: | |
| path: "reports" | |
| - name: "Upload to Codecov" | |
| uses: "codecov/codecov-action@v5" | |
| with: | |
| directory: reports | |
| env: | |
| CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" |