Make filters work on default MySQL servers to by removing the ONLY_FULL_GROUP_BY sql mode

This commit is contained in:
Jan Böhmer 2022-09-11 23:41:31 +02:00
parent ffa804404c
commit 467687fd0f
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,18 @@
<?php
namespace App\Doctrine\SetSQLMode;
use Doctrine\DBAL\Driver;
use Doctrine\DBAL\Driver\Middleware;
/**
* This class wraps the Doctrine DBAL driver and wraps it into an Midleware driver so we can change the SQL mode
*/
class SetSQLModeMiddlewareWrapper implements Middleware
{
public function wrap(Driver $driver): Driver
{
return new SetSQLModeMiddlewareDriver($driver);
}
}