10000 configure strict_requirements: null in production by Tobion · Pull Request #397 · symfony/symfony-standard · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

configure strict_requirements: null in production #397

Merged
merged 2 commits into from
Aug 30, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand Down
8 changes: 8 additions & 0 deletions app/config/config_prod.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
0