Skip to content

Commit

Permalink
Add Sylius specific config for dev and prod environments
Browse files Browse the repository at this point in the history
  • Loading branch information
emodric committed Feb 26, 2019
1 parent 6e0b0a4 commit 7693b65
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/config/config_dev.yml
@@ -1,5 +1,6 @@
imports:
- { resource: config.yml }
- { resource: sylius_config_dev.yml }
- { resource: ezplatform_dev.yml }

framework:
Expand Down
1 change: 1 addition & 0 deletions app/config/config_prod.yml
@@ -1,5 +1,6 @@
imports:
- { resource: config.yml }
- { resource: sylius_config_prod.yml }
- { resource: ezplatform_prod.yml }

# Example below would make sure some of the symfony caches are written to apc / redis instead of disk
Expand Down
10 changes: 10 additions & 0 deletions app/config/sylius_config_dev.yml
@@ -0,0 +1,10 @@
# This file is part of the Sylius package.
# (c) Paweł Jędrzejewski

jms_serializer:
visitors:
json:
options:
- JSON_PRETTY_PRINT
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION
41 changes: 41 additions & 0 deletions app/config/sylius_config_prod.yml
@@ -0,0 +1,41 @@
# This file is part of the Sylius package.
# (c) Paweł Jędrzejewski

jms_serializer:
visitors:
json:
options:
- JSON_UNESCAPED_SLASHES
- JSON_PRESERVE_ZERO_FRACTION

doctrine:
orm:
metadata_cache_driver:
type: service
id: doctrine.system_cache_provider
query_cache_driver:
type: service
id: doctrine.system_cache_provider
result_cache_driver:
type: service
id: doctrine.result_cache_provider

services:
doctrine.result_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.result_cache_pool'
doctrine.system_cache_provider:
class: Symfony\Component\Cache\DoctrineProvider
public: false
arguments:
- '@doctrine.system_cache_pool'

framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

0 comments on commit 7693b65

Please sign in to comment.