Skip to content

Commit

Permalink
Merge branch 'master' into issue-24
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-georgiev committed May 12, 2019
2 parents 7058c84 + 5122e11 commit 4b3d414
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 25 deletions.
6 changes: 5 additions & 1 deletion .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
build:
environment:
php: 7.3

coding_style:
php:
spaces:
around_operators:
concatenation: false
other:
after_type_cast: true
after_type_cast: true
17 changes: 10 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,15 @@ cache:
php:
- 7.1
- 7.2
- 7.3
- nightly

env:
global:
- LATEST_PHP_VERSION="7.2"
- MAINTAINED_SYMFONY_VERSIONS="2.8.*|3.4.*|4.0.*|4.1.*|4.2.*"
- LATEST_PHP_VERSION="7.3"
matrix:
- SYMFONY_VERSION="2.8.*"
- SYMFONY_VERSION="3.0.*"
- SYMFONY_VERSION="3.1.*"
- SYMFONY_VERSION="3.2.*"
- SYMFONY_VERSION="3.3.*"
- SYMFONY_VERSION="3.4.*"
- SYMFONY_VERSION="4.0.*"
- SYMFONY_VERSION="4.1.*"
- SYMFONY_VERSION="4.2.*"
- SYMFONY_VERSION="dev-master"
Expand All @@ -46,6 +41,9 @@ before_install:
- mkdir -p build/logs

install:
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
composer remove friendsofphp/php-cs-fixer phpstan/phpstan phpstan/phpstan-phpunit --dev;
fi
- if [ "$DEPENDENCIES" = "beta" ]; then
composer config minimum-stability beta;
composer update -n --prefer-dist;
Expand All @@ -64,6 +62,11 @@ script:
else
composer validate-files;
fi;
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Static analysis is skipped for older PHP versions";
else
composer run-static-analysis-including-tests;
fi;
- if [ "$(phpenv version-name)" != "$LATEST_PHP_VERSION" ]; then
echo "Code style check is skipped for older PHP versions";
else
Expand Down
28 changes: 14 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
},
"autoload-dev": {
"psr-4": {
"MartinGeorgiev\\Tests\\": "tests/MartinGeorgiev/"
"Tests\\MartinGeorgiev\\": "tests/MartinGeorgiev/"
}
},

Expand All @@ -31,41 +31,41 @@
"symfony/yaml": "^3.0|^4.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
"friendsofphp/php-cs-fixer": "^2.14",
"jakub-onderka/php-parallel-lint": "^1.0",
"php-coveralls/php-coveralls": "^2.1",
"phpstan/phpstan": "^0.10.2",
"phpstan/phpstan-phpunit": "^0.10.0",
"phpunit/phpunit": "^7.2",
"sensiolabs/security-checker": "^4.1",
"phpstan/phpstan": "^0.11",
"phpstan/phpstan-phpunit": "^0.11",
"phpunit/phpunit": "^8.1",
"sensiolabs/security-checker": "^5.0",
"symfony/phpunit-bridge": "^3.0|^4.0"
},

"scripts": {
"check-code-style": [
"bin/php-cs-fixer fix --config='./.php_cs' --show-progress=none --dry-run --no-interaction --diff -v"
"php-cs-fixer fix --config='./.php_cs' --show-progress=none --dry-run --no-interaction --diff -v"
],
"check-security": [
"bin/security-checker security:check"
"security-checker security:check"
],
"fix-code-style": [
"bin/php-cs-fixer fix --config='./.php_cs' --show-progress=none --no-interaction --diff -v"
"php-cs-fixer fix --config='./.php_cs' --show-progress=none --no-interaction --diff -v"
],
"run-static-analysis": [
"bin/phpstan analyse --level=7 src/"
"phpstan analyse --level=7 src/"
],
"run-static-analysis-including-tests": [
"@run-static-analysis",
"bin/phpstan analyse --level=4 tests/"
"phpstan analyse --level=7 tests/"
],
"run-tests": [
"bin/phpunit"
"phpunit"
],
"run-tests-with-clover": [
"bin/phpunit --coverage-clover build/logs/clover.xml"
"phpunit --coverage-clover build/logs/clover.xml"
],
"validate-files": [
"bin/parallel-lint --exclude vendor --exclude bin ."
"parallel-lint --exclude vendor --exclude bin ."
]
},

Expand Down
12 changes: 11 additions & 1 deletion phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,12 @@
includes:
- vendor/phpstan/phpstan-phpunit/extension.neon
- vendor/phpstan/phpstan-phpunit/extension.neon

parameters:
autoload_directories:
- %rootDir%/../../../src
- %rootDir%/../../../tests

reportUnmatchedIgnoredErrors: false
ignoreErrors:
- '#Cannot call method scalarNode() on Symfony\\Component\\Config\\Definition\\Builder\\NodeParentInterface|null#'
- '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::children().#'
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace MartinGeorgiev\Tests\SocialPostBundle\DependencyInjection;
namespace Tests\MartinGeorgiev\SocialPostBundle\DependencyInjection;

use MartinGeorgiev\SocialPostBundle\DependencyInjection\SocialPostExtension;
use PHPUnit\Framework\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

declare(strict_types=1);

namespace MartinGeorgiev\Tests\SocialPostBundle;
namespace Tests\MartinGeorgiev\SocialPostBundle;

use MartinGeorgiev\SocialPostBundle\DependencyInjection\Compiler\AllInOnePass;
use MartinGeorgiev\SocialPostBundle\SocialPostBundle;
Expand Down

0 comments on commit 4b3d414

Please sign in to comment.