OK - there is no function like "replace" (anymore). To still be able to use it I implemented it by adding a custom DQL-function like described here: https://symfony.com/doc/6.4/doctrine/custom_dql_functions.html