File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 2828 "require" : {
2929 "php" : " ^8.1" ,
3030 "ext-mongodb" : " ^1.21 || ^2.0" ,
31- "doctrine/cache" : " ^2.0" ,
3231 "doctrine/collections" : " ^1.5 || ^2.0" ,
3332 "doctrine/event-manager" : " ^1.0 || ^2.0" ,
3433 "doctrine/instantiator" : " ^1.1 || ^2" ,
4544 "require-dev" : {
4645 "ext-bcmath" : " *" ,
4746 "doctrine/annotations" : " ^1.12 || ^2.0" ,
47+ "doctrine/cache" : " ^2.0" ,
4848 "doctrine/coding-standard" : " ^14.0" ,
4949 "doctrine/orm" : " ^3.2" ,
5050 "jmikola/geojson" : " ^1.0" ,
5858 "symfony/uid" : " ^5.4 || ^6.0 || ^7.0 || ^8.0"
5959 },
6060 "conflict" : {
61- "doctrine/annotations" : " <1.12 || >=3.0"
61+ "doctrine/annotations" : " <1.12 || >=3.0" ,
62+ "doctrine/cache" : " <1.11"
6263 },
6364 "suggest" : {
6465 "doctrine/annotations" : " For annotation mapping support" ,
Original file line number Diff line number Diff line change @@ -279,8 +279,8 @@ public function getMetadataDriverImpl(): ?MappingDriver
279279 /** @deprecated Since 2.2, use {@see getMetadataCache()} instead. */
280280 public function getMetadataCacheImpl (): ?Cache
281281 {
282- if (! interface_exists (Cache ::class)) {
283- throw new LogicException ('The "doctrine/cache" package is deprecated and no longer installed with "doctrine/mongodb-odm". Require . ' );
282+ if (! class_exists (DoctrineProvider ::class)) {
283+ throw new LogicException ('The "doctrine/cache" package is deprecated and no longer required by "doctrine/mongodb-odm". Use "getMetadataCache" ' );
284284 }
285285
286286 trigger_deprecation (
@@ -316,7 +316,12 @@ public function getMetadataCache(): ?CacheItemPoolInterface
316316
317317 public function setMetadataCache (CacheItemPoolInterface $ cache ): void
318318 {
319- $ this ->metadataCache = $ cache ;
319+ $ this ->metadataCache = $ cache ;
320+
321+ if (! class_exists (DoctrineProvider::class)) {
322+ return ;
323+ }
324+
320325 $ this ->attributes ['metadataCacheImpl ' ] = DoctrineProvider::wrap ($ cache );
321326 }
322327
You can’t perform that action at this time.
0 commit comments