mirror of
https://github.com/retailcrm/graphql-php.git
synced 2024-11-22 04:46:04 +03:00
parent
a4edb34deb
commit
7dbd72cebf
44
.travis.yml
44
.travis.yml
@ -2,26 +2,26 @@ dist: trusty
|
||||
language: php
|
||||
|
||||
php:
|
||||
- 7.1
|
||||
- 7.2
|
||||
- nightly
|
||||
- 7.1
|
||||
- 7.2
|
||||
- nightly
|
||||
|
||||
matrix:
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
allow_failures:
|
||||
- php: nightly
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
|
||||
before_install:
|
||||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
|
||||
- travis_retry composer self-update
|
||||
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
|
||||
- travis_retry composer self-update
|
||||
|
||||
install:
|
||||
- composer require react/promise:2.*
|
||||
- composer require psr/http-message:1.*
|
||||
- travis_retry composer update --prefer-dist
|
||||
- composer require react/promise:2.*
|
||||
- composer require psr/http-message:1.*
|
||||
- travis_retry composer update --prefer-dist
|
||||
|
||||
script: ./vendor/bin/phpunit --group default,ReactPromise
|
||||
|
||||
@ -45,21 +45,9 @@ jobs:
|
||||
after_script:
|
||||
- wget https://scrutinizer-ci.com/ocular.phar
|
||||
- php ocular.phar code-coverage:upload --format=php-clover clover.xml
|
||||
- stage: Pull request coding standard
|
||||
if: type = pull_request
|
||||
|
||||
- stage: Coding standard
|
||||
php: 7.1
|
||||
install: travis_retry composer install --prefer-dist
|
||||
script:
|
||||
- |
|
||||
if [ $TRAVIS_BRANCH != "master" ]; then
|
||||
git remote set-branches --add origin $TRAVIS_BRANCH;
|
||||
git fetch origin $TRAVIS_BRANCH;
|
||||
fi
|
||||
- git merge-base origin/$TRAVIS_BRANCH $TRAVIS_PULL_REQUEST_SHA || git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge --unshallow
|
||||
- wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
|
||||
- php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA
|
||||
# - stage: Coding standard
|
||||
# if: NOT type = pull_request
|
||||
# php: 7.1
|
||||
# install: travis_retry composer install --prefer-dist
|
||||
# script:
|
||||
# - ./vendor/bin/phpcs
|
||||
- ./vendor/bin/phpcs
|
||||
|
@ -65,7 +65,7 @@ values. Int can represent values between -(2^31) and 2^31 - 1. ';
|
||||
}
|
||||
$int = intval($num);
|
||||
// int cast with == used for performance reasons
|
||||
// @codingStandardsIgnoreLine
|
||||
// phpcs:ignore
|
||||
if ($int != $num) {
|
||||
throw new Error(
|
||||
'Int cannot represent non-integer value: ' .
|
||||
|
@ -255,7 +255,7 @@ class AST
|
||||
}
|
||||
if (is_float($serialized)) {
|
||||
// int cast with == used for performance reasons
|
||||
// @codingStandardsIgnoreLine
|
||||
// phpcs:ignore
|
||||
if ((int) $serialized == $serialized) {
|
||||
return new IntValueNode(['value' => $serialized]);
|
||||
}
|
||||
|
@ -9,6 +9,9 @@ use Psr\Http\Message\StreamInterface;
|
||||
use Psr\Http\Message\UriInterface;
|
||||
use function strtolower;
|
||||
|
||||
/**
|
||||
* phpcs:ignoreFile -- this is not a core file
|
||||
*/
|
||||
class PsrRequestStub implements ServerRequestInterface
|
||||
{
|
||||
public $queryParams = [];
|
||||
|
@ -7,6 +7,9 @@ namespace GraphQL\Tests\Server\Psr7;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\StreamInterface;
|
||||
|
||||
/**
|
||||
* phpcs:ignoreFile -- this is not a core file
|
||||
*/
|
||||
class PsrResponseStub implements ResponseInterface
|
||||
{
|
||||
public $headers = [];
|
||||
|
@ -8,6 +8,9 @@ use Psr\Http\Message\StreamInterface;
|
||||
use function strlen;
|
||||
use const SEEK_SET;
|
||||
|
||||
/**
|
||||
* phpcs:ignoreFile -- this is not a core file
|
||||
*/
|
||||
class PsrStreamStub implements StreamInterface
|
||||
{
|
||||
public $content;
|
||||
|
@ -148,7 +148,7 @@ class StarWarsData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @param string $id
|
||||
* @return mixed|null
|
||||
*/
|
||||
public static function getHuman($id)
|
||||
@ -159,7 +159,7 @@ class StarWarsData
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $id
|
||||
* @param string $id
|
||||
* @return mixed|null
|
||||
*/
|
||||
public static function getDroid($id)
|
||||
|
@ -47,7 +47,7 @@ class SchemaTest extends TestCase
|
||||
'fieldName' => [
|
||||
'type' => Type::string(),
|
||||
'resolve' => function () {
|
||||
return '';
|
||||
return '';
|
||||
},
|
||||
],
|
||||
],
|
||||
|
Loading…
Reference in New Issue
Block a user