From 2047d078fdc1f600535bd18e4199f16ab4d01f38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20B=C3=B6sing?= <2189546+boesing@users.noreply.github.com> Date: Mon, 11 Oct 2021 01:24:31 +0200 Subject: [PATCH] qa: disable plugins in CI and enable coding standard manually MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Bösing <2189546+boesing@users.noreply.github.com> --- .laminas-ci.json | 3 ++- .laminas-ci/pre-run.sh | 5 +++++ composer.json | 11 +++++++++-- psalm-baseline.xml | 2 +- 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100755 .laminas-ci/pre-run.sh diff --git a/.laminas-ci.json b/.laminas-ci.json index 65c37ea..803c610 100644 --- a/.laminas-ci.json +++ b/.laminas-ci.json @@ -3,6 +3,7 @@ "8.1": true }, "additional_composer_arguments": [ - "--no-scripts" + "--no-scripts", + "--no-plugins" ] } diff --git a/.laminas-ci/pre-run.sh b/.laminas-ci/pre-run.sh new file mode 100755 index 0000000..8b8528d --- /dev/null +++ b/.laminas-ci/pre-run.sh @@ -0,0 +1,5 @@ +#!/bin/bash + +# Due to the fact that we are disabling plugins when installing/updating/downgrading composer dependencies +# we have to manually enable the coding standard here. +composer enable-codestandard diff --git a/composer.json b/composer.json index d496eb6..812118a 100644 --- a/composer.json +++ b/composer.json @@ -101,8 +101,15 @@ ], "static-analysis": "psalm --shepherd --stats", "clear-config-cache": "php bin/clear-config-cache.php", - "cs-check": "phpcs -s", - "cs-fix": "phpcbf", + "enable-codestandard": "Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run", + "cs-check": [ + "@enable-codestandard", + "phpcs -s" + ], + "cs-fix": [ + "@enable-codestandard", + "phpcbf" + ], "serve": "php -S 0.0.0.0:8080 -t public/", "test": "phpunit --colors=always", "test-coverage": "phpunit --colors=always --coverage-clover clover.xml" diff --git a/psalm-baseline.xml b/psalm-baseline.xml index bea5409..a25016d 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -77,10 +77,10 @@ $this->composerDefinition['require'][$packageName] $this->composerDefinition['require-dev'][$devDependency] $this->composerDefinition['require-dev'][$packageName] - $this->composerDefinition['scripts']['analyze'] $this->composerDefinition['scripts']['check'] $this->composerDefinition['scripts']['pre-install-cmd'] $this->composerDefinition['scripts']['pre-update-cmd'] + $this->composerDefinition['scripts']['static-analysis'] $this->config['application'][$this->installType] $this->config['application'][$this->installType] $this->config['packages'][$packageName]