laravel / pint

Laravel Pint is an opinionated PHP code style fixer for minimalists.
https://laravel.com/docs/pint
MIT License
2.78k stars 144 forks source link

Add the possibility to override the cache file path in command line #255

Closed jimmyklein-actual closed 7 months ago

jimmyklein-actual commented 7 months ago

Hi,

We have a internal bundle that defined the code style for all our projects. This bundle is therefore shared by multiple projects.

We need to have the possibility to define, by project, the path of the pint cache file.

This pull request allow the user to do it by given the path of the cache file in the command line.

Vectorial1024 commented 7 months ago

By very pure coincidence, you may also want to review https://github.com/laravel/docs/pull/9502

Vectorial1024 commented 7 months ago

@jimmyklein-actual would the existing feature described in the above PR sufficient in your use case? Or would you still want to add a command line option for future usage by others?

jimmyklein-actual commented 7 months ago

By very pure coincidence, you may also want to review laravel/docs#9502

Ok, it would be great if my PR is OK to also add it in the documentation.

would the existing feature described in the above PR sufficient in your use case? Or would you still want to add a command line option for future usage by others?

Sorry I don't understand your question. By addind the possibility to configure cache file path in the command line, it will allow me to specify by project where I want the cache file to be stored. I am not sure that I answer to your question.

Vectorial1024 commented 7 months ago

Oh wait, perhaps what you mean is, you share the coding style across many projects (e.g. the same PSR-12 for many projects), but the cache files for each project are separate?

Then yes, a command line option to specify cache file is good. I understand now.