Skip to content
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

Enhance test, fix coding style and static analysis #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,17 @@ matrix:
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.3
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"
- php: 7.4
env: COMPOSER_FLAGS="--prefer-stable --prefer-lowest"

# Test the latest stable release
- php: 7.2
- php: 7.3
- php: 7.4
env: COVERAGE=true PHPUNIT_FLAGS="-v --coverage-text --coverage-clover=coverage.xml"

# Latest commit to master
- php: 7.3
- php: 7.4
env: STABILITY="dev"

allow_failures:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('serializer.mapping.cache_warmer')) {
return;
};
}

$definition = $container->getDefinition('serializer.mapping.cache_warmer');
$argument = $definition->getArgument(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public function process(ContainerBuilder $container)
{
if (!$container->hasDefinition('validator.builder')) {
return;
};
}

$validatorBuilder = $container->getDefinition('validator.builder');
$validatorBuilder->addMethodCall('addLoader', [new Reference(FakeValidatorLoader::class)]);
Expand Down
9 changes: 8 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,15 @@
}
],
"require": {
"php": "^7.2",
"symfony/framework-bundle": "^3.4 || ^4.3 || ^5.0",
"doctrine/annotations": "^1.6"
"symfony/console": "^3.4 || ^4.3 || ^5.0",
"symfony/serializer": "^3.4 || ^4.3 || ^5.0",
"symfony/validator": "^3.4 || ^4.3 || ^5.0",
"symfony/config": "^3.4 || ^4.3 || ^5.0",
"symfony/debug": "^3.4 || ^4.3 || ^5.0",
"doctrine/annotations": "^1.8",
"phpstan/phpstan": "^0.12"
},
"require-dev": {
"phpunit/phpunit": "^8.4"
Expand Down
8 changes: 7 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,10 @@ parameters:
ignoreErrors:
-
path: %currentWorkingDirectory%/DependencyInjection/Configuration.php
message: '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition::children()#'
message: '#Call to an undefined method Symfony\\Component\\Config\\Definition\\Builder\\TreeBuilder::root().#'
-
path: %currentWorkingDirectory%/Loader/FakeSerializerLoader.php
message: '#Method Happyr\\AnnotationWarmer\\Loader\\FakeSerializerLoader::loadClassMetadata().#'
-
path: %currentWorkingDirectory%/Loader/FakeValidatorLoader.php
message: '#Method Happyr\\AnnotationWarmer\\Loader\\FakeValidatorLoader::loadClassMetadata().#'