-
Notifications
You must be signed in to change notification settings - Fork 37
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
Add environment:get-parameters command #251
Add environment:get-parameters command #251
Conversation
Thanks for contribution 🎉 Looks fine but :
|
Sorry it is still a draft but yes I will make it safier (testing if parameter exists before getting it) Ok, I will add some comments/descriptions to the command ^^ For naming / standards, I'll try to understand and fix problem returned by CI ^^ |
5a6e46d
to
6449106
Compare
@tom-combet do you have a minute for the service name ? |
@SebSept It should be get_env instead of getenv. |
@MeKeyCool Thanks for contribution! I'll review it next week, too busy right now sry... |
9c53371
to
2e7d6f6
Compare
service name must be |
2e7d6f6
to
5a225f7
Compare
5a225f7
to
b2864b0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @MeKeyCool for you first contribution :)
The command works fine and the parameters are in the help message, that's all good :)
Undefined values are spotted with a red background, that good.
I suggest, you do the same for boolean values.
Currently it's not possible to know if a configuration is false
or an empty string, maybe you can render the boolean true
and false
with or style.
The other point it that it's can be better to have a try/catch block to avoid unclear errors that may happen (but will probably never happen). (not mandatory, but better imo)
b2864b0
to
d629e31
Compare
d629e31
to
71642bd
Compare
I updated output styling. Is it ok for you this way ? ^^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK for me! Tested and approved. ✔️
I see one easy improvement (but not necessary, maybe in an other pull request if someone needs it): add a 'key' option to get the value of one environment variable only. Like this:
bin/console fop:environment:get-parameters -k "database_host"
127.0.0.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍🏼 Thanks for the job and the patience !
I am currently working on environment variables for Prestashop and I need an easy command to make my development / tests easier.
This command is under work but I let it there to receive comments or ideas for improvements ;)
If it is a problem, I can close it :)