Skip to content

Commit 23973f5

Browse files
authored
Merge pull request #80 from moufmouf/patch-1
Fixing PHP 7.2 build
2 parents 440e8c9 + 4842fbb commit 23973f5

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ matrix:
1515
include:
1616
# Test the latest stable release
1717
- php: 7.2
18-
env: PHPSTAN=true
18+
env: PHPSTAN=true COMPOSER1=true
1919
- php: 7.4
2020
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text" TESTNOSECURITYBUNDLE=true
2121

@@ -38,6 +38,7 @@ matrix:
3838

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

Controller/GraphqliteController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,11 @@ class GraphqliteController
4444
*/
4545
private $serverConfig;
4646

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

5454
public function loadRoutes(): RouteCollection

0 commit comments

Comments
 (0)