Skip to content
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

configuration file #131

Open
5 tasks
jkowalleck opened this issue Oct 13, 2021 · 1 comment
Open
5 tasks

configuration file #131

jkowalleck opened this issue Oct 13, 2021 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@jkowalleck
Copy link
Member

jkowalleck commented Oct 13, 2021

benefit: have the config in a file, so no CLI parameters are needed

parameter defaults are read from the config-file, and may override system defaults.
parameters can still be overridden via CLI parameters

implementation details: use extra section of the composer file.
see https://getcomposer.org/doc/04-schema.md#extra


acc / crit

  • config overrides system defaults (therefore config file settings = presets)
  • CLI params override any defaults/presets
  • parameter type checks are (still) in place
  • parameter plausibility checks are still in place
  • config possibility is documented
    (+ docs have hint, that this config can be used with the gh-action -- see document configuration gh-php-composer-generate-sbom#1)
@jkowalleck
Copy link
Member Author

implementation idea:

  • Options propertie are the defaults
  • new method Options::setFromPackage() that accpts a RootPackage - settings are read from the extras
  • existing method Options::setFromInput(InputInterface $input) only sets existing values/options by checking via $input->hasArgument()
  • add a new method Options::vlidate() if needed ...

alternative: Options::setFrom...() become factory methods, that each create new objects ....

jkowalleck added a commit that referenced this issue Oct 30, 2021
@jkowalleck jkowalleck unpinned this issue Dec 2, 2021
@jkowalleck jkowalleck added the help wanted Extra attention is needed label Mar 17, 2022
@jkowalleck jkowalleck removed their assignment Jul 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant