-
-
Notifications
You must be signed in to change notification settings - Fork 640
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
feat(optimus): add recipe for ckrack/optimus-bundle #946
Conversation
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.
Pull request does not pass validation.
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.
Pull request does not pass validation.
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.
Pull request passes validation.
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.
Pull request passes validation.
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.
- Should I use only the config file, without any env vars preferably?
If there are secrets that should not be in git, then yes, use environment variables. Just as you are doing.
- Is the described way of auto-configuration via composer-scripts something we should do?
Why is that needed? Because you want to help the user generating primes?
Yes, the numbers can be auto-generated and are random by default, making each installation kind of unique. |
The easiest way is to tell the user what to do in a post-install message. |
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.
Pull request passes validation.
That's already in place. So, ready from my side. |
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.
Thank you
Add recipe for my bundle for jenssegers/optimus
Would be great to have a post-install-hook for recipes, as optimus could auto-configure with sensible values. Optimus needs some calculated prime numbers for instantiation. These should be different in each installation. To not fail during the composer install, we must use some default values. Of course we can use
post-install.txt
to tell people to exchange these defaults in the config/env. I'd like to add auto-configuration, though. There is no post-install-hook for bundles/recipes, so the only way I came up with is adding a script toauto-scripts
with acomposer-scripts
-entry.This script would replace the default values in the config with auto-generated ones. By replacing the defaults, this would only act once, even though the script itself will be invoked on every update/install.
I have two issues I'd like to discuss: