Skip to content

Add compatibility for remote config files #200

@kevinpijning

Description

@kevinpijning

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions