From bf9f7aa4db868ee6b0cb3e7b3007b8288aee79ce Mon Sep 17 00:00:00 2001 From: Michiel Gerritsen Date: Wed, 11 Sep 2024 11:30:38 +0200 Subject: [PATCH] Include PHPStan Installer --- magento/Dockerfile-2.4 | 2 +- magento/scripts/allow-composer-plugins.php | 1 + magento/scripts/install-phpstan.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/magento/Dockerfile-2.4 b/magento/Dockerfile-2.4 index 30cb5d3..f3298f5 100644 --- a/magento/Dockerfile-2.4 +++ b/magento/Dockerfile-2.4 @@ -44,7 +44,7 @@ RUN ./start-services && \ php bin/magento indexer:reindex && \ mkdir -p extensions && \ composer config repositories.dev-extensions path extensions/* && \ - composer require --dev phpstan/phpstan:~1.7 bitexpert/phpstan-magento && \ + composer require --dev phpstan/phpstan bitexpert/phpstan-magento phpstan/extension-installer && \ php scripts/apply-2.4-patches.php && \ rm scripts/apply-2.4-patches.php && \ rm scripts/downgrade-monolog.php && \ diff --git a/magento/scripts/allow-composer-plugins.php b/magento/scripts/allow-composer-plugins.php index 801ce77..9056e5a 100644 --- a/magento/scripts/allow-composer-plugins.php +++ b/magento/scripts/allow-composer-plugins.php @@ -4,6 +4,7 @@ 'captainhook/plugin-composer', 'dealerdirect/phpcodesniffer-composer-installer', 'laminas/laminas-dependency-plugin', + 'phpstan/extension-installer', 'magento/*', ]; diff --git a/magento/scripts/install-phpstan.php b/magento/scripts/install-phpstan.php index 84a1ec7..83bbddd 100644 --- a/magento/scripts/install-phpstan.php +++ b/magento/scripts/install-phpstan.php @@ -22,7 +22,7 @@ $output = null; $code = null; -exec('composer require --dev phpstan/phpstan:~1.0 bitexpert/phpstan-magento', $output, $code); +exec('composer require --dev phpstan/phpstan:~1.0 bitexpert/phpstan-magento phpstan/extension-installer', $output, $code); if ($code !== 0) { echo 'Unable to install PHPStan' . PHP_EOL;