http://www.symfonychina.com/doc/current/reference/configuration/framework.html#catalog3
framework:
secret: ~
http_method_override: true
trusted_proxies: []
ide: ~
test: ~
default_locale: en
csrf_protection:
enabled: false
# form configuration / 表單配置
form:
enabled: false
csrf_protection:
enabled: true
field_name: ~
# esi configuration / esi配置
esi:
enabled: false
# fragments configuration / fragments配置
fragments:
enabled: false
path: /_fragment
# profiler configuration / 分析器配置
profiler:
enabled: false
collect: true
only_exceptions: false
only_master_requests: false
dsn: file:%kernel.cache_dir%/profiler
matcher:
ip: ~
# use the urldecoded format / 使用經urldecode解碼的格式
path: ~ # Example: ^/path to resource/
service: ~
# router configuration / 路由配置
router:
resource: ~ # Required
type: ~
http_port: 80
https_port: 443
# * set to true to throw an exception when a parameter does not
# match the requirements
# * 設爲true的話,當路由參數無法匹配條件時,會拋出異常
# * set to false to disable exceptions when a parameter does not
# match the requirements (and return null instead)
# * 設爲false的話,若路由參數無法匹配條件,則會關閉異常(返回null來替代)
# * set to null to disable parameter checks against requirements
# * 設爲null的話,將關閉參數之於需求的檢查
#
# 'true' is the preferred configuration in development mode, while
# 'false' or 'null' might be preferred in production
# 'true'爲開發環境下的首選配置,而'false'或'null'在生產環境下可能是首選
strict_requirements: true
# session configuration / session配置
session:
storage_id: session.storage.native
handler_id: session.handler.native_file
name: ~
cookie_lifetime: ~
cookie_path: ~
cookie_domain: ~
cookie_secure: ~
cookie_httponly: ~
gc_divisor: ~
gc_probability: ~
gc_maxlifetime: ~
save_path: "%kernel.cache_dir%/sessions"
# serializer configuration / serializer配置
serializer:
enabled: false
cache: ~
name_converter: ~
circular_reference_handler: ~
# assets configuration / assets配置
assets:
base_path: ~
base_urls: []
version: ~
version_format: "%%s?%%s"
packages:
# Prototype / 原型
name:
base_path: ~
base_urls: []
version: ~
version_format: "%%s?%%s"
# templating configuration / 模板配置
templating:
hinclude_default_template: ~
form:
resources:
# Default: / 默認
- FrameworkBundle:Form
cache: ~
engines: # Required
# Example:
- twig
loaders: []
# translator configuration / translator配置
translator:
enabled: false
fallbacks: [en]
logging: "%kernel.debug%"
paths: []
# validation configuration / validation驗證配置
validation:
enabled: false
cache: ~
enable_annotations: false
translation_domain: validators
mapping:
paths: []
# annotation configuration / annotation配置
annotations:
cache: file
file_cache_dir: "%kernel.cache_dir%/annotations"
debug: "%kernel.debug%"
# PHP errors handling configuration
php_errors:
log: false
throw: "%kernel.debug%"
# cache configuration / 緩存配置
cache:
app: cache.app
system: cache.system
directory: "%kernel.cache_dir%/pools"
default_doctrine_provider: ~
default_psr6_provider: ~
default_redis_provider: "redis://localhost"
pools:
# Prototype / 原型
name:
adapter: cache.app
public: false
default_lifetime: ~
provider: ~
clearer: ~