Skip to content

Commit d2ce5e1

Browse files
authored
Merge pull request #6875 from greg0ire/fix-build
Fix build
2 parents a211855 + 88695e8 commit d2ce5e1

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/Driver/SQLSrv/Result.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function free(): void
106106
// @link http://php.net/manual/en/pdostatement.closecursor.php
107107
// @link https://github.com/php/php-src/blob/php-7.0.11/ext/pdo/pdo_stmt.c#L2075
108108
// deliberately do not consider multiple result sets, since doctrine/dbal doesn't support them
109-
while (sqlsrv_fetch($this->statement)) {
109+
while (sqlsrv_fetch($this->statement) === true) {
110110
}
111111
}
112112

src/Schema/SQLServerSchemaManager.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ protected function _getPortableTableColumnDefinition($tableColumn)
197197

198198
private function parseDefaultExpression(string $value): ?string
199199
{
200-
while (preg_match('/^\((.*)\)$/s', $value, $matches)) {
200+
while (preg_match('/^\((.*)\)$/s', $value, $matches) === 1) {
201201
$value = $matches[1];
202202
}
203203

tests/Functional/Driver/OCI8/ResultTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ public function testTruncatedFetch(
9696
$this->createOrReplacePipelinedFunction($expectedTotalRowCount + 10);
9797
}
9898

99-
while ($result->fetchOne()) {
99+
while ($result->fetchOne() !== false) {
100100
// Attempt to access all remaining rows from the original fetch
101101
// The rows locally cached from the default prefetch will first be used
102102
// but when the result attempts to get the remaining 10 rows beyond

tests/Functional/PortabilityTest.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,15 @@ public function testFullFetchMode(): void
3333

3434
$result = $this->connection->executeQuery('SELECT * FROM portability_table');
3535

36-
while (($row = $result->fetchAssociative())) {
36+
while (($row = $result->fetchAssociative()) !== false) {
3737
$this->assertFetchResultRow($row);
3838
}
3939

4040
$result = $this->connection
4141
->prepare('SELECT * FROM portability_table')
4242
->execute();
4343

44-
while (($row = $result->fetchAssociative())) {
44+
while (($row = $result->fetchAssociative()) !== false) {
4545
$this->assertFetchResultRow($row);
4646
}
4747
}

tests/FunctionalTestCase.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ final protected function disconnect(): void
6868
// (e.g. to drop a table), and then this reopened connection will remain open and attached to the PHPUnit result
6969
// until the end of the suite leaking connection resources, while subsequent tests will use
7070
// the newly established shared connection.
71-
unset($this->connection);
71+
unset($this->connection); // @phpstan-ignore unset.possiblyHookedProperty
7272

7373
$this->isConnectionReusable = true;
7474
}

0 commit comments

Comments
 (0)