The Wayback Machine - https://web.archive.org/web/20201007232333/https://github.com/nunomaduro/phpinsights/issues/376
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

[Laravel] Allow to set command parameters from config file #376

Open
eusonlito opened this issue Mar 10, 2020 · 2 comments
Open

[Laravel] Allow to set command parameters from config file #376

eusonlito opened this issue Mar 10, 2020 · 2 comments

Comments

@eusonlito
Copy link

@eusonlito eusonlito commented Mar 10, 2020

Q A
Bug report? no
Feature request? yes
Library version 1.13.0

Related with #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!

@olivernybroe
Copy link
Collaborator

@olivernybroe olivernybroe commented Mar 10, 2020

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
Carbonize 2020-03-10 at 10 09 51
as that is also what we have done with other parameters.

@eusonlito
Copy link
Author

@eusonlito eusonlito commented Mar 10, 2020

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.