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

Replace TODO with proper PR link #6195

Merged
merged 1 commit into from
Oct 15, 2023
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
8 changes: 4 additions & 4 deletions src/Query/QueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,7 @@ public function resetQueryParts($queryPartNames = null)
{
Deprecation::trigger(
'doctrine/dbal',
'TODO',
'https://github.com/doctrine/dbal/pull/6193',
'%s() is deprecated, instead use dedicated reset methods for the parts that shall be reset.',
__METHOD__,
);
Expand Down Expand Up @@ -1381,7 +1381,7 @@ public function resetQueryPart($queryPartName)
if ($queryPartName === 'distinct') {
Deprecation::trigger(
'doctrine/dbal',
'TODO',
'https://github.com/doctrine/dbal/pull/6193',
'Calling %s() with "distinct" is deprecated, call distinct(false) instead.',
__METHOD__,
);
Expand All @@ -1393,7 +1393,7 @@ public function resetQueryPart($queryPartName)
if (array_key_exists($queryPartName, self::SQL_PARTS_DEFAULTS) && method_exists($this, $newMethodName)) {
Deprecation::trigger(
'doctrine/dbal',
'TODO',
'https://github.com/doctrine/dbal/pull/6193',
'Calling %s() with "%s" is deprecated, call %s() instead.',
__METHOD__,
$queryPartName,
Expand All @@ -1405,7 +1405,7 @@ public function resetQueryPart($queryPartName)

Deprecation::trigger(
'doctrine/dbal',
'TODO',
'https://github.com/doctrine/dbal/pull/6193',
'Calling %s() with "%s" is deprecated without replacement.',
__METHOD__,
$queryPartName,
Expand Down
26 changes: 13 additions & 13 deletions tests/Query/QueryBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -627,7 +627,7 @@ public function testResetQueryParts(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryParts(['distinct', 'where', 'orderBy']);

self::assertEquals('SELECT u.* FROM users u', (string) $qb);
Expand All @@ -637,7 +637,7 @@ public function testLegacyResetSelect(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryPart('select')->addSelect('u.name');

self::assertEquals('SELECT DISTINCT u.name FROM users u WHERE u.name = ? ORDER BY u.name ASC', (string) $qb);
Expand All @@ -647,7 +647,7 @@ public function testLegacyResetDistinct(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryPart('distinct');

self::assertEquals('SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC', (string) $qb);
Expand All @@ -657,7 +657,7 @@ public function testResetDistinct(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectNoDeprecationWithIdentifier('TODO');
$this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->distinct(false);

self::assertEquals('SELECT u.* FROM users u WHERE u.name = ? ORDER BY u.name ASC', (string) $qb);
Expand All @@ -667,7 +667,7 @@ public function testLegacyResetWhere(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryPart('where');

self::assertEquals('SELECT DISTINCT u.* FROM users u ORDER BY u.name ASC', (string) $qb);
Expand All @@ -677,7 +677,7 @@ public function testResetWhere(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectNoDeprecationWithIdentifier('TODO');
$this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetWhere();

self::assertEquals('SELECT DISTINCT u.* FROM users u ORDER BY u.name ASC', (string) $qb);
Expand All @@ -687,7 +687,7 @@ public function testLegacyResetOrderBy(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryPart('orderBy');

self::assertEquals('SELECT DISTINCT u.* FROM users u WHERE u.name = ?', (string) $qb);
Expand All @@ -697,7 +697,7 @@ public function testResetOrderBy(): void
{
$qb = $this->prepareQueryBuilderToReset();

$this->expectNoDeprecationWithIdentifier('TODO');
$this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetOrderBy();

self::assertEquals('SELECT DISTINCT u.* FROM users u WHERE u.name = ?', (string) $qb);
Expand All @@ -724,7 +724,7 @@ public function testLegacyResetHaving(): void
{
$qb = $this->prepareGroupedQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryPart('having');

self::assertEquals(
Expand All @@ -737,7 +737,7 @@ public function testResetHaving(): void
{
$qb = $this->prepareGroupedQueryBuilderToReset();

$this->expectNoDeprecationWithIdentifier('TODO');
$this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetHaving();

self::assertEquals(
Expand All @@ -750,7 +750,7 @@ public function testLegacyResetGroupBy(): void
{
$qb = $this->prepareGroupedQueryBuilderToReset();

$this->expectDeprecationWithIdentifier('TODO');
$this->expectDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetQueryPart('groupBy');

self::assertEquals(
Expand All @@ -759,11 +759,11 @@ public function testLegacyResetGroupBy(): void
);
}

public function testGroupBy(): void
public function testResetGroupBy(): void
{
$qb = $this->prepareGroupedQueryBuilderToReset();

$this->expectNoDeprecationWithIdentifier('TODO');
$this->expectNoDeprecationWithIdentifier('https://github.com/doctrine/dbal/pull/6193');
$qb->resetGroupBy();

self::assertEquals(
Expand Down