diff --git a/composer.json b/composer.json
index 4beefd1a..0ac2569a 100644
--- a/composer.json
+++ b/composer.json
@@ -55,7 +55,7 @@
"phpunit/phpunit": "^9.6",
"psalm/plugin-phpunit": "^0.18",
"psalm/plugin-symfony": "^5.0",
- "rector/rector": "^0.19",
+ "rector/rector": "^1.1",
"sonata-project/block-bundle": "^4.2 || ^5.0",
"symfony/browser-kit": "^5.4 || ^6.2 || ^7.0",
"symfony/css-selector": "^5.4 || ^6.2 || ^7.0",
diff --git a/psalm.xml b/psalm.xml
index bdf760eb..fc8674a1 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -11,4 +11,7 @@
+
+
+
diff --git a/src/Model/ModelManager.php b/src/Model/ModelManager.php
index 6f9b3a89..dc3c5cd6 100755
--- a/src/Model/ModelManager.php
+++ b/src/Model/ModelManager.php
@@ -191,7 +191,7 @@ public function getIdentifierValues(object $model): array
public function getIdentifierFieldNames(string $class): array
{
- return array_filter($this->getMetadata($class)->getIdentifier());
+ return array_filter($this->getMetadata($class)->getIdentifier(), static fn (?string $id) => null !== $id);
}
public function getNormalizedIdentifier(object $model): ?string
diff --git a/tests/Model/ModelManagerTest.php b/tests/Model/ModelManagerTest.php
index 2350fd3a..55208338 100644
--- a/tests/Model/ModelManagerTest.php
+++ b/tests/Model/ModelManagerTest.php
@@ -327,8 +327,10 @@ public function testFailingBatchDelete(string $expectedExceptionMessage, array $
Configuration::AUTOGENERATE_FILE_NOT_EXISTS
);
$uow = new UnitOfWork($dm, $eventManager, $hydratorFactory);
- /** @psalm-suppress InternalMethod */
- $hydratorFactory->setUnitOfWork($uow);
+ // @phpstan-ignore-next-line
+ if (method_exists($hydratorFactory, 'setUnitOfWork')) {
+ $hydratorFactory->setUnitOfWork($uow);
+ }
$dm
->expects(static::atLeastOnce())