Skip to content

Commit

Permalink
feat: adds php-81 support
Browse files Browse the repository at this point in the history
  • Loading branch information
nunomaduro committed Sep 20, 2021
1 parent 63456f5 commit 5594255
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 86 deletions.
24 changes: 1 addition & 23 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,6 @@ name: Static Analysis
on: ['push', 'pull_request']

jobs:
cs:
runs-on: ubuntu-latest

name: Code Style

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer
coverage: none

- name: Install Dependencies
run: composer update --no-interaction --prefer-dist --no-progress --ansi

- name: Run PHP-CS-Fixer
run: vendor/bin/php-cs-fixer fix -v --allow-risky=yes --dry-run --ansi

phpstan:
runs-on: ubuntu-latest
strategy:
Expand All @@ -40,7 +18,7 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.0
tools: composer
coverage: none

Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.4, 8.0]
php: [7.4, 8.0, 8.1]
dependency-version: [prefer-lowest, prefer-stable]

name: PHP ${{ matrix.php }} ${{ matrix.dependency-version }}
Expand All @@ -28,6 +28,10 @@ jobs:
tools: composer
coverage: none

- name: Mimic PHP 8.0
run: composer config platform.php 8.0.999
if: matrix.php > 8

- name: Setup Problem Matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
Expand Down
35 changes: 0 additions & 35 deletions .php-cs-fixer.php

This file was deleted.

20 changes: 0 additions & 20 deletions .scrutinizer.yml

This file was deleted.

10 changes: 3 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,17 @@
"require": {
"php": "^7.3 || ^8.0",
"facade/ignition-contracts": "^1.0",
"filp/whoops": "^2.7.2",
"filp/whoops": "^2.14.3",
"symfony/console": "^5.0"
},
"require-dev": {
"brianium/paratest": "^6.1",
"fideloper/proxy": "^4.4.1",
"friendsofphp/php-cs-fixer": "^3.0",
"fruitcake/laravel-cors": "^2.0.3",
"laravel/framework": "^8.0 || ^9.0",
"laravel/framework": "8.x-dev",
"nunomaduro/larastan": "^0.6.2",
"nunomaduro/mock-final-classes": "^1.0",
"orchestra/testbench": "^6.0 || ^7.0",
"orchestra/testbench": "^6.0",
"phpstan/phpstan": "^0.12.64",
"phpunit/phpunit": "^9.5.0"
},
Expand Down Expand Up @@ -58,12 +57,9 @@
}
},
"scripts": {
"lint": "php-cs-fixer fix -v --allow-risky=yes",
"test:types": "phpstan analyse --ansi",
"test:unit": "phpunit --colors=always",
"test:lint": "php-cs-fixer fix -v --dry-run --allow-risky=yes",
"test": [
"@test:lint",
"@test:types",
"@test:unit"
]
Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Adapters/PhpunitTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public function itIsAPrinter(): void
public function itDoNotHandlesTestThatAreNotTestCases(): void
{
$test = new class() implements Test {
#[\ReturnTypeWillChange]
public function count()
{
return 0;
Expand Down

0 comments on commit 5594255

Please sign in to comment.