From 33eaa39b10f17e6f23498bd6ec468d30e879c2a1 Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 30 Aug 2012 18:20:33 +0300 Subject: [PATCH 1/2] configure strict_requirements: null in production MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit possible since symfony/symfony#5187 --- app/config/config_prod.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/config/config_prod.yml b/app/config/config_prod.yml index 0b91d4d885..5e31419627 100644 --- a/app/config/config_prod.yml +++ b/app/config/config_prod.yml @@ -1,6 +1,14 @@ imports: - { resource: config.yml } +# In production environment you should know that the parameters for URL generation +# always pass the requirements. Otherwise it would break your link (or even site with +# strict_requirements = true). So we can disable the requirements check completely for +# enhanced performance with strict_requirements = null. +framework: + router: + strict_requirements: null + #doctrine: # orm: # metadata_cache_driver: apc From ef43472edf11c79ba7b55bfebcac28dfde192afa Mon Sep 17 00:00:00 2001 From: Tobias Schultze Date: Thu, 30 Aug 2012 17:52:00 +0200 Subject: [PATCH 2/2] added upgrade note for strict_requirements = null --- UPGRADE.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/UPGRADE.md b/UPGRADE.md index 7bc21ebd6d..0f7cdfc8cf 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -79,6 +79,11 @@ a link cannot be generated): router: strict_requirements: %kernel.debug% +You can even disable the requirements check on production with `null` as you should +know that the parameters for URL generation always pass the requirements, e.g. by +validating them beforehand. This additionally enhances performance. See +[config_prod.yml](https://github.com/symfony/symfony-standard/blob/master/app/config/config_prod.yml). + The `default_locale` parameter is now a setting of the main `framework` configuration (it was under the `framework.session` in 2.0):