Add compatibility for remote config files
kevinpijning opened this issue · 1 comments
TLDR; ./vendor/bin/pint --config https://raw.githubusercontent.com/laravel/pint/main/pint.json
The issue
I manage a lot of Laravel projects, and i want my codestyle to be consistent between all apps, but i don't want yet another package to manage.
The solution
Making it possible to allow for remote pint.json
files and add this pint command to the composer scripts
{
"pint": [
"@php vendor/bin/pint --config https://raw.githubusercontent.com/laravel/pint/main/pint.json"
],
}
This way i can easily manage a single pint.json
file, on a remote like Github without having to manage a self-created package.
Techy
When i was scanning the source code of Pint, i saw that this was almost already possible, Pint does a. file_get_contents
to load the pint.json
config file, which also works with remote files. The only obstacle i came across was the file_exists
which only works for local files.
At the moment i have a proof of concept version of this working, but I was wondering if the community also feels that this is a nice addition to the pint package, and if the maintainers are open to these kind of improvements.
Let me know what u think, I might open a PR (only if the maintainers are open to it)
Heya, this sounds interesting. Feel free to attempt a PR if you like!