Skip to content

Commit

Permalink
Merge pull request #58 from ruudk/refactor
Browse files Browse the repository at this point in the history
Bump minimum required PHP to 8.0
  • Loading branch information
mcg-web authored Dec 8, 2021
2 parents 4347804 + fc2086a commit 264e38a
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 81 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,25 +5,21 @@ on:
push:
branches:
- "master"
schedule:
- cron: "42 3 * * *"

jobs:
phpunit:
name: "PHPUnit"
tests:
name: "Tests"
runs-on: "ubuntu-20.04"

strategy:
fail-fast: false
matrix:
php-version:
- "7.3"
- "7.4"
- "8.0"
- "8.1"
dependencies:
- "lowest"
- "highest"
include:
- dependencies: "lowest"
php-version: "7.3"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -56,7 +52,7 @@ jobs:
name: "Upload coverage to Codecov"
runs-on: "ubuntu-20.04"
needs:
- "phpunit"
- "tests"

steps:
- name: "Checkout"
Expand All @@ -73,3 +69,32 @@ jobs:
uses: "codecov/codecov-action@v1"
with:
directory: reports

coding-standards:
name: "Coding Standards"
runs-on: "ubuntu-20.04"

strategy:
matrix:
php-version:
- "8.0"

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

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: "none"
php-version: "${{ matrix.php-version }}"
tools: "cs2pr"

- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v1"

- name: "Install php-cs-fixer"
run: composer require "friendsofphp/php-cs-fixer:^2.16"

- name: "Run php-cs-fixer"
run: "vendor/bin/php-cs-fixer fix --diff --dry-run -v"
37 changes: 0 additions & 37 deletions .github/workflows/coding-standards.yml

This file was deleted.

8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
"overblog/promise-adapter": "self.version"
},
"require": {
"php": "^7.3|^8.0"
"php": "^8.0"
},
"require-dev": {
"guzzlehttp/promises": "^1.3.0",
"phpunit/phpunit": "^7.5|^8.5",
"react/promise": "^2.5.0",
"guzzlehttp/promises": "^1.5.0",
"phpunit/phpunit": "^9.5.10",
"react/promise": "^2.8.0",
"webonyx/graphql-php": "^14.0"
},
"suggest": {
Expand Down
51 changes: 21 additions & 30 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,33 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="./vendor/autoload.php"
convertDeprecationsToExceptions="false"
>
<php>
<ini name="error_reporting" value="-1" />
</php>

<testsuites>
<testsuite name="DataLoad Php Test Suite">
<directory>./tests</directory>
<directory>./lib/promise-adapter/tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist>
<directory>./src</directory>
<directory>./lib/promise-adapter/src</directory>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
<directory>./lib/promise-adapter/tests</directory>
</exclude>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="./vendor/autoload.php" convertDeprecationsToExceptions="false">
<coverage>
<include>
<directory>./src</directory>
<directory>./lib/promise-adapter/src</directory>
</include>
<exclude>
<directory>./vendor</directory>
<directory>./tests</directory>
<directory>./lib/promise-adapter/tests</directory>
</exclude>
</coverage>
<php>
<ini name="error_reporting" value="-1"/>
</php>
<testsuites>
<testsuite name="DataLoad Php Test Suite">
<directory>./tests</directory>
<directory>./lib/promise-adapter/tests</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 264e38a

Please sign in to comment.