diff --git a/.env b/.env index 144d121..0d08246 100644 --- a/.env +++ b/.env @@ -26,9 +26,6 @@ WOPI_SERVER=http://collabora:9980 TRUSTED_HOSTS='^(localhost|127.0.0.1|test.localde)$' TRUSTED_PROXIES=~ -## Doctrine/doctrine-bundle -DATABASE_URL= - ## Symfony/swiftmailer ## Mailer ###> symfony/mailer ### @@ -83,3 +80,10 @@ SHORT_MESSAGE_DSN=null://null # MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages MESSENGER_TRANSPORT_DSN=sync:// ###< symfony/messenger ### + +###> doctrine/doctrine-bundle ### +# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url +# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml +# +DATABASE_URL="postgresql://postgres:postgres@db:5432/postgres?serverVersion=14&charset=utf8" +###< doctrine/doctrine-bundle ### diff --git a/config/packages/doctrine.yaml b/config/packages/doctrine.yaml index f7648ff..ee624d4 100644 --- a/config/packages/doctrine.yaml +++ b/config/packages/doctrine.yaml @@ -5,11 +5,14 @@ doctrine: geometry: string # IMPORTANT: You MUST configure your server version, # either here or in the DATABASE_URL env var (see .env file) - #server_version: '5.7' + #server_version: '14' orm: auto_generate_proxy_classes: true naming_strategy: doctrine.orm.naming_strategy.default auto_mapping: true + query_cache_driver: + type: pool + pool: doctrine.system_cache_pool mappings: App: is_bundle: false diff --git a/config/packages/prod/doctrine.yaml b/config/packages/prod/doctrine.yaml index 084f59a..17299e2 100644 --- a/config/packages/prod/doctrine.yaml +++ b/config/packages/prod/doctrine.yaml @@ -1,9 +1,6 @@ doctrine: orm: auto_generate_proxy_classes: false - metadata_cache_driver: - type: pool - pool: doctrine.system_cache_pool query_cache_driver: type: pool pool: doctrine.system_cache_pool diff --git a/config/packages/test/doctrine.yaml b/config/packages/test/doctrine.yaml new file mode 100644 index 0000000..2ace640 --- /dev/null +++ b/config/packages/test/doctrine.yaml @@ -0,0 +1,4 @@ +doctrine: + dbal: + # "TEST_TOKEN" is typically set by ParaTest + dbname: 'main_test%env(default::TEST_TOKEN)%' diff --git a/symfony.lock b/symfony.lock index 87c57fc..9daeb5a 100644 --- a/symfony.lock +++ b/symfony.lock @@ -51,16 +51,17 @@ "version": "v0.5.3" }, "doctrine/doctrine-bundle": { - "version": "2.0", + "version": "2.7", "recipe": { "repo": "github.com/symfony/recipes", - "branch": "master", - "version": "2.0", - "ref": "a9f2463b9f73efe74482f831f03a204a41328555" + "branch": "main", + "version": "2.3", + "ref": "b8ddff356705ad8e704ea75b6872ce89a15d614d" }, "files": [ "config/packages/doctrine.yaml", "config/packages/prod/doctrine.yaml", + "config/packages/test/doctrine.yaml", "src/Entity/.gitignore", "src/Repository/.gitignore" ]