tirenweb
tirenweb

Reputation: 31709

Editing "parameters.yml" manually and running "composer.phar update"

Im adding manually a line to the end of parameters.yml like this:

base_url_algoritmo: /var/www/myproject/SpectralMatchingLinux/

The problem when run php composer.phar update I get this lines:

[Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]

You have requested a non-existent parameter "base_url_algoritmo".

so just after that I open parameters.yml and I find that the line I have just added is not anymore there!, any help?

Im using symfony 2.3

Upvotes: 0

Views: 1172

Answers (2)

Frank B
Frank B

Reputation: 3697

In config.yml add this:

imports:
    - { resource: parameters.yml }
    - { resource: settings.yml }
   [- more imports ...]

Then create a new yaml file settings.yml and add this:

parameters:
    base_url_algoritmo: /var/www/myproject/SpectralMatchingLinux/

Upvotes: 0

qooplmao
qooplmao

Reputation: 17759

You need to make sure that any parameters you add to your app/config/parameters.yml are replicated with defaults in your app/config/parameters.yml.dist.

This is due to the incenteev/composer-parameter-handlerand post install/update command Incenteev\\ParameterHandler\\ScriptHandler::buildParameters.

When run this script/command will make sure that any parameters named in your parameters.yml.dist are set in your parameters.yml and clear out any others (not in .dist).

Upvotes: 1

Related Questions