Skip to content

Commit

Permalink
Bump doctrine/dbal from 3.0.0 to 3.1.3
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Oct 22, 2021
1 parent fb18f29 commit 130ab63
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 118 files
4 changes: 2 additions & 2 deletions lib/private/DB/QueryBuilder/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,9 @@ public function setFirstResult($firstResult) {

/**
* Gets the position of the first result the query object was set to retrieve (the "offset").
* Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder.
* Returns 0 if {@link setFirstResult} was not applied to this QueryBuilder.
*
* @return integer The position of the first result.
* @return int The position of the first result.
*/
public function getFirstResult() {
return $this->queryBuilder->getFirstResult();
Expand Down
2 changes: 1 addition & 1 deletion lib/private/Repair/SqliteAutoincrement.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function run(IOutput $out) {
foreach ($columnNames as $columnName) {
$columnSchema = $tableSchema->getColumn($columnName);
$columnDiff = new ColumnDiff($columnSchema->getName(), $columnSchema);
$tableDiff->changedColumns[] = $columnDiff;
$tableDiff->changedColumns[$columnSchema->getName()] = $columnDiff;
$schemaDiff->changedTables[] = $tableDiff;
}
} catch (SchemaException $e) {
Expand Down
4 changes: 2 additions & 2 deletions lib/public/DB/QueryBuilder/IQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ public function setFirstResult($firstResult);

/**
* Gets the position of the first result the query object was set to retrieve (the "offset").
* Returns NULL if {@link setFirstResult} was not applied to this QueryBuilder.
* Returns 0 if {@link setFirstResult} was not applied to this QueryBuilder.
*
* @return integer The position of the first result.
* @return int The position of the first result.
* @since 8.2.0
*/
public function getFirstResult();
Expand Down
10 changes: 3 additions & 7 deletions tests/lib/DB/QueryBuilder/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected function deleteTestingRows($appId = 'testFirstResult') {

public function dataFirstResult() {
return [
[null, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
[0, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
[0, [99, 98, 97, 96, 95, 94, 93, 92, 91]],
[1, [98, 97, 96, 95, 94, 93, 92, 91]],
[5, [94, 93, 92, 91]],
Expand All @@ -112,7 +112,7 @@ public function dataFirstResult() {
/**
* @dataProvider dataFirstResult
*
* @param int $firstResult
* @param int|null $firstResult
* @param array $expectedSet
*/
public function testFirstResult($firstResult, $expectedSet) {
Expand All @@ -121,14 +121,10 @@ public function testFirstResult($firstResult, $expectedSet) {

if ($firstResult !== null) {
$this->queryBuilder->setFirstResult($firstResult);

// FIXME Remove this once Doctrine/DBAL is >2.5.1:
// FIXME See https://github.com/doctrine/dbal/pull/782
$this->queryBuilder->setMaxResults(100);
}

$this->assertSame(
$firstResult,
$firstResult ?? 0,
$this->queryBuilder->getFirstResult()
);

Expand Down

0 comments on commit 130ab63

Please sign in to comment.