Skip to content

Instantly share code, notes, and snippets.

@LibertyDevs
Created February 7, 2014 17:37
Show Gist options
  • Save LibertyDevs/8867707 to your computer and use it in GitHub Desktop.
Save LibertyDevs/8867707 to your computer and use it in GitHub Desktop.
Symfony2 環境の切り替え ref: http://qiita.com/Liberty/items/e7289d747b417a971ca8
// stg を追加
if (in_array($this->getEnvironment(), array('dev', 'test', 'stg'))) {
imports:
# コメントアウト
# config_%kernel.environment%.yml を参照させるため
# - { resource: parameters.yml }
- { resource: security.yml }
imports:
#- { resource: parameters_%kernel.environment%.yml } # 追加:これだと%kernel.environment%を見てくれないケースがあったので以下の通り再定義
- { resource: parameters_dev.yml } # 環境により dev,prodなど変える
- { resource: config.yml }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment