Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add support for PHP 8 #41

Merged
merged 19 commits into from
Dec 7, 2020
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
21 changes: 8 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
dist: trusty
dist: bionic

language: php

php:
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4
- 8.0
- nightly
- hhvm

branches:
only:
Expand All @@ -20,21 +18,18 @@ branches:
matrix:
allow_failures:
- php: nightly
- php: 7.3

cache:
directories:
- $HOME/.composer/cache

before_install:
- if [[ "$TRAVIS_PHP_VERSION" != "5.6" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini || true; fi
- phpenv config-rm xdebug.ini || true
- composer selfupdate

install: composer update --prefer-dist --no-interaction
install: composer update --prefer-source --no-interaction

script:
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then bin/phpunit --debug --coverage-clover build/logs/clover.xml; else bin/phpunit --debug; fi
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then composer require "friendsofphp/php-cs-fixer:^2.0" && bin/php-cs-fixer fix --diff --dry-run -v; fi;

after_success:
- if [ "$TRAVIS_PHP_VERSION" == "5.6" ]; then composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v; fi
- composer check-platform-reqs
- bin/phpunit --debug
- if [ "$TRAVIS_PHP_VERSION" != "8.0" ]; then composer require "friendsofphp/php-cs-fixer:^2.16" && bin/php-cs-fixer fix --diff --dry-run -v; fi
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@
"overblog/promise-adapter": "self.version"
},
"require": {
"php": "^5.5|^7.0"
"php": "^7.1|^8.0"
},
"require-dev": {
"guzzlehttp/promises": "^1.3.0",
"phpunit/phpunit": "^4.1|^5.1",
"phpunit/phpunit": "^7.5|^8.5",
"react/promise": "^2.5.0",
"webonyx/graphql-php": "^0.11.0"
"webonyx/graphql-php": "^14.0"
},
"suggest": {
"guzzlehttp/promises": "To use with Guzzle promise",
Expand Down
2 changes: 1 addition & 1 deletion lib/promise-adapter/tests/AdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
use Overblog\PromiseAdapter\Adapter\WebonyxGraphQLSyncPromiseAdapter;
use Overblog\PromiseAdapter\PromiseAdapterInterface;

class AdapterTest extends \PHPUnit_Framework_TestCase
class AdapterTest extends \PHPUnit\Framework\TestCase
{
/**
* @dataProvider AdapterDataProvider
Expand Down
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

<!-- http://phpunit.de/manual/4.1/en/appendixes.configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://schema.phpunit.de/4.1/phpunit.xsd"
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="./vendor/autoload.php"
convertDeprecationsToExceptions="false"
>
<php>
<ini name="error_reporting" value="-1" />
Expand Down
2 changes: 1 addition & 1 deletion tests/Functional/Webonyx/GraphQL/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,6 @@ public static function build(DataLoader $dataLoader)
]
]);

return new \GraphQL\Schema(['query' => $queryType]);
return new \GraphQL\Type\Schema(['query' => $queryType]);
}
}
2 changes: 1 addition & 1 deletion tests/Functional/Webonyx/GraphQL/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
use Overblog\DataLoader\DataLoader;
use Overblog\PromiseAdapter\PromiseAdapterInterface;

abstract class TestCase extends \PHPUnit_Framework_TestCase
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
private static $fixtures = null;

Expand Down
4 changes: 2 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
use Overblog\PromiseAdapter\Adapter\ReactPromiseAdapter;
use Overblog\PromiseAdapter\PromiseAdapterInterface;

abstract class TestCase extends \PHPUnit_Framework_TestCase
abstract class TestCase extends \PHPUnit\Framework\TestCase
{
/**
* @var PromiseAdapterInterface
*/
protected static $promiseAdapter;

public function setUp()
public function setUp(): void
{
self::$promiseAdapter = new ReactPromiseAdapter();
}
Expand Down