title: Generate parameters.yml from environment variable using array node with env-map option in Composer.json - incenteev-parameters
body: <p>I have this parameters file structure in a symfony 3.2 console application</p>
  
  <pre><code>parameters:
      database:
          driver: pdo_mysql
          host: 127.0.0.1
          dbname: dbname
          user: 123
          password: 123
      log_path: /logs
  </code></pre>
  
  <p>I use composer.json to create parameters.yml from environment variable:</p>
  
  <pre><code>        "incenteev-parameters": [
          {
              "file": "app/config/parameters.yml",
              "env-map": {
  
                  "driver: "_DB_DRIVER",
                  "host": "_DB_HOST",
                  "name": "_DB_NAME",
                  "user": "_DB_USER",
                  "password": "_DB_PASSWORD",
                  "log_path" : "-LPATH"
              }
          },
          {
              "file": "app/config/parameters.yml",
              "dist-file": "app/config/parameters.yml.dist",
              "parameter-key": "parameters"
          }
      ]
  </code></pre>
  
  <p>Why do the values under <code>database</code> node <strong>not</strong> update, when I run the following command?</p>
  
  <pre><code>_DB_HOST=“SOMEVALUE”  composer install  -n
  </code></pre>
  
  <p>Also why the env() function not work in , ex :</p>
  
  <pre><code> "user": "%env(user)%",
  </code></pre>