From 329be0dd189d40630bf39519abc94e4f1c5291c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zdene=CC=8Ck=20Drahos=CC=8C?= Date: Sat, 6 Feb 2021 08:24:15 +0100 Subject: [PATCH 1/3] CI - use explicit Ubuntu version 1 warning: Ubuntu-latest workflows will use Ubuntu-20.04 soon. --- .github/workflows/php.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index bf820a03..cc2f52d1 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -8,7 +8,7 @@ on: jobs: phpqa: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: fail-fast: false matrix: From 79b955dc9eedc6f392917c9b353922098fe8288d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zdene=CC=8Ck=20Drahos=CC=8C?= Date: Sat, 6 Feb 2021 08:31:28 +0100 Subject: [PATCH 2/3] CI - use Composer v2 https://github.com/EdgedesignCZ/phpqa/runs/1844081585?check_suite_focus=true#step:5:81 You are using Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report a plugin-issue to ask them to support Composer 2. --- .github/workflows/php.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index cc2f52d1..5325396e 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -36,8 +36,9 @@ jobs: php-version: ${{ matrix.php }} extensions: xsl, zip, json coverage: none - # TODO: ? https://github.com/EdgedesignCZ/phpqa/runs/1813676801?check_suite_focus=true#step:6:28 ? - tools: composer:v1 + # default composer.lock with symfony2 components + psalm = composer error + # https://github.com/EdgedesignCZ/phpqa/runs/1844081585?check_suite_focus=true#step:5:112 + tools: ${{ (matrix.php != '7.2' && 'composer:v2') || 'composer:v1' }} - name: Cache composer uses: actions/cache@v2 From 379fcdb178c38a45a68c973b30e1d704495a2c19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zdene=CC=8Ck=20Drahos=CC=8C?= Date: Sat, 6 Feb 2021 08:56:58 +0100 Subject: [PATCH 3/3] CI - show phpunit version from custom binary, fix version on php7.4 https://github.com/EdgedesignCZ/phpqa/runs/1844108206?check_suite_focus=true#step:6:40 `phpqa tools` shows phpunit 9.5.2 (loaded from composer.lock) No version is displayed in html artifact for php7.4. But it works for php8.0. - php8 - https://github.com/EdgedesignCZ/phpqa/runs/1844183851?check_suite_focus=true#step:6:27 - php7.4 - https://github.com/EdgedesignCZ/phpqa/runs/1844183845?check_suite_focus=true#step:6:27 sh: 1: exec: "/home/runner/work/phpqa/phpqa/vendor/phpunit/phpunit/phpunit" --version: not found Related to https://github.com/EdgedesignCZ/phpqa/commit/148151c: - PHP8 warning: Passing a command as string when creating a "Symfony\Component\Process\Process" instance is deprecated since Symfony 4.2, pass it as an array of its arguments instead, or use the "Process::fromShellCommandline()" constructor if you need features provided by the shell. - https://github.com/symfony/process/blob/5.x/CHANGELOG.md#500 --- .github/workflows/php.yml | 2 +- appveyor.yml | 2 +- src/Tools/GetVersions.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml index 5325396e..21011072 100644 --- a/.github/workflows/php.yml +++ b/.github/workflows/php.yml @@ -64,7 +64,7 @@ jobs: - name: Show versions run: | composer outdated --direct --all - ./phpqa tools + ./phpqa tools --config tests/.ci - name: Run tests run: | diff --git a/appveyor.yml b/appveyor.yml index 4327f0b8..8dae634f 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -47,7 +47,7 @@ install: test_script: - cd C:\projects\phpqa - - php phpqa tools + - php phpqa tools --config tests/.appveyor - php phpqa --verbose --report --config tests/.appveyor - dir build diff --git a/src/Tools/GetVersions.php b/src/Tools/GetVersions.php index bdb11efc..31089bfe 100644 --- a/src/Tools/GetVersions.php +++ b/src/Tools/GetVersions.php @@ -140,8 +140,8 @@ private function loadVersionFromConsoleCommand($command) private function createSymfonyProcess($command) { - if (!method_exists('Symfony\Component\Process\Process', 'setCommandLine')) { - return new Process([$command]); + if (method_exists('Symfony\Component\Process\Process', 'fromShellCommandline')) { + return Process::fromShellCommandline($command); } else { return new Process($command); }