Skip to content

Commit 4927253

Browse files
committed
Fix psalm after release of new major versions of ORM and DBAL
1 parent ea8789b commit 4927253

File tree

4 files changed

+0
-12
lines changed

4 files changed

+0
-12
lines changed

DependencyInjection/DoctrineExtension.php

-3
Original file line numberDiff line numberDiff line change
@@ -849,13 +849,10 @@ protected function loadOrmEntityManagerMappingInformation(array $entityManager,
849849
$mappingService = $this->getObjectManagerElementName($entityManager['name'] . '_' . $driverType . '_metadata_driver');
850850
$mappingDriverDef = $container->getDefinition($mappingService);
851851
$args = $mappingDriverDef->getArguments();
852-
/** @psalm-suppress TypeDoesNotContainType Psalm doesn't know that $this->drivers is set by $this->loadMappingInformation() call */
853852
if ($driverType === 'annotation') {
854853
$args[2] = $entityManager['report_fields_where_declared'];
855-
/** @psalm-suppress TypeDoesNotContainType Psalm doesn't know that $this->drivers is set by $this->loadMappingInformation() call */
856854
} elseif ($driverType === 'attribute') {
857855
$args[1] = $entityManager['report_fields_where_declared'];
858-
/** @psalm-suppress TypeDoesNotContainType Psalm doesn't know that $this->drivers is set by $this->loadMappingInformation() call */
859856
} elseif ($driverType === 'xml') {
860857
$args[1] ??= SimplifiedXmlDriver::DEFAULT_FILE_EXTENSION;
861858
$args[2] = $entityManager['validate_xml_mapping'];

Repository/RepositoryFactoryCompatibility.php

-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ trait RepositoryFactoryCompatibility
2121
* @return EntityRepository<T>
2222
*
2323
* @template T of object
24-
*
25-
* @psalm-suppress MethodSignatureMismatch
2624
*/
2725
public function getRepository(EntityManagerInterface $entityManager, string $entityName): EntityRepository
2826
{

Repository/ServiceEntityRepositoryProxy.php

-6
Original file line numberDiff line numberDiff line change
@@ -41,21 +41,18 @@ public function __construct(
4141
$this->repository = $this->resolveRepository();
4242
}
4343

44-
/** @psalm-suppress MethodSignatureMismatch This proxy is used only in combination with newer parent class */
4544
public function createQueryBuilder(string $alias, ?string $indexBy = null): QueryBuilder
4645
{
4746
return ($this->repository ??= $this->resolveRepository())
4847
->createQueryBuilder($alias, $indexBy);
4948
}
5049

51-
/** @psalm-suppress MethodSignatureMismatch This proxy is used only in combination with newer parent class */
5250
public function createResultSetMappingBuilder(string $alias): ResultSetMappingBuilder
5351
{
5452
return ($this->repository ??= $this->resolveRepository())
5553
->createResultSetMappingBuilder($alias);
5654
}
5755

58-
/** @psalm-suppress MethodSignatureMismatch This proxy is used only in combination with newer parent class */
5956
public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lockVersion = null): object|null
6057
{
6158
/** @psalm-suppress InvalidReturnStatement This proxy is used only in combination with newer parent class */
@@ -67,7 +64,6 @@ public function find(mixed $id, LockMode|int|null $lockMode = null, int|null $lo
6764
* {@inheritDoc}
6865
*
6966
* @psalm-suppress InvalidReturnStatement This proxy is used only in combination with newer parent class
70-
* @psalm-suppress MethodSignatureMismatch This proxy is used only in combination with newer parent class
7167
* @psalm-suppress InvalidReturnType This proxy is used only in combination with newer parent class
7268
*/
7369
public function findBy(array $criteria, ?array $orderBy = null, ?int $limit = null, ?int $offset = null): array
@@ -92,8 +88,6 @@ public function count(array $criteria = []): int
9288

9389
/**
9490
* {@inheritDoc}
95-
*
96-
* @psalm-suppress MethodSignatureMismatch This proxy is used only in combination with newer parent class
9791
*/
9892
public function __call(string $method, array $arguments): mixed
9993
{

Tests/Mapping/ContainerEntityListenerResolverTest.php

-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,6 @@ public function testRegisterStringException(): void
128128
{
129129
$this->expectException(InvalidArgumentException::class);
130130
$this->expectExceptionMessage('An object was expected, but got "string".');
131-
/** @psalm-suppress InvalidArgument */
132131
$this->resolver->register('CompanyContractListener');
133132
}
134133
}

0 commit comments

Comments
 (0)