Skip to content

Commit b43fe3e

Browse files
committed
Drop support of doctrine/persistence with the Common namespace
1 parent 3b66e27 commit b43fe3e

15 files changed

+16
-141
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@
1313
"doctrine/collections": "<1.0",
1414
"doctrine/common": "<2.7",
1515
"doctrine/mongodb-odm": "<1.2",
16-
"doctrine/orm": "<2.5"
16+
"doctrine/orm": "<2.5",
17+
"doctrine/persistence": "<1.3"
1718
},
1819
"require-dev": {
1920
"consistence/coding-standard": "^3.0.1",

extension.neon

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,7 @@ parameters:
1717
- stubs/EntityManagerDecorator.stub
1818
- stubs/EntityManagerInterface.stub
1919
- stubs/EntityRepository.stub
20-
- stubs/ManagerRegistry.stub
2120
- stubs/MongoClassMetadataInfo.stub
22-
- stubs/ObjectManager.stub
23-
- stubs/ObjectManagerDecorator.stub
24-
- stubs/ObjectRepository.stub
2521
- stubs/Persistence/ManagerRegistry.stub
2622
- stubs/Persistence/ObjectManager.stub
2723
- stubs/Persistence/ObjectManagerDecorator.stub
@@ -118,14 +114,14 @@ services:
118114
tags:
119115
- phpstan.broker.dynamicMethodReturnTypeExtension
120116
arguments:
121-
managerClass: Doctrine\Common\Persistence\ManagerRegistry
117+
managerClass: Doctrine\Persistence\ManagerRegistry
122118

123119
objectManagerGetRepository:
124120
class: PHPStan\Type\Doctrine\GetRepositoryDynamicReturnTypeExtension
125121
tags:
126122
- phpstan.broker.dynamicMethodReturnTypeExtension
127123
arguments:
128-
managerClass: Doctrine\Common\Persistence\ObjectManager
124+
managerClass: Doctrine\Persistence\ObjectManager
129125

130126
persistenceManagerRegistryGetRepository:
131127
class: PHPStan\Type\Doctrine\GetRepositoryDynamicReturnTypeExtension

src/Reflection/Doctrine/EntityRepositoryClassReflectionExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\Reflection\Doctrine;
44

5-
use Doctrine\Common\Persistence\ObjectRepository;
5+
use Doctrine\Persistence\ObjectRepository;
66
use PHPStan\Type\ArrayType;
77
use PHPStan\Type\Doctrine\ObjectMetadataResolver;
88
use PHPStan\Type\IntegerType;

src/Rules/Doctrine/ORM/RepositoryMethodCallRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\Rules\Doctrine\ORM;
44

5-
use Doctrine\Common\Persistence\ObjectRepository;
5+
use Doctrine\Persistence\ObjectRepository;
66
use PhpParser\Node;
77
use PHPStan\Analyser\Scope;
88
use PHPStan\Rules\Rule;

src/Type/Doctrine/ObjectMetadataResolver.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace PHPStan\Type\Doctrine;
44

5-
use Doctrine\Common\Persistence\ObjectManager;
5+
use Doctrine\Persistence\ObjectManager;
66
use PHPStan\Reflection\ReflectionProvider;
77
use function file_exists;
88
use function is_readable;

stubs/DocumentManager.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Doctrine\ODM\MongoDB;
44

5-
use Doctrine\Common\Persistence\ObjectManager;
65
use Doctrine\ODM\MongoDB\Repository\DocumentRepository;
6+
use Doctrine\Persistence\ObjectManager;
77

88
class DocumentManager implements ObjectManager
99
{

stubs/DocumentRepository.stub

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
namespace Doctrine\ODM\MongoDB\Repository;
44

5-
use Doctrine\Common\Persistence\ObjectRepository;
6-
use Doctrine\Persistence\ObjectRepository as PersistenceObjectRepository;
5+
use Doctrine\Persistence\ObjectRepository;
76

87
/**
98
* @template TDocumentClass
109
* @implements ObjectRepository<TDocumentClass>
11-
* @implements PersistenceObjectRepository<TDocumentClass>
1210
*/
13-
class DocumentRepository implements ObjectRepository, PersistenceObjectRepository
11+
class DocumentRepository implements ObjectRepository
1412
{
1513

1614
/**

stubs/EntityManagerInterface.stub

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
namespace Doctrine\ORM;
44

5-
use Doctrine\Common\Persistence\ObjectManager;
6-
use Doctrine\Common\Persistence\ObjectRepository;
5+
use Doctrine\Persistence\ObjectManager;
6+
use Doctrine\Persistence\ObjectRepository;
77

88
interface EntityManagerInterface extends ObjectManager
99
{

stubs/EntityRepository.stub

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@
22

33
namespace Doctrine\ORM;
44

5-
use Doctrine\Common\Persistence\ObjectRepository;
6-
use Doctrine\Persistence\ObjectRepository as PersistenceObjectRepository;
5+
use Doctrine\Persistence\ObjectRepository;
76

87
/**
98
* @template TEntityClass
109
* @implements ObjectRepository<TEntityClass>
11-
* @implements PersistenceObjectRepository<TEntityClass>
1210
*/
13-
class EntityRepository implements ObjectRepository, PersistenceObjectRepository
11+
class EntityRepository implements ObjectRepository
1412
{
1513

1614
/**

stubs/ManagerRegistry.stub

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

0 commit comments

Comments
 (0)