File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Expand file tree Collapse file tree 2 files changed +7
-1
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" : " ^1.11 || ^ 2.0" ,
31+ "doctrine/cache" : " ^2.0" ,
3232 "doctrine/collections" : " ^1.5 || ^2.0" ,
3333 "doctrine/event-manager" : " ^1.0 || ^2.0" ,
3434 "doctrine/instantiator" : " ^1.1 || ^2" ,
Original file line number Diff line number Diff line change @@ -276,8 +276,13 @@ public function getMetadataDriverImpl(): ?MappingDriver
276276 return $ this ->attributes ['metadataDriverImpl ' ] ?? null ;
277277 }
278278
279+ /** @deprecated Since 2.2, use {@see getMetadataCache()} instead. */
279280 public function getMetadataCacheImpl (): ?Cache
280281 {
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 . ' );
284+ }
285+
281286 trigger_deprecation (
282287 'doctrine/mongodb-odm ' ,
283288 '2.2 ' ,
@@ -289,6 +294,7 @@ public function getMetadataCacheImpl(): ?Cache
289294 return $ this ->attributes ['metadataCacheImpl ' ] ?? null ;
290295 }
291296
297+ /** @deprecated Since 2.2, use {@see setMetadataCache()} instead. */
292298 public function setMetadataCacheImpl (Cache $ cacheImpl ): void
293299 {
294300 trigger_deprecation (
You can’t perform that action at this time.
0 commit comments