Skip to content

Commit 130ab63

Browse files
Bump doctrine/dbal from 3.0.0 to 3.1.3
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
1 parent fb18f29 commit 130ab63

5 files changed

Lines changed: 9 additions & 13 deletions

File tree

3rdparty

Submodule 3rdparty updated 118 files

lib/private/DB/QueryBuilder/QueryBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,9 +462,9 @@ public function setFirstResult($firstResult) {
462462

463463
/**
464464
* Gets the position of the first result the query object was set to retrieve (the "offset").
465-
* Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder.
465+
* Returns 0 if {@link setFirstResult} was not applied to this QueryBuilder.
466466
*
467-
* @return integer The position of the first result.
467+
* @return int The position of the first result.
468468
*/
469469
public function getFirstResult() {
470470
return $this->queryBuilder->getFirstResult();

lib/private/Repair/SqliteAutoincrement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public function run(IOutput $out) {
8383
foreach ($columnNames as $columnName) {
8484
$columnSchema = $tableSchema->getColumn($columnName);
8585
$columnDiff = new ColumnDiff($columnSchema->getName(), $columnSchema);
86-
$tableDiff->changedColumns[] = $columnDiff;
86+
$tableDiff->changedColumns[$columnSchema->getName()] = $columnDiff;
8787
$schemaDiff->changedTables[] = $tableDiff;
8888
}
8989
} catch (SchemaException $e) {

lib/public/DB/QueryBuilder/IQueryBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ public function setFirstResult($firstResult);
289289

290290
/**
291291
* Gets the position of the first result the query object was set to retrieve (the "offset").
292-
* Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder.
292+
* Returns 0 if {@link setFirstResult} was not applied to this QueryBuilder.
293293
*
294-
* @return integer The position of the first result.
294+
* @return int The position of the first result.
295295
* @since 8.2.0
296296
*/
297297
public function getFirstResult();

tests/lib/DB/QueryBuilder/QueryBuilderTest.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ protected function deleteTestingRows($appId = 'testFirstResult') {
102102

103103
public function dataFirstResult() {
104104
return [
105-
[null, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
105+
[0, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
106106
[0, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
107107
[1, [98, 97, 96, 95, 94, 93, 92, 91]],
108108
[5, [94, 93, 92, 91]],
@@ -112,7 +112,7 @@ public function dataFirstResult() {
112112
/**
113113
* @dataProvider dataFirstResult
114114
*
115-
* @param int $firstResult
115+
* @param int|null $firstResult
116116
* @param array $expectedSet
117117
*/
118118
public function testFirstResult($firstResult, $expectedSet) {
@@ -121,14 +121,10 @@ public function testFirstResult($firstResult, $expectedSet) {
121121

122122
if ($firstResult !== null) {
123123
$this->queryBuilder->setFirstResult($firstResult);
124-
125-
// FIXME Remove this once Doctrine/DBAL is >2.5.1:
126-
// FIXME See https://github.com/doctrine/dbal/pull/782
127-
$this->queryBuilder->setMaxResults(100);
128124
}
129125

130126
$this->assertSame(
131-
$firstResult,
127+
$firstResult ?? 0,
132128
$this->queryBuilder->getFirstResult()
133129
);
134130

0 commit comments

Comments
 (0)