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

Fixing PHP 7.2 build #80

Merged
merged 2 commits into from Dec 1, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion .travis.yml
Expand Up @@ -15,7 +15,7 @@ matrix:
include:
# Test the latest stable release
- php: 7.2
env: PHPSTAN=true
env: PHPSTAN=true COMPOSER1=true
- php: 7.4
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" TESTNOSECURITYBUNDLE=true

Expand All @@ -38,6 +38,7 @@ matrix:

before_install:
- if [[ $COVERAGE != true ]]; then phpenv config-rm xdebug.ini || true; fi
- if [[ $COMPOSER1 = true ]]; then composer selfupdate --1; fi
- if ! [ -z "$STABILITY" ]; then composer config minimum-stability ${STABILITY}; fi;
- if ! [ -v "$DEPENDENCIES" ]; then composer require --no-update ${DEPENDENCIES}; fi;

Expand Down
4 changes: 2 additions & 2 deletions Controller/GraphqliteController.php
Expand Up @@ -44,11 +44,11 @@ class GraphqliteController
*/
private $serverConfig;

public function __construct(ServerConfig $serverConfig, HttpMessageFactoryInterface $httpMessageFactory = null, ?int $debug = Debug::RETHROW_UNSAFE_EXCEPTIONS)
public function __construct(ServerConfig $serverConfig, HttpMessageFactoryInterface $httpMessageFactory = null, ?int $debug = null)
{
$this->serverConfig = $serverConfig;
$this->httpMessageFactory = $httpMessageFactory ?: new PsrHttpFactory(new ServerRequestFactory(), new StreamFactory(), new UploadedFileFactory(), new ResponseFactory());
$this->debug = $debug ?? false;
$this->debug = $debug ?? $serverConfig->getDebug();
}

public function loadRoutes(): RouteCollection
Expand Down