Error when clearing metadata cache #6728

Closed
opened 2026-01-22 15:37:36 +01:00 by admin · 3 comments
Owner

Originally created by @garak on GitHub (May 24, 2021).

When running command console doctrine:cache:clear-metadata with latest Doctrine (doctrine/orm:2.9.0) you get the following error (In MetadataCommand.php line 68):

No Metadata cache driver is configured on given EntityManager.

Command was working fine with previous version (doctrine/orm:2.8.X)

Originally created by @garak on GitHub (May 24, 2021). When running command `console doctrine:cache:clear-metadata` with latest Doctrine (doctrine/orm:2.9.0) you get the following error (In MetadataCommand.php line 68): >No Metadata cache driver is configured on given EntityManager. Command was working fine with previous version (doctrine/orm:2.8.X)
admin closed this issue 2026-01-22 15:37:36 +01:00
Author
Owner

@stephanvierkant commented on GitHub (May 24, 2021):

I think it's related to this change:

  • The metadata_cache_driver configuration key has been deprecated. PHP Array cache is now automatically registered when %kernel.debug% is false.
@stephanvierkant commented on GitHub (May 24, 2021): I think it's related to [this change](https://github.com/doctrine/DoctrineBundle/blob/2.3.x/UPGRADE-2.3.md): > * The `metadata_cache_driver` configuration key has been deprecated. PHP Array cache is now automatically registered when `%kernel.debug%` is false.
Author
Owner

@dmaicher commented on GitHub (May 24, 2021):

Also see https://github.com/doctrine/orm/issues/8716

I think this is actually an issue on ORM itself. If a deprecated doctrine cache is used and no PSR6 cache then this will fail as it returns null:

ce8da6623f (diff-a955683cd3632858f84b23e2601b44f7ac29f0302687f09a1982fbe830dcf495R65)

ping @alcaeus

@dmaicher commented on GitHub (May 24, 2021): Also see https://github.com/doctrine/orm/issues/8716 I think this is actually an issue on ORM itself. If a deprecated doctrine cache is used and no PSR6 cache then this will fail as it returns null: https://github.com/doctrine/orm/commit/ce8da6623f4a2e8d8aadcd6a3415cb593ce1f407#diff-a955683cd3632858f84b23e2601b44f7ac29f0302687f09a1982fbe830dcf495R65 ping @alcaeus
Author
Owner

@ostrolucky commented on GitHub (May 25, 2021):

I guess you could use 2.4 version of the bundle. But indeed this bc break is not the fault of bundle but orm. I'll move the issue to orm repository .

@ostrolucky commented on GitHub (May 25, 2021): I guess you could use 2.4 version of the bundle. But indeed this bc break is not the fault of bundle but orm. I'll move the issue to orm repository .
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#6728