Skip to content

Commit dd2341d

Browse files
committed
Inline RepositoryFactoryCompatibility
Only one of the 2 versions of that trait is useful now.
1 parent 9de68d3 commit dd2341d

File tree

3 files changed

+14
-44
lines changed

3 files changed

+14
-44
lines changed

phpcs.xml.dist

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
<rule ref="PSR1.Classes.ClassDeclaration.MultipleClasses">
2929
<exclude-pattern>tests/*</exclude-pattern>
30-
<exclude-pattern>src/Repository/RepositoryFactoryCompatibility.php</exclude-pattern>
3130
</rule>
3231
<rule ref="Squiz.Classes.ClassFileName.NoMatch">
3332
<exclude-pattern>tests/*</exclude-pattern>

src/Repository/ContainerRepositoryFactory.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@
2323
*/
2424
final class ContainerRepositoryFactory implements RepositoryFactory
2525
{
26-
use RepositoryFactoryCompatibility;
27-
2826
/** @var array<string, ObjectRepository> */
2927
private array $managedRepositories = [];
3028

@@ -34,6 +32,20 @@ public function __construct(
3432
) {
3533
}
3634

35+
/**
36+
* Gets the repository for an entity class.
37+
*
38+
* @param class-string<T> $entityName
39+
*
40+
* @return EntityRepository<T>
41+
*
42+
* @template T of object
43+
*/
44+
public function getRepository(EntityManagerInterface $entityManager, string $entityName): EntityRepository
45+
{
46+
return $this->doGetRepository($entityManager, $entityName, true);
47+
}
48+
3749
/**
3850
* @param class-string<T> $entityName
3951
*

src/Repository/RepositoryFactoryCompatibility.php

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)