Skip to content

Commit fd9aef0

Browse files
committed
Deprecate the \Doctrine\ORM\Query\Parser::setCustomOutputTreeWalker() method
1 parent 91709c1 commit fd9aef0

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Query/Parser.php

+7
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,13 @@ public function __construct(Query $query)
200200
*/
201201
public function setCustomOutputTreeWalker($className)
202202
{
203+
Deprecation::trigger(
204+
'doctrine/orm',
205+
'xx',
206+
'%s is deprecated, set the output walker class in a query hint instead',
207+
__METHOD__
208+
);
209+
203210
$this->customOutputWalker = $className;
204211
}
205212

tests/Tests/ORM/Query/LanguageRecognitionTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function parseDql(string $dql, array $hints = []): ParserResult
5151
$parser = new Query\Parser($query);
5252

5353
// We do NOT test SQL output here. That only unnecessarily slows down the tests!
54-
$parser->setCustomOutputTreeWalker(NullSqlWalker::class);
54+
$query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, NullSqlWalker::class);
5555

5656
return $parser->parse();
5757
}

0 commit comments

Comments
 (0)