Skip to content

Commit

Permalink
Bump rector (#851)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Jun 19, 2024
1 parent 3cded10 commit 1180679
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,7 @@
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/>
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
</plugins>
<issueHandlers>
<MissingClassConstType errorLevel="suppress"/>
</issueHandlers>
</psalm>
2 changes: 1 addition & 1 deletion src/Model/ModelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions tests/Model/ModelManagerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit 1180679

Please sign in to comment.