Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Use global variable for import source in config
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post will appear after it is approved by moderators
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Toan Nguyen  
View profile  
 More options Jul 31 2012, 9:58 am
From: Toan Nguyen <ngdinht...@gmail.com>
Date: Tue, 31 Jul 2012 06:58:38 -0700 (PDT)
Local: Tues, Jul 31 2012 9:58 am
Subject: Use global variable for import source in config

Hi all,

As I know we can create some environments. But I can't use
kernel.environment variable in imports of config.
Example, I want to import myconfig which depend on environment like:

// config/config.yml file
imports:
    - { resource: parameters.ini }
    - { resource: security.yml }
    - { resource:
"@AicMapBundle/Resources/config/%kernel.environment%.mapconfig.yml" }
    - { resource:
"@AicMapBundle/Resources/config/%kernel.environment%.layers.yml" }

But It doesn't work. So I must modify config_dev.yml and config_prod.yml
file, such as:

// config_prod.yml file
imports:
    - { resource: config.yml }
    - { resource: "@AicMapBundle/Resources/config/prod.mapconfig.yml" }
    - { resource: "@AicMapBundle/Resources/config/prod.layers.yml" }

// config_dev.yml file
imports:
    - { resource: config.yml }
    - { resource: "@AicMapBundle/Resources/config/dev.mapconfig.yml" }
    - { resource: "@AicMapBundle/Resources/config/dev.layers.yml" }

Do you know any other way which has same result?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.