Updating Doctrine settings
This commit is contained in:
@@ -1,5 +0,0 @@
|
|||||||
doctrine:
|
|
||||||
orm:
|
|
||||||
dql:
|
|
||||||
string_functions:
|
|
||||||
match: DoctrineExtensions\Query\Mysql\MatchAgainst
|
|
||||||
@@ -6,11 +6,28 @@ namespace Pcm\SearchBundle\DependencyInjection;
|
|||||||
|
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||||
|
|
||||||
class PcmSearchExtension extends Extension
|
class PcmSearchExtension extends Extension implements PrependExtensionInterface
|
||||||
{
|
{
|
||||||
|
public function prepend(ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
$container->loadFromExtension(
|
||||||
|
'doctrine',
|
||||||
|
[
|
||||||
|
'orm' => [
|
||||||
|
'dql' => [
|
||||||
|
'string_functions' => [
|
||||||
|
'match' => 'DoctrineExtensions\Query\Mysql\MatchAgainst'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function load(array $configs, ContainerBuilder $container)
|
public function load(array $configs, ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
$loader = new YamlFileLoader(
|
$loader = new YamlFileLoader(
|
||||||
@@ -18,6 +35,5 @@ class PcmSearchExtension extends Extension
|
|||||||
new FileLocator(__DIR__.'/../../config')
|
new FileLocator(__DIR__.'/../../config')
|
||||||
);
|
);
|
||||||
$loader->load('services.yaml');
|
$loader->load('services.yaml');
|
||||||
$loader->load('packages/doctrine.yaml');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user