mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Add Doctrine DBAL postgis configuration in the bundle.
This can now be removed totally from the user application.
This commit is contained in:
parent
220f1ea0eb
commit
bafbc2dd74
@ -167,23 +167,33 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface,
|
||||
$container->prependExtensionConfig('twig', $twigConfig);
|
||||
|
||||
//add DQL function to ORM (default entity_manager)
|
||||
$container->prependExtensionConfig('doctrine', array(
|
||||
'orm' => array(
|
||||
'dql' => array(
|
||||
'string_functions' => array(
|
||||
$container
|
||||
->prependExtensionConfig(
|
||||
'doctrine',
|
||||
[
|
||||
'orm' => [
|
||||
'dql' => [
|
||||
'string_functions' => [
|
||||
'unaccent' => Unaccent::class,
|
||||
'GET_JSON_FIELD_BY_KEY' => GetJsonFieldByKey::class,
|
||||
'AGGREGATE' => JsonAggregate::class,
|
||||
'REPLACE' => Replace::class,
|
||||
),
|
||||
],
|
||||
'numeric_functions' => [
|
||||
'JSONB_EXISTS_IN_ARRAY' => JsonbExistsInArray::class,
|
||||
'SIMILARITY' => Similarity::class,
|
||||
'OVERLAPSI' => OverlapsI::class
|
||||
]
|
||||
)
|
||||
)
|
||||
));
|
||||
'OVERLAPSI' => OverlapsI::class,
|
||||
],
|
||||
],
|
||||
],
|
||||
// This is mandatory since we are using postgis as database.
|
||||
'dbal' => [
|
||||
'mapping_types' => [
|
||||
'geometry' => 'string',
|
||||
],
|
||||
],
|
||||
],
|
||||
);
|
||||
|
||||
//add dbal types (default entity_manager)
|
||||
$container->prependExtensionConfig('doctrine', array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user