Skip to content

Commit

Permalink
add PHP 8 support
Browse files Browse the repository at this point in the history
  • Loading branch information
smoench committed Dec 7, 2020
1 parent 45a6ea7 commit 7fe8d44
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 21 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ jobs:
tools: "composer:v2"
coverage: "none"
git-fetch-depth: 1
- php: 8.0
tools: "composer:v2"
coverage: "pcov"
git-fetch-depth: 1

steps:
- uses: actions/checkout@v2
Expand Down
60 changes: 60 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: e2e

on:
push:
branches: [ master ]
pull_request:

jobs:

e2e:
runs-on: ubuntu-latest
name: ${{ matrix.e2e }} - ${{ matrix.php }}
strategy:
fail-fast: false
matrix:
e2e:
- 'e2e_php_settings_checker'
- 'e2e_scoper_alias'
- 'e2e_scoper_whitelist'
- 'e2e_check_requirements'
- 'e2e_symfony'
- 'e2e_composer_installed_versions'
php: [ '7.3', '8.0' ]
tools: [ 'composer:v2' ]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: "phar.readonly=0"
tools: ${{ matrix.tools }}
coverage: pcov

- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache composer dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.*') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php }}-
composer-${{ runner.os }}-
composer-
- name: Install dependencies
run: composer install --no-interaction --no-progress --no-suggest --prefer-dist

- name: Install requirement-checker dependencies
run: composer install --no-interaction --no-progress --prefer-dist --working-dir requirement-checker

- name: Run e2e ${{ matrix.e2e }}
run: make ${{ matrix.e2e }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require": {
"php": "^7.3",
"php": "^7.3 || ^8.0",
"ext-phar": "*",
"amphp/parallel-functions": "^0.1.3",
"beberlei/assert": "^3.2",
Expand Down
36 changes: 18 additions & 18 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion fixtures/build/dir011/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
"src/functions.php"
]
},
"bin": "index.php"
"bin": ["index.php"]
}
2 changes: 1 addition & 1 deletion fixtures/build/dir012/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"php": "7.2.9"
}
},
"bin": "bin/console",
"bin": ["bin/console"],
"autoload": {
"psr-4": {
"App\\": "src/"
Expand Down

0 comments on commit 7fe8d44

Please sign in to comment.