Skip to content

Commit

Permalink
Add a deprecation message
Browse files Browse the repository at this point in the history
  • Loading branch information
mpdude committed Oct 8, 2024
1 parent 29e1e40 commit 50e1f98
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Query.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Doctrine\ORM\Query\AST\SelectStatement;
use Doctrine\ORM\Query\AST\UpdateStatement;
use Doctrine\ORM\Query\Exec\AbstractSqlExecutor;
use Doctrine\ORM\Query\Exec\SqlFinalizer;
use Doctrine\ORM\Query\OutputWalker;
use Doctrine\ORM\Query\Parameter;
use Doctrine\ORM\Query\ParameterTypeInferer;
Expand Down Expand Up @@ -838,6 +839,14 @@ protected function getQueryCacheId(): string
if (is_a($outputWalkerClass, OutputWalker::class, true)) {
$firstAndMaxResult = '';
} else {
Deprecation::trigger(
'doctrine/orm',
'https://github.com/doctrine/orm/pull/11188/',
'Your output walker class %s should implement %s and provide a %s. This also means the output walker should not use the query firstResult/maxResult values, which should be added in the finalization phase only.',
$outputWalkerClass,
OutputWalker::class,
SqlFinalizer::class
);
$firstAndMaxResult = '&firstResult=' . $this->firstResult . '&maxResult=' . $this->maxResults;
}
}
Expand Down

0 comments on commit 50e1f98

Please sign in to comment.