Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CI - use Ubuntu 20.04 and composer v2, fix detecting phpunit version #221

Merged
merged 3 commits into from
Feb 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
phpqa:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -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
Expand All @@ -63,7 +64,7 @@ jobs:
- name: Show versions
run: |
composer outdated --direct --all
./phpqa tools
./phpqa tools --config tests/.ci

- name: Run tests
run: |
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions src/Tools/GetVersions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down