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);
|
$container->prependExtensionConfig('twig', $twigConfig);
|
||||||
|
|
||||||
//add DQL function to ORM (default entity_manager)
|
//add DQL function to ORM (default entity_manager)
|
||||||
$container->prependExtensionConfig('doctrine', array(
|
$container
|
||||||
'orm' => array(
|
->prependExtensionConfig(
|
||||||
'dql' => array(
|
'doctrine',
|
||||||
'string_functions' => array(
|
[
|
||||||
|
'orm' => [
|
||||||
|
'dql' => [
|
||||||
|
'string_functions' => [
|
||||||
'unaccent' => Unaccent::class,
|
'unaccent' => Unaccent::class,
|
||||||
'GET_JSON_FIELD_BY_KEY' => GetJsonFieldByKey::class,
|
'GET_JSON_FIELD_BY_KEY' => GetJsonFieldByKey::class,
|
||||||
'AGGREGATE' => JsonAggregate::class,
|
'AGGREGATE' => JsonAggregate::class,
|
||||||
'REPLACE' => Replace::class,
|
'REPLACE' => Replace::class,
|
||||||
),
|
],
|
||||||
'numeric_functions' => [
|
'numeric_functions' => [
|
||||||
'JSONB_EXISTS_IN_ARRAY' => JsonbExistsInArray::class,
|
'JSONB_EXISTS_IN_ARRAY' => JsonbExistsInArray::class,
|
||||||
'SIMILARITY' => Similarity::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)
|
//add dbal types (default entity_manager)
|
||||||
$container->prependExtensionConfig('doctrine', array(
|
$container->prependExtensionConfig('doctrine', array(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user