Here https://www.simukti.net/blog/2012/04/05/how-to-select-year-month-day-in-doctrine2/
I’ve added Month.php intact in Doctrine\ORM\DoctrineExtensions\Query\Mysql folder then this in bootstrap:
$config->addCustomDatetimeFunction(‘MONTH’, ‘Doctrine\ORM\DoctrineExtensions\Query\Mysql\Month’);
I run this:
$query = $em->createQuery(“SELECT c.username FROM Entities\Client c WHERE MONTH(c.joinDate) = 10”);
$search = $query->getArrayResult();
Then get this with EchoSQLLogger:
SELECT p0_.username AS username0 FROM clients p0_ WHERE MONTH(p0_.join_date) = 10
since I get no error, I believe the class is loaded and function is called, but I get an empty array result. I did check join_date timestamp, and there are some rows for month 10. Did I do a mistake or their extension is no longer compatible with 2.4?