[WIP] Add support for generating env specific config caches
This PR implements support for Laravel's config:cache & config:clear commands.
The configs generated are env specific, which means that if you have config/banana/app.php with banana specific configs such as in a multi site setup you can use config:cache banana to specifically generate a cached config for that env.
By default, the env used will be the one provided via APP_ENV, or if not set environments.default, or if not set the value production.
Usage
- Generate the default config:
php artisan config:cache - Generate a specific config:
php artisan config:cache banana - Clear the default config:
php artisan config:clear - Clear a specific config:
php artisan config:clear banana
TODO
- [ ] Clean up the mess I made
- [ ] Resolve todos
- [ ] Test extensively
If anybody from https://github.com/wintercms/winter/issues/1297#issuecomment-2624578966 or https://github.com/wintercms/winter/issues/885#issuecomment-1512637325 would like to help test, that would be massively appreciated.
@jaxwilko
Clear the default config: php artisan config:cache Clear a specific config: php artisan config:cache banana
Might it not rather be:
- Clear the default config: php artisan config:clear
- Clear a specific config: php artisan config:clear banana ??
@jaxwilko
Clear the default config: php artisan config:cache Clear a specific config: php artisan config:cache banana
Might it not rather be:
- Clear the default config: php artisan config:clear
- Clear a specific config: php artisan config:clear banana ??
You are 100% correct, was in a rush to pick up my car from the garage, thank you ♥️
This pull request will be closed and archived in 3 days, as there has been no activity in the last 60 days. If this is still being worked on, please respond and we will re-open this pull request. If this pull request is critical to your business, consider joining the Premium Support Program where a Service Level Agreement is offered.