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
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"doctrine/dbal": "^3.7.0",
"doctrine/doctrine-bundle": "^2.11.0",
"doctrine/orm": "^2.7",
"doctrine/persistence": "^3.0",
"friendsofphp/proxy-manager-lts": "^1.0",
"friendsofsymfony/http-cache-bundle": "^3.0",
"friendsofsymfony/jsrouting-bundle": "^3.5",
Expand Down
6 changes: 0 additions & 6 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -10554,12 +10554,6 @@ parameters:
count: 1
path: src/lib/Persistence/Cache/UserPreferenceHandler.php

-
message: '#^Return type \(Doctrine\\ORM\\Mapping\\ClassMetadataFactory\) of method Ibexa\\Core\\Persistence\\Doctrine\\SiteAccessAwareEntityManager\:\:getMetadataFactory\(\) should be compatible with return type \(Doctrine\\Persistence\\Mapping\\ClassMetadataFactory\<Doctrine\\Persistence\\Mapping\\ClassMetadata\<object\>\>\) of method Doctrine\\Persistence\\ObjectManager\:\:getMetadataFactory\(\)$#'
identifier: method.childReturnType
count: 2
path: src/lib/Persistence/Doctrine/SiteAccessAwareEntityManager.php

-
message: '#^Property Ibexa\\Core\\Persistence\\FieldTypeRegistry\:\:\$coreFieldTypes \(array\<Ibexa\\Contracts\\Core\\FieldType\\FieldType\>\) does not accept array\<Ibexa\\Core\\Persistence\\FieldType\>\.$#'
identifier: assign.propertyType
Expand Down
18 changes: 8 additions & 10 deletions src/lib/Persistence/Doctrine/SiteAccessAwareEntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

namespace Ibexa\Core\Persistence\Doctrine;

use Doctrine\Common\EventManager;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Cache;
use Doctrine\ORM\Configuration;
use Doctrine\ORM\EntityManagerInterface;
use Doctrine\ORM\EntityRepository;
use Doctrine\ORM\Internal\Hydration\AbstractHydrator;
use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\ORM\Mapping\ClassMetadataFactory;
use Doctrine\ORM\NativeQuery;
use Doctrine\ORM\Proxy\ProxyFactory;
use Doctrine\ORM\Query;
Expand All @@ -24,6 +24,7 @@
use Doctrine\ORM\Query\ResultSetMapping;
use Doctrine\ORM\QueryBuilder;
use Doctrine\ORM\UnitOfWork;
use Doctrine\Persistence\Mapping\ClassMetadataFactory;
use Ibexa\Bundle\Core\Entity\EntityManagerFactory;
use Ibexa\Contracts\Core\MVC\EventSubscriber\ConfigScopeChangeSubscriber;
use Ibexa\Core\MVC\Symfony\Event\ScopeChangeEvent;
Expand Down Expand Up @@ -78,10 +79,7 @@ public function transactional($func)
return $this->getWrapped()->transactional($func);
}

/**
* @return mixed
*/
public function wrapInTransaction(callable $func)
public function wrapInTransaction(callable $func): mixed
{
return $this->getWrapped()->wrapInTransaction($func);
}
Expand Down Expand Up @@ -127,6 +125,8 @@ public function createQueryBuilder(): QueryBuilder
* @param class-string<T> $entityName
*
* @return T|null
*
* @throws \Doctrine\ORM\Exception\ORMException
*/
public function getReference($entityName, $id): ?object
{
Expand Down Expand Up @@ -169,7 +169,7 @@ public function lock($entity, $lockMode, $lockVersion = null): void
$this->getWrapped()->lock($entity, $lockMode, $lockVersion);
}

public function getEventManager(): \Doctrine\Common\EventManager
public function getEventManager(): EventManager
{
return $this->getWrapped()->getEventManager();
}
Expand Down Expand Up @@ -285,6 +285,7 @@ public function getClassMetadata($className): ClassMetadata

public function getMetadataFactory(): ClassMetadataFactory
{
/** @phpstan-var ClassMetadataFactory<\Doctrine\Persistence\Mapping\ClassMetadata<object>> */
return $this->getWrapped()->getMetadataFactory();
}

Expand All @@ -293,10 +294,7 @@ public function initializeObject(object $obj): void
$this->getWrapped()->initializeObject($obj);
}

/**
* @param mixed $value
*/
public function isUninitializedObject($value): bool
public function isUninitializedObject(mixed $value): bool
{
return $this->getWrapped()->isUninitializedObject($value);
}
Expand Down
Loading