Closed ruudk closed 3 years ago
Hi, what I'd like more, is:
1) Create a new static
method generateConfig
2) Move all the logic from process
there.
3) Call self::generateConfig()
from process
.
Also would be nice to cover this scenario in .github/workflows/integration-tests.yml
.
Thanks for the feedback.
I've actually worked around the problem by making sure the cache:clear step can be disabled, while the rest would still work.
As I'm not going to use this feature, I'd rather close the PR.
By changing
Plugin::process
method to static we can call it from a Composer script. Same approach as here: https://github.com/composer/package-versions-deprecated/blob/master/src/PackageVersions/Installer.php#L146This is ideal for situations where you want to are using
composer install --no-scripts
but do want to install the PHPStan extensions. In my case composer automatically clears the cache which takes a lot of time on our CI (big project).You can add a script to your own
composer.json
:And then run
composer run install-phpstan-extensions
to install the extensions:Without this change, it's also possible, but it generates a deprecation notice: