phpinsights
phpinsights copied to clipboard
[Laravel] Allow to set command parameters from config file
Q | A |
---|---|
Bug report? | no |
Feature request? | yes |
Library version | 1.13.0 |
Related with https://github.com/nunomaduro/phpinsights/issues/23 will be a great idea to allow set all commands parameters from config/insights.php
when is used with php artisan insights
.
Maybe something like:
'parameters' => '--format=json -d memory_limit=2000M -v',
or
'parameters' => [
'--format=json',
'-d memory_limit=2000M',
'-v',
],
Parameters from command line must overwrite config parameters:
php artisan insights --format=html
And also an option to avoid use config will be great:
php artisan insights --no-config-parameters
Thanks!
Hmm, I think passing it like that would be easy, but also quite limiting.
For example the -d memory_limit=2000M
wouldn't work, as that has to be supplied before the file.
It might be worth doing something like this
as that is also what we have done with other parameters.
Would be great, but my idea is set the parameters on config file as similar as console to avoid to users to know how to map console parameters on config file and to avoid to phpinsights developers create new docs with parameters to config map and code conversions.
But, for me, it's great :)
I've added the requested feature in #441 . If there needs to be added more config options please put it in the PR! 😄