Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump doctrine/dbal from 3.0.0 to 3.1.3 #29344

Merged
merged 1 commit into from
Oct 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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