diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index fcb77758984..ac1a1101fc7 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -378,57 +378,34 @@ jobs: strategy: matrix: php-version: - - "7.4" - - "8.1" + - "8.3" mysql-version: - "5.7" - "8.0" + - "9.0" extension: - "mysqli" - "pdo_mysql" config-file-suffix: - "" include: - - mysql-version: "8.0" - # https://stackoverflow.com/questions/60902904/how-to-pass-mysql-native-password-to-mysql-service-in-github-actions - custom-entrypoint: >- - --entrypoint sh mysql:8.0 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" - config-file-suffix: "-tls" php-version: "7.4" mysql-version: "8.0" extension: "mysqli" - - php-version: "8.2" + - php-version: "7.4" mysql-version: "8.0" extension: "mysqli" - custom-entrypoint: >- - --entrypoint sh mysql:8.0 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" - - php-version: "8.2" + - php-version: "7.4" mysql-version: "8.0" extension: "pdo_mysql" - custom-entrypoint: >- - --entrypoint sh mysql:8.0 -c "exec docker-entrypoint.sh mysqld --default-authentication-plugin=mysql_native_password" - - php-version: "8.3" - mysql-version: "8.0" - extension: "mysqli" + # Workaround for https://bugs.mysql.com/114876 - php-version: "8.3" - mysql-version: "8.0" - extension: "pdo_mysql" - - php-version: "7.4" mysql-version: "8.4" extension: "mysqli" custom-entrypoint: >- --entrypoint sh mysql:8.4 -c "exec docker-entrypoint.sh mysqld --mysql-native-password=ON" - - php-version: "7.4" - mysql-version: "8.4" - extension: "pdo_mysql" - custom-entrypoint: >- - --entrypoint sh mysql:8.4 -c "exec docker-entrypoint.sh mysqld --mysql-native-password=ON" - - php-version: "8.1" - mysql-version: "8.4" - extension: "mysqli" - custom-entrypoint: >- - --entrypoint sh mysql:8.4 -c "exec docker-entrypoint.sh mysqld --mysql-native-password=ON" - - php-version: "8.1" + - php-version: "8.3" mysql-version: "8.4" extension: "pdo_mysql" custom-entrypoint: >- diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 00000000000..99799afcb7d --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,72 @@ +name: "Continuous Integration (Nightly)" + +on: + schedule: + - cron: "12 3 * * *" + +env: + fail-fast: true + +jobs: + phpunit-mariadb: + name: "PHPUnit with MariaDB" + runs-on: "ubuntu-24.04" + + strategy: + matrix: + php-version: + - "7.4" + - "8.3" + mariadb-version: + - "earliest" + - "verylatest" + extension: + - "mysqli" + - "pdo_mysql" + + services: + mariadb: + image: "quay.io/mariadb-foundation/mariadb-devel:${{ 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@v4" + 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" + 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" + + - name: Tell the MariaDB Folks if it failed + if: ${{ failure() }} + uses: zulip/github-actions-zulip/send-message@v1 + with: + api-key: ${{ secrets.MARIADB_ZULIP_API_KEY }} + email: "doctrine-bot@mariadb.zulipchat.com" + organization-url: "https://mariadb.zulipchat.com" + to: "Buildbot" + type: "stream" + topic: "CI - Doctrine/DBAL" + content: "There was an error running Doctrine on MariaDB:${{ matrix.mariadb-version }} - URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}." diff --git a/src/Driver/API/MySQL/ExceptionConverter.php b/src/Driver/API/MySQL/ExceptionConverter.php index 87d50aff9e3..fdfc75a77fd 100644 --- a/src/Driver/API/MySQL/ExceptionConverter.php +++ b/src/Driver/API/MySQL/ExceptionConverter.php @@ -101,6 +101,7 @@ public function convert(Exception $exception, ?Query $query): DriverException return new ConnectionException($exception, $query); case 2006: + case 4031: return new ConnectionLost($exception, $query); case 1048: diff --git a/src/Schema/AbstractAsset.php b/src/Schema/AbstractAsset.php index ab8fdec0303..6934133ffb9 100644 --- a/src/Schema/AbstractAsset.php +++ b/src/Schema/AbstractAsset.php @@ -20,7 +20,8 @@ * The abstract asset allows to reset the name of all assets without publishing this to the public userland. * * This encapsulation hack is necessary to keep a consistent state of the database schema. Say we have a list of tables - * array($tableName => Table($tableName)); if you want to rename the table, you have to make sure + * array($tableName => Table($tableName)); if you want to rename the table, you have to make sure this does not get + * recreated during schema migration. */ abstract class AbstractAsset { diff --git a/tests/Driver/VersionAwarePlatformDriverTest.php b/tests/Driver/VersionAwarePlatformDriverTest.php index b567e00c177..c4f1d6bc58c 100644 --- a/tests/Driver/VersionAwarePlatformDriverTest.php +++ b/tests/Driver/VersionAwarePlatformDriverTest.php @@ -53,8 +53,8 @@ public static function mySQLVersionProvider(): array ['8', MySQL80Platform::class], ['8.0', MySQL80Platform::class], ['8.0.11', MySQL80Platform::class], - ['8.4', MySQL84Platform::class], - ['8.4.0', MySQL84Platform::class], + ['8.4.1', MySQL84Platform::class], + ['9.0.0', MySQL84Platform::class], ['6', MySQL57Platform::class], ['10.0.15-MariaDB-1~wheezy', MySQLPlatform::class], ['5.5.5-10.1.25-MariaDB', MySQLPlatform::class],