Doctrine\Persistence\Mapping\AbstractClassMetadataFactory::setCacheDriver is deprecated. Use setCache() with a PSR-6 cache instead. #6724

Closed
opened 2026-01-22 15:37:33 +01:00 by admin · 1 comment
Owner

Originally created by @fkolcu on GitHub (May 17, 2021).

3a194ad699/lib/Doctrine/ORM/EntityManager.php (L169)

After updating version of "doctrine/orm" it's started to give error as in the title.
After checking which method/class is using the deprecated method, I found that it is being used in constructor of EntityManager.

Details of error is like the following:

Doctrine\Persistence\Mapping\AbstractClassMetadataFactory::setCacheDriver is deprecated. Use setCache() with a PSR-6 cache instead. on line 80 in file ../vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php.

Originally created by @fkolcu on GitHub (May 17, 2021). https://github.com/doctrine/orm/blob/3a194ad69946ec3e4289e50a877f96b8aad8b223/lib/Doctrine/ORM/EntityManager.php#L169 After updating version of "doctrine/orm" it's started to give error as in the title. After checking which method/class is using the deprecated method, I found that it is being used in constructor of EntityManager. Details of error is like the following: Doctrine\Persistence\Mapping\AbstractClassMetadataFactory::setCacheDriver is deprecated. Use setCache() with a PSR-6 cache instead. on line 80 in file ../vendor/doctrine/persistence/lib/Doctrine/Persistence/Mapping/AbstractClassMetadataFactory.php.
admin closed this issue 2026-01-22 15:37:34 +01:00
Author
Owner

@beberlei commented on GitHub (May 17, 2021):

We will deal with deprecations in time, this one is being worked on already for next release.

@beberlei commented on GitHub (May 17, 2021): We will deal with deprecations in time, this one is being worked on already for next release.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6724