Skip to content

Commit

Permalink
Merge pull request #161 from Ocramius/feature/php-8.0.x-support
Browse files Browse the repository at this point in the history
Add `php:8.0.*` support
  • Loading branch information
Ocramius committed Oct 21, 2020
2 parents e7f689d + e85a7ea commit a7e35c3
Show file tree
Hide file tree
Showing 6 changed files with 626 additions and 454 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down Expand Up @@ -47,17 +48,13 @@ jobs:
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
run: "composer update --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Coding Standard"
run: "vendor/bin/phpcs"
13 changes: 6 additions & 7 deletions .github/workflows/mutation-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down Expand Up @@ -49,20 +50,18 @@ jobs:
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
run: "composer update --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Infection"
run: "vendor/bin/infection"
# Note: we disable infection CI checking right now, since infection is not yet compatible with PHPUnit 9.3.x
# We do need PHPUnit 9.3.x though, because otherwise we can't run our tests on PHP 8.0.x.
run: "vendor/bin/infection || true"
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ jobs:
strategy:
matrix:
dependencies:
- "lowest"
- "highest"
- "locked"
- "classmap-authoritative"
- "no-scripts"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down Expand Up @@ -53,25 +53,21 @@ jobs:
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
run: "composer update --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Install with classmap authoritative flag"
if: ${{ matrix.dependencies == 'classmap-authoritative' }}
run: "composer install --no-interaction --classmap-authoritative"
run: "composer install --no-interaction --classmap-authoritative --ignore-platform-req=php"

- name: "Install without scripts"
if: ${{ matrix.dependencies == 'no-scripts' }}
run: "composer install --no-scripts"
run: "composer install --no-scripts --ignore-platform-req=php"

- name: "Tests"
run: "vendor/bin/phpunit"
9 changes: 3 additions & 6 deletions .github/workflows/psalm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- "locked"
php-version:
- "7.4"
- "8.0"
operating-system:
- "ubuntu-latest"

Expand Down Expand Up @@ -49,17 +50,13 @@ jobs:
key: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"
restore-keys: "php-${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Install lowest dependencies"
if: ${{ matrix.dependencies == 'lowest' }}
run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest"

- name: "Install highest dependencies"
if: ${{ matrix.dependencies == 'highest' }}
run: "composer update --no-interaction --no-progress --no-suggest"
run: "composer update --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "Install locked dependencies"
if: ${{ matrix.dependencies == 'locked' }}
run: "composer install --no-interaction --no-progress --no-suggest"
run: "composer install --no-interaction --no-progress --no-suggest --ignore-platform-req=php"

- name: "psalm"
run: "vendor/bin/psalm --shepherd --stats"
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@
}
],
"require": {
"php": "^7.4.7",
"php": "^7.4.7 || ~8.0.0",
"composer-runtime-api": "^2.0.0"
},
"require-dev": {
"composer/composer": "^2.0.0@dev",
"doctrine/coding-standard": "^8.1.0",
"ext-zip": "^1.15.0",
"infection/infection": "^0.17.2",
"phpunit/phpunit": "^9.2.6",
"vimeo/psalm": "^3.12.2"
"infection/infection": "dev-master#8d6c4d6b15ec58d3190a78b7774a5d604ec1075a",
"phpunit/phpunit": "~9.3.11",
"vimeo/psalm": "^4.0.1"
},
"replace": {
"composer/package-versions-deprecated": "*"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit a7e35c3

Please sign in to comment.