phpstan / extension-installer

Composer plugin for automatic installation of PHPStan extensions.
MIT License
410 stars 27 forks source link

Add ability to not install extensions #56

Closed canvural closed 2 years ago

canvural commented 2 years ago

Hi,

This is a know problem that you can't not enable a package if you install both the extension and extension installer. For example here: https://github.com/phpstan/phpstan-strict-rules#with-extension-installer I'd like to enable just couple of rules not the all of them.

What I'd like to suggest is the ability to not auto install some extensions. This can be done for example like so in users composer.json:

"extra": {
    "phpstan": {
        "dont-install": [
            "phpstan/phpstan-strict-rules"
        ]
    }
}

So phpstan/extension-installer can check if this config exists in users composer.json and if the PHPStan extension is in the list, it'll not be automatically installed.

I got the idea from Laravel.

What do you think?

ondrejmirtes commented 2 years ago

I'd rather solve this with a nicer configuration in phpstan-strict-rules.

canvural commented 2 years ago

Ok. That's fine.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.