crunzphp / crunz

A PHP-based job scheduler
MIT License
176 stars 16 forks source link

Make config location editable via option #43

Open maartenvr98 opened 1 year ago

maartenvr98 commented 1 year ago

This makes it posible to define an alternative location for your config file. For example you want it inside a config folder or outside your project root.

Simply define the env variable CRUNZ_CONFIG in your environment or export before executing the command: ie: export CRUNZ_CONFIG=config/crunz.yml && php vendor/bin/crunz

Q A
Fixed tickets #...
PabloKowalczyk commented 1 year ago

Hello, I like the idea but would like to see it as --config option, also remember about tests.

maartenvr98 commented 1 year ago

@PabloKowalczyk I've updated my PR. Config setting is now available via --config.

The only problem was that the configuration was already used in the commands configure. So I had to parse the option before the commands init, thats why it already checks for --config in the Application constructor.

PabloKowalczyk commented 1 year ago

There are some issues in CI https://github.com/crunzphp/crunz/actions/runs/3411655638/jobs/5743651750, also please revert "style" changes.