Skip to content
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
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
"require-dev": {
"doctrine/common": "^3.2.2",
"doctrine/dbal": "^4.0",
"doctrine/doctrine-bundle": "^2.11 || ^3.1",
"doctrine/orm": "^2.17 || ^3.0",
"doctrine/doctrine-bundle": "^2.11.1 || ^3.1",
"doctrine/orm": "^2.17 || ^3.3",
"elasticsearch/elasticsearch": "^7.17 || ^8.4 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.93",
"guzzlehttp/guzzle": "^6.0 || ^7.0",
Expand Down
7 changes: 7 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@ parameters:
- tests/Fixtures/TestBundle/Document/
- src/Metadata/Tests/Fixtures/ApiResource/
- '#Access to an undefined property Prophecy\\Prophecy\\ObjectProphecy<(\\?[a-zA-Z0-9_]+)+>::\$[a-zA-Z0-9_]+#'
# ORM 2 and 3 disagree on the shape of ClassMetadata::$associationMappings
# (raw arrays vs mapping objects). The extension reads them through
# ArrayAccess, so array fixtures are valid for both; composer still
# supports doctrine/orm ^2.17.
-
identifier: assign.propertyType
path: src/Doctrine/Orm/Tests/Extension/EagerLoadingExtensionTest.php
# https://github.com/phpstan/phpstan-symfony/issues/76
-
message: '#Service "test" is not registered in the container\.#'
Expand Down
3 changes: 1 addition & 2 deletions src/Doctrine/Orm/Extension/EagerLoadingExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
use ApiPlatform\Metadata\Property\Factory\PropertyMetadataFactoryInterface;
use ApiPlatform\Metadata\Property\Factory\PropertyNameCollectionFactoryInterface;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Query\AST\PartialObjectExpression;
use Doctrine\ORM\Query\Expr\Join;
use Doctrine\ORM\Query\Expr\Select;
use Doctrine\ORM\QueryBuilder;
Expand Down Expand Up @@ -71,7 +70,7 @@ private function apply(QueryBuilder $queryBuilder, QueryNameGeneratorInterface $
$options = [];

$forceEager = $operation?->getForceEager() ?? $this->forceEager;
$fetchPartial = class_exists(PartialObjectExpression::class) && ($operation?->getFetchPartial() ?? $this->fetchPartial);
$fetchPartial = $operation?->getFetchPartial() ?? $this->fetchPartial;

if (!isset($context['groups']) && !isset($context['attributes'])) {
$contextType = isset($context['api_denormalize']) ? 'denormalization_context' : 'normalization_context';
Expand Down
Loading
Loading