Skip to content

Commit 640758f

Browse files
committed
Add two more deprecation notices
1 parent da54aaa commit 640758f

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/Query/Exec/SingleSelectExecutor.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66

77
use Doctrine\DBAL\Connection;
88
use Doctrine\DBAL\Result;
9+
use Doctrine\Deprecations\Deprecation;
910
use Doctrine\ORM\Query\AST\SelectStatement;
11+
use Doctrine\ORM\Query\OutputWalker;
1012
use Doctrine\ORM\Query\SqlWalker;
1113

1214
/**
@@ -18,6 +20,14 @@ class SingleSelectExecutor extends AbstractSqlExecutor
1820
{
1921
public function __construct(SelectStatement $AST, SqlWalker $sqlWalker)
2022
{
23+
Deprecation::trigger(
24+
'doctrine/orm',
25+
'https://github.com/doctrine/orm/pull/11188/',
26+
'The %s is no longer needed by the ORM and will be removed in 4.0',
27+
OutputWalker::class,
28+
__METHOD__
29+
);
30+
2131
$this->sqlStatements = $sqlWalker->walkSelectStatement($AST);
2232
}
2333

src/Query/SqlWalker.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@
99
use Doctrine\DBAL\LockMode;
1010
use Doctrine\DBAL\Platforms\AbstractPlatform;
1111
use Doctrine\DBAL\Types\Type;
12+
use Doctrine\Deprecations\Deprecation;
1213
use Doctrine\ORM\EntityManagerInterface;
1314
use Doctrine\ORM\Mapping\ClassMetadata;
1415
use Doctrine\ORM\Mapping\QuoteStrategy;
1516
use Doctrine\ORM\OptimisticLockException;
1617
use Doctrine\ORM\Query;
18+
use Doctrine\ORM\Query\Exec\SqlFinalizer;
1719
use Doctrine\ORM\Utility\HierarchyDiscriminatorResolver;
1820
use Doctrine\ORM\Utility\PersisterHelper;
1921
use InvalidArgumentException;
@@ -230,6 +232,14 @@ public function setQueryComponent(string $dqlAlias, array $queryComponent): void
230232
*/
231233
public function getExecutor(AST\SelectStatement|AST\UpdateStatement|AST\DeleteStatement $statement): Exec\AbstractSqlExecutor
232234
{
235+
Deprecation::trigger(
236+
'doctrine/orm',
237+
'https://github.com/doctrine/orm/pull/11188/',
238+
'Output walkers should implement %s. That way, the %s method is no longer needed and will be removed in 4.0',
239+
OutputWalker::class,
240+
__METHOD__
241+
);
242+
233243
return match (true) {
234244
$statement instanceof AST\UpdateStatement => $this->createUpdateStatementExecutor($statement),
235245
$statement instanceof AST\DeleteStatement => $this->createDeleteStatementExecutor($statement),

0 commit comments

Comments
 (0)