-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Throwing exception in --no-interaction mode when some params are missing #63
Comments
The documented behavior is that the values of the dist file are used as default value. Tis also what we do in interactive mode if you hit we cannot add an option to handle it (it would require changing the signature of composer commands, which is not possible). And using an environment variable would be inconsistent with the other configuration which is provided in the composer.json file. Thus, if your dist file provides sensible defaults, you may not need to overwrite all of them through environment variables in your deployed app (the overwrite might be done locally instead for instance) |
No, the problem is a little bit different: i do not want to have silently deployed application using default parameters in case parameters.yml file does not contain all the required params (mainly due to human errors during parameters.yml filling). It is important because my dist file is tracked by vcs and does not contain default's for production stage |
Any thoughts? I think validation of parameters list from parameters.yml is that ParameterHandler can (and should) do. |
I have the same problem. Here's an example for why this is an issue for me. I think for the time being I will remove the post-* commands on deployment from the composer.json file, and then run a custom symfony command, which only throws an exception if the parameters.yml file misses keys compared to the *dist version. |
In my build process i am using
composer install --no-interaction
command to set up the application.Every application has
composer.json
file that containsIncenteev\\ParameterHandler\\ScriptHandler::buildParameters
handler set forpost-install-cmd
event.The problem is that if
parameters.yml
file has some parameters missing ParameterHandler automatically provides default values for them. It's ok for development but not for stage level.In my case it would be cool if i can tell ParameterHandler somehow to throw an exception in
--no-interaction
mode if parameters file is not valid in order to explicitly abort the build/deploy of the potentially inconsistent application.May be it would be reasonable to have some option / environment variable for this use case?
The text was updated successfully, but these errors were encountered: