Skip to content

Commit

Permalink
Merge pull request #1114 from soyuka/master
Browse files Browse the repository at this point in the history
Merge 2.0
  • Loading branch information
soyuka committed May 15, 2017
2 parents 7dfdcb1 + 838d833 commit 5e09d97
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -22,7 +22,7 @@
"symfony/property-access": "^2.7 || ^3.0",
"symfony/property-info": "^3.1",
"symfony/serializer": "^3.1",
"willdurand/negotiation": "^2.0.3 <2.3"
"willdurand/negotiation": "^2.3.1"
},
"require-dev": {
"behat/behat": "^3.1",
Expand Down
5 changes: 1 addition & 4 deletions phpstan.neon
Expand Up @@ -10,9 +10,6 @@ parameters:
- '#Call to an undefined method PHPUnit_Framework_MockObject_MockObject::[a-zA-Z0-9_]+\(\)#'

# False positives
- '#scalar#' # Fixed in PHPStan 0.7
- '#Parameter \#2 \$dqlPart of method Doctrine\\ORM\\QueryBuilder::add\(\) expects Doctrine\\ORM\\Query\\Expr\\Base, Doctrine\\ORM\\Query\\Expr\\Join\[\] given#' # Fixed in Doctrine's master
- '#Parameter \#1 \$rootNode of method ApiPlatform\\Core\\Bridge\\Symfony\\Bundle\\DependencyInjection\\Configuration::[a-zA-Z0-9]+\(\) expects Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition, Symfony\\Component\\Config\\Definition\\Builder\\ArrayNodeDefinition|Symfony\\Component\\Config\\Definition\\Builder\\NodeDefinition given#'
- '#Parameter \#1 \$source of static method ApiPlatform\\Core\\Util\\RequestParser::parseRequestParams\(\) expects string, string\|resource given#'
- '#Call to an undefined method Doctrine\\Common\\Persistence\\ObjectManager::getConnection\(\)#'
- '#Method ApiPlatform\\Core\\Api\\OperationTypeDeprecationHelper::getOperationType\(\) should return string but returns string|bool|null#'
- '#Parameter \#1 \$callable of static method Doctrine\\Common\\Annotations\\AnnotationRegistry::registerLoader\(\) expects callable, mixed\[\] given#'
Expand Up @@ -27,7 +27,7 @@ final class FilterEagerLoadingExtension implements QueryCollectionExtensionInter
{
use EagerLoadingTrait;

public function __construct(ResourceMetadataFactoryInterface $resourceMetadataFactory, $forceEager = true)
public function __construct(ResourceMetadataFactoryInterface $resourceMetadataFactory, bool $forceEager = true)
{
$this->resourceMetadataFactory = $resourceMetadataFactory;
$this->forceEager = $forceEager;
Expand Down
2 changes: 1 addition & 1 deletion src/Bridge/Doctrine/Orm/Util/EagerLoadingTrait.php
Expand Up @@ -46,7 +46,7 @@ private function shouldOperationForceEager(string $resourceClass, array $options
$forceEager = $resourceMetadata->getAttribute('force_eager');
}

return is_bool($forceEager) ? $forceEager : $this->forceEager;
return is_bool($forceEager) ? $forceEager : (bool) $this->forceEager;
}

/**
Expand Down

0 comments on commit 5e09d97

Please sign in to comment.