diff --git a/src/Query/Parser.php b/src/Query/Parser.php index a76cd4e45a..5d0742b4a3 100644 --- a/src/Query/Parser.php +++ b/src/Query/Parser.php @@ -200,6 +200,13 @@ public function __construct(Query $query) */ public function setCustomOutputTreeWalker($className) { + Deprecation::trigger( + 'doctrine/orm', + 'https://github.com/doctrine/orm/pull/11641', + '%s is deprecated, set the output walker class in a query hint instead', + __METHOD__ + ); + $this->customOutputWalker = $className; } diff --git a/tests/Tests/ORM/Query/LanguageRecognitionTest.php b/tests/Tests/ORM/Query/LanguageRecognitionTest.php index a2e0e60096..37aac27f26 100644 --- a/tests/Tests/ORM/Query/LanguageRecognitionTest.php +++ b/tests/Tests/ORM/Query/LanguageRecognitionTest.php @@ -51,7 +51,7 @@ public function parseDql(string $dql, array $hints = []): ParserResult $parser = new Query\Parser($query); // We do NOT test SQL output here. That only unnecessarily slows down the tests! - $parser->setCustomOutputTreeWalker(NullSqlWalker::class); + $query->setHint(Query::HINT_CUSTOM_OUTPUT_WALKER, NullSqlWalker::class); return $parser->parse(); }