Skip to content

Commit 3bb9ff9

Browse files
authored
Merge pull request #197 from renatomefi/fix/travis-scrutinizer
Improving scrutinizer handling on travis
2 parents 64690f2 + 8d0856b commit 3bb9ff9

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ matrix:
1717
- php: 7.0
1818
env: SYMFONY_VERSION=3.2.*
1919
- php: 7.1
20-
env: SYMFONY_VERSION=3.3.* PHPUNIT_FLAGS="-d xdebug.max_nesting_level=1000 --coverage-clover=build/logs/clover.xml"
20+
env: SYMFONY_VERSION=3.3.* SCRUTINIZER=true
2121
- php: 7.1
2222
env: GRAPHQLPHP_VERSION=0.10.0
2323
- php: hhvm
@@ -31,17 +31,17 @@ cache:
3131
- $HOME/.php_cs.cache
3232

3333
before_install:
34-
- if [[ "$TRAVIS_PHP_VERSION" != "7.1" && "$TRAVIS_PHP_VERSION" != "hhvm" ]]; then phpenv config-rm xdebug.ini || true; fi
34+
- if [[ ${SCRUTINIZER} != true && ${TRAVIS_PHP_VERSION} != "hhvm" ]]; then phpenv config-rm xdebug.ini || true; fi
3535
- composer selfupdate
36-
- if [ "$SYMFONY_VERSION" != "" ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" "symfony/framework-bundle:${SYMFONY_VERSION}" --dev --no-update; fi;
37-
- if [ "$GRAPHQLPHP_VERSION" != "" ]; then composer require "webonyx/graphql-php:${GRAPHQLPHP_VERSION}" --dev --no-update; fi;
36+
- if [ $SYMFONY_VERSION ]; then composer require "symfony/symfony:${SYMFONY_VERSION}" "symfony/framework-bundle:${SYMFONY_VERSION}" --dev --no-update; fi;
37+
- if [ $GRAPHQLPHP_VERSION ]; then composer require "webonyx/graphql-php:${GRAPHQLPHP_VERSION}" --dev --no-update; fi;
3838

3939
install: composer update --prefer-source --no-interaction --optimize-autoloader
4040

4141
script:
42-
- bin/phpunit --debug ${PHPUNIT_FLAGS}
43-
- if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then bin/php-cs-fixer fix --diff --dry-run -v; fi;
42+
- bin/phpunit --debug $( if [ $SCRUTINIZER = true ]; then echo "-d xdebug.max_nesting_level=1000 --coverage-clover=build/logs/clover.xml"; fi; )
43+
- if [ ${TRAVIS_PHP_VERSION} == "7.0" ]; then bin/php-cs-fixer fix --diff --dry-run -v; fi;
4444

4545
after_script:
46-
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
47-
- if [ "$TRAVIS_PHP_VERSION" == "7.1" ]; then composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v; fi
46+
- if [ ${SCRUTINIZER} = true ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml; fi
47+
- if [ ${SCRUTINIZER} = true ]; then composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v; fi

Resolver/TypeResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ private function hasNeedListOfWrapper($alias)
8989
$got = $alias[strlen($alias) - 1];
9090
if (']' !== $got) {
9191
throw new UnresolvableException(
92-
sprintf('Malformed ListOf wrapper type "%s" expected "]" but got .', $alias, json_encode($got))
92+
sprintf('Malformed ListOf wrapper type "%s" expected "]" but got "%s".', $alias, json_encode($got))
9393
);
9494
}
9595

Tests/Resolver/TypeResolverTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public function testResolveUnknownType()
6666

6767
/**
6868
* @expectedException \Overblog\GraphQLBundle\Resolver\UnresolvableException
69+
* @expectedExceptionMessage Malformed ListOf wrapper type "[Tata" expected "]" but got ""a"".
6970
*/
7071
public function testWrongListOfWrappingType()
7172
{

0 commit comments

Comments
 (0)