I wrote the following custom walker to use postgres ilike instead of the following:
use Doctrine\ORM\Query\SqlWalker; class IlikeWalker extends SqlWalker { public function walkLikeExpression($likeExpr) { $sql = parent::walkLikeExpression($likeExpr); $sql = str_replace('LIKE', 'ILIKE', $sql); return $sql; } }
which can be added to any request via:
$query->setHint( $query::HINT_CUSTOM_OUTPUT_WALKER ,'\DoctrineExtensions\WalkerBundle\Walker\IlikeWalker' );
But how do I start a service or apply a configuration to automatically use this for each request?
source share