ingowalther / image-minify-api

Image Minify API
http://ingowalther.github.io/image-minify-api/
26 stars 3 forks source link

Extend SetupCommand to create parameters.yml #7

Closed ingowalther closed 8 years ago

ingowalther commented 8 years ago

Let the SetupCommand create the parameters.yml by questioning the user for the Database-Informations.

xRahul commented 8 years ago

Hey @ingowalther

I'll take this one!

ingowalther commented 8 years ago

@xRahul thank you!

luchianenco commented 8 years ago

as I understand = the parameters.yml will be created during composer install, so do you mean to update parameters.yml db configuration?

ingowalther commented 8 years ago

At the moment you have to copy the parameters.yml.dist by hand.

It would be cool if the parameters.yml is created while executing the setup command. But there is a issue that the container requires the existence of the parameters.yml

luchianenco commented 8 years ago

I think that it is possible to make it automatic by https://github.com/Incenteev/ParameterHandler and updating composer.json file, then during composer install the parameters.yml will created and you will be prompted to enter parameters or to use the default ones

ingowalther commented 8 years ago

Oh that looks great! I also like the idea to execute the installation as composer post-install script. It looks like the best an cleanest solution to me.

luchianenco commented 8 years ago

ready for PR, but don't see if you merged the previous PR

ingowalther commented 8 years ago

Your solution looks good! But maybe it is a good idea to create a seperate config for the "binary_path" and "command" elements and copy a dist file after composer install. It the most use-cases you will use the default and it is a little bit annoying to push enter for every element. What do you think?

ingowalther commented 8 years ago

Or maybe we wait till they will merge https://github.com/Incenteev/ParameterHandler/pull/95

xRahul commented 8 years ago

This looks to be the good solution.. I'll leave it to @surgun9 then

luchianenco commented 8 years ago

Well, of course we can split config, but you do it only once and you need just to press enter if you will use default value....later when parametersHandler will be updated we can update the composer.json

ingowalther commented 8 years ago

Okay. That is fine for me at the moment!

luchianenco commented 8 years ago

so what is your decision?

ingowalther commented 8 years ago

I will merge #10 later. It is okay for me at the moment. Thank you for your work!

luchianenco commented 8 years ago

ok, you are welcome

ingowalther commented 8 years ago

Done with #10!