Skip to content

Commit 79125d8

Browse files
committed
Require doctrine/persistence 2
This allows us to remove autoload calls that are necessary for the persistence 1 backwards-compatibility layer to work. The require-dev constraints on doctrine/orm are bumped to ^2.7.3 because lower versions are not compatible with doctrine/persistence 2.
1 parent de2c71f commit 79125d8

File tree

4 files changed

+2
-9
lines changed

4 files changed

+2
-9
lines changed

Form/Type/DoctrineType.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,5 +269,3 @@ private function getCachedEntityLoader(ObjectManager $manager, $queryBuilder, st
269269
return $this->entityLoaders[$hash] ?? ($this->entityLoaders[$hash] = $this->getLoader($manager, $queryBuilder, $class));
270270
}
271271
}
272-
273-
interface_exists(ObjectManager::class);

Form/Type/EntityType.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,5 +96,3 @@ private function parameterToArray(Parameter $parameter): array
9696
return [$parameter->getName(), $parameter->getType(), $parameter->getValue()];
9797
}
9898
}
99-
100-
interface_exists(ObjectManager::class);

Security/User/EntityUserProvider.php

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,3 @@ private function getClassMetadata(): ClassMetadata
153153
return $this->getObjectManager()->getClassMetadata($this->classOrAlias);
154154
}
155155
}
156-
157-
interface_exists(ObjectManager::class);
158-
interface_exists(ObjectRepository::class);

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=7.2.5",
2020
"doctrine/event-manager": "~1.0",
21-
"doctrine/persistence": "^1.3|^2",
21+
"doctrine/persistence": "^2",
2222
"symfony/polyfill-ctype": "~1.8",
2323
"symfony/polyfill-mbstring": "~1.0",
2424
"symfony/polyfill-php80": "^1.15",
@@ -48,7 +48,7 @@
4848
"doctrine/collections": "~1.0",
4949
"doctrine/data-fixtures": "^1.1",
5050
"doctrine/dbal": "^2.10|^3.0",
51-
"doctrine/orm": "^2.6.3"
51+
"doctrine/orm": "^2.7.3"
5252
},
5353
"conflict": {
5454
"doctrine/dbal": "<2.10",

0 commit comments

Comments
 (0)