diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index fcb702744ca..8f925e7b65d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -521,17 +521,15 @@ jobs: LICENSE: "accept" DBNAME: "doctrine" - options: >- - --health-cmd "su - ${DB2INSTANCE} -c \"db2 -t CONNECT TO ${DBNAME};\"" - --health-interval 30s - --health-timeout 10s - --health-retries 5 - --privileged + options: "--privileged" ports: - "50000:50000" steps: + - name: "Perform healthcheck" + run: "docker logs -f ${{ job.services.ibm_db2.id }} | sed '/(*) Setup has completed./ q'" + - name: "Create temporary tablespace" run: "docker exec ${{ job.services.ibm_db2.id }} su - db2inst1 -c 'db2 -t CONNECT TO doctrine; db2 -t CREATE USER TEMPORARY TABLESPACE doctrine_tbsp PAGESIZE 4 K;'" diff --git a/src/Driver/SQLSrv/Result.php b/src/Driver/SQLSrv/Result.php index ba9fc67ed58..a36687e5122 100644 --- a/src/Driver/SQLSrv/Result.php +++ b/src/Driver/SQLSrv/Result.php @@ -106,7 +106,7 @@ public function free(): void // @link http://php.net/manual/en/pdostatement.closecursor.php // @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075 // deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them - while (sqlsrv_fetch($this->statement)) { + while (sqlsrv_fetch($this->statement) === true) { } } diff --git a/src/Schema/SQLServerSchemaManager.php b/src/Schema/SQLServerSchemaManager.php index 18b9254e9b6..f170e826588 100644 --- a/src/Schema/SQLServerSchemaManager.php +++ b/src/Schema/SQLServerSchemaManager.php @@ -156,7 +156,7 @@ protected function _getPortableTableColumnDefinition(array $tableColumn): Column private function parseDefaultExpression(string $value): ?string { - while (preg_match('/^\((.*)\)$/s', $value, $matches)) { + while (preg_match('/^\((.*)\)$/s', $value, $matches) === 1) { $value = $matches[1]; } diff --git a/tests/Functional/Driver/OCI8/ResultTest.php b/tests/Functional/Driver/OCI8/ResultTest.php index df4e539bca2..8c445f7ddd7 100644 --- a/tests/Functional/Driver/OCI8/ResultTest.php +++ b/tests/Functional/Driver/OCI8/ResultTest.php @@ -100,7 +100,7 @@ public function testTruncatedFetch( } try { - while ($result->fetchOne()) { + while ($result->fetchOne() !== false) { // Attempt to access all remaining rows from the original fetch // The rows locally cached from the default prefetch will first be used // but when the result attempts to get the remaining 10 rows beyond diff --git a/tests/Functional/PortabilityTest.php b/tests/Functional/PortabilityTest.php index 2c498612e3e..e2fe3d380c9 100644 --- a/tests/Functional/PortabilityTest.php +++ b/tests/Functional/PortabilityTest.php @@ -36,7 +36,7 @@ public function testFullFetchMode(): void $result = $this->connection->executeQuery('SELECT * FROM portability_table'); - while (($row = $result->fetchAssociative())) { + while (($row = $result->fetchAssociative()) !== false) { $this->assertFetchResultRow($row); } @@ -44,7 +44,7 @@ public function testFullFetchMode(): void ->prepare('SELECT * FROM portability_table') ->executeQuery(); - while (($row = $result->fetchAssociative())) { + while (($row = $result->fetchAssociative()) !== false) { $this->assertFetchResultRow($row); } }