Skip to content

Reconfigure Travis-CI #685

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

Merged
merged 1 commit into from
Jun 29, 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
1 change: 1 addition & 0 deletions .php_cs.dist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ return PhpCsFixer\Config::create()
'general_phpdoc_annotation_remove' => ['author', 'category', 'copyright', 'created', 'license', 'package', 'since', 'subpackage', 'version'],
'native_function_invocation' => true,
'fully_qualified_strict_types' => true,
'single_line_throw' => false,
]
)
->setFinder($finder)
Expand Down
34 changes: 14 additions & 20 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ before_install:
- if [ "${SYMFONY_VERSION}" != "" ]; then perl -pi -e 's#"(symfony/.*)":\s*".*"#"$1":"'"${SYMFONY_VERSION}"'"#' composer.json; fi;
- if [ "${PHPUNIT_VERSION}" != "" ]; then composer req "phpunit/phpunit:${PHPUNIT_VERSION}" --dev --no-update; fi;
- if [ "${VALIDATOR}" = "0" ]; then composer remove "symfony/validator" --dev --no-update; fi;
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{,.disabled} || echo "xdebug not available"
- composer selfupdate
- if [ $GRAPHQLPHP_VERSION ]; then composer require "webonyx/graphql-php:${GRAPHQLPHP_VERSION}" --dev --no-update; fi;

Expand All @@ -32,45 +31,40 @@ script: composer test

jobs:
include:
- php: 7.2
env: SYMFONY_VERSION=4.3.* PHPUNIT_VERSION=^7.2
- php: 7.3
env: SYMFONY_VERSION=4.3.* VALIDATOR=0
- php: 7.3
env: SYMFONY_VERSION=4.3.* USE_EXPERIMENTAL_EXECUTOR=1
- php: 7.3
env: SYMFONY_VERSION=4.4.* SYMFONY_DEPRECATIONS_HELPER=max[total]=0
- php: 7.3
env: SYMFONY_VERSION=5.0.* SYMFONY_DEPRECATIONS_HELPER=max[total]=0
- php: 7.4snapshot
env: SYMFONY_VERSION=4.3.*
- php: nightly
env: COMPOSER_UPDATE_FLAGS=--ignore-platform-reqs

- stage: Code Quality
php: 7.2
php: 7.4
env: COVERAGE SYMFONY_VERSION=4.4.*
before_script:
- mv ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini{.disabled,}
- if [[ ! $(php -m | grep -si xdebug) ]]; then echo "xdebug required for coverage"; exit 1; fi
script: bin/phpunit --color=always -v --debug -d xdebug.max_nesting_level=1000 --coverage-clover=build/logs/clover.xml
- pecl install pcov
# TODO: after deleting the 'lib' folder remove the 'pcov.exclude' and 'pcov.directory' options
script: > # break command into 5 lines
php
-d pcov.enabled=1
-d pcov.directory=.
-d pcov.exclude="/(vendor|tests)/"
bin/phpunit --color=always -v --debug --coverage-clover=build/logs/clover.xml
after_script:
- wget https://scrutinizer-ci.com/ocular.phar && travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v
- wget https://scrutinizer-ci.com/ocular.phar && travis_retry php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
- composer require "satooshi/php-coveralls:^1.0" && travis_retry php bin/coveralls -v

- stage: Code Quality
php: 7.2
php: 7.4
env: STATIC_ANALYSIS SYMFONY_VERSION=4.3.*
install: travis_retry composer install --prefer-dist
script: composer static-analysis

- stage: Code Quality
php: 7.2
php: 7.4
env: CODING_STANDARDS
script: composer check-cs

- stage: Code Quality
php: 7.2
php: 7.4
env: BENCHMARK
script: composer bench

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"test -f phpbench.phar || wget https://phpbench.github.io/phpbench/phpbench.phar https://phpbench.github.io/phpbench/phpbench.phar.pubkey",
"@php phpbench.phar run -l dots --ansi -vvv --report='generator: \"table\", cols: [\"benchmark\", \"subject\", \"params\", \"best\", \"mean\", \"mode\", \"worst\", \"diff\"], break: [\"benchmark\"], sort: {mean: \"asc\"}'"
],
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.15.3/php-cs-fixer.phar -O php-cs-fixer.phar",
"install-cs": "test -f php-cs-fixer.phar || wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.4/php-cs-fixer.phar -O php-cs-fixer.phar",
"fix-cs": [
"@install-cs",
"@php php-cs-fixer.phar fix --diff -v --allow-risky=yes --ansi",
Expand Down
45 changes: 4 additions & 41 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -765,26 +765,6 @@ parameters:
count: 1
path: src/Transformer/ArgumentsTransformer.php

-
message: "#^Parameter \\#2 \\$type of method Overblog\\\\GraphQLBundle\\\\Validator\\\\InputValidator\\:\\:createCollectionNode\\(\\) expects GraphQL\\\\Type\\\\Definition\\\\InputObjectType\\|GraphQL\\\\Type\\\\Definition\\\\ObjectType, GraphQL\\\\Type\\\\Definition\\\\Type\\|null given\\.$#"
count: 1
path: src/Validator/InputValidator.php

-
message: "#^Parameter \\#2 \\$type of method Overblog\\\\GraphQLBundle\\\\Validator\\\\InputValidator\\:\\:createObjectNode\\(\\) expects GraphQL\\\\Type\\\\Definition\\\\InputObjectType\\|GraphQL\\\\Type\\\\Definition\\\\ObjectType, GraphQL\\\\Type\\\\Definition\\\\Type\\|null given\\.$#"
count: 1
path: src/Validator/InputValidator.php

-
message: "#^Array \\(array\\<Symfony\\\\Component\\\\Validator\\\\Mapping\\\\ClassMetadataInterface\\>\\) does not accept Symfony\\\\Component\\\\Validator\\\\Mapping\\\\MetadataInterface\\.$#"
count: 1
path: src/Validator/InputValidator.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$parent\\)\\: Unexpected token \"\\$parent\", expected TOKEN_IDENTIFIER at offset 113$#"
count: 1
path: src/Validator/InputValidator.php

-
message: "#^Array \\(array\\<Symfony\\\\Component\\\\Validator\\\\Mapping\\\\PropertyMetadata\\>\\) does not accept Overblog\\\\GraphQLBundle\\\\Validator\\\\Mapping\\\\PropertyMetadata\\.$#"
count: 1
Expand Down Expand Up @@ -1060,26 +1040,6 @@ parameters:
count: 1
path: tests/Functional/Upload/UploadTest.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$payload\\)\\: Unexpected token \"\\$payload\", expected TOKEN_IDENTIFIER at offset 140$#"
count: 1
path: tests/Functional/Validator/StaticValidator.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$value\\)\\: Unexpected token \"\\$value\", expected TOKEN_IDENTIFIER at offset 44$#"
count: 1
path: tests/Functional/Validator/StaticValidator.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$object\\)\\: Unexpected token \"\\$object\", expected TOKEN_IDENTIFIER at offset 44$#"
count: 1
path: tests/Functional/Validator/StaticValidator.php

-
message: "#^PHPDoc tag @param has invalid value \\(\\$payload\\)\\: Unexpected token \"\\$payload\", expected TOKEN_IDENTIFIER at offset 141$#"
count: 1
path: tests/Functional/Validator/StaticValidator.php

-
message: "#^Cannot call method getCursor\\(\\) on Overblog\\\\GraphQLBundle\\\\Relay\\\\Connection\\\\Output\\\\Edge\\|false\\.$#"
count: 1
Expand Down Expand Up @@ -1310,4 +1270,7 @@ parameters:
count: 1
path: tests/Upload/Type/GraphQLUploadTypeTest.php


-
message: "#^Array \\(array<Symfony\\\\Component\\\\Validator\\\\Mapping\\\\ClassMetadataInterface>\\) does not accept Symfony\\\\Component\\\\Validator\\\\Mapping\\\\MetadataInterface\\.$#"
count: 1
path: src/Validator/InputValidator.php
3 changes: 1 addition & 2 deletions src/CacheWarmer/CompileCacheWarmer.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ class CompileCacheWarmer implements CacheWarmerInterface
/**
* CompileCacheWarmer constructor.
*
* @param TypeGenerator $typeGenerator
* @param bool $compiled
* @param bool $compiled
*/
public function __construct(TypeGenerator $typeGenerator, $compiled = true)
{
Expand Down
5 changes: 0 additions & 5 deletions src/Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
return 0;
}

/**
* @param FluentResolverInterface $resolver
* @param array $tableHeaders
* @param SymfonyStyle $io
*/
private function renderTable(FluentResolverInterface $resolver, array $tableHeaders, SymfonyStyle $io): void
{
$tableRows = [];
Expand Down
4 changes: 0 additions & 4 deletions src/Config/ObjectTypeDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ public function getDefinition()

/**
* set empty fields.access with fieldsDefaultAccess values if is set?
*
* @param ArrayNodeDefinition $node
*/
private function treatFieldsDefaultAccess(ArrayNodeDefinition $node): void
{
Expand All @@ -65,8 +63,6 @@ private function treatFieldsDefaultAccess(ArrayNodeDefinition $node): void

/**
* set empty fields.public with fieldsDefaultPublic values if is set?
*
* @param ArrayNodeDefinition $node
*/
private function treatFieldsDefaultPublic(ArrayNodeDefinition $node): void
{
Expand Down
Loading