[PR #979] [CLOSED] Bypass metadata cache in console commands #8993

Closed
opened 2026-01-22 16:02:40 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/979
Author: @c960657
Created: 3/15/2014
Status: Closed

Base: masterHead: disable-metadata-cache


📝 Commits (1)

  • 7a2a2d8 Bypass metadata cache in console commands

📊 Changes

7 files changed (+7 additions, -0 deletions)

View changed files

📝 lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php (+1 -0)
📝 lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php (+1 -0)
📝 lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php (+1 -0)
📝 lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php (+1 -0)
📝 lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php (+1 -0)
📝 lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php (+1 -0)
📝 lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php (+1 -0)

📄 Description

The console commands use the metadata cache. If the metadata has been updated, you manually need to run console orm:clear-cache:metadata.

For most commands, e.g. console orm:schema-tool:update, this is rather annoying. I don't see any good reason why you would generate queries to make your database match the stale metadata in the cache rather than the fresh metadata stored in files.

This patch disables the metadata cache for most commands.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/979 **Author:** [@c960657](https://github.com/c960657) **Created:** 3/15/2014 **Status:** ❌ Closed **Base:** `master` ← **Head:** `disable-metadata-cache` --- ### 📝 Commits (1) - [`7a2a2d8`](https://github.com/doctrine/orm/commit/7a2a2d8537382988ce086718cd383f01894996cf) Bypass metadata cache in console commands ### 📊 Changes **7 files changed** (+7 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Tools/Console/Command/ConvertMappingCommand.php` (+1 -0) 📝 `lib/Doctrine/ORM/Tools/Console/Command/GenerateEntitiesCommand.php` (+1 -0) 📝 `lib/Doctrine/ORM/Tools/Console/Command/GenerateProxiesCommand.php` (+1 -0) 📝 `lib/Doctrine/ORM/Tools/Console/Command/GenerateRepositoriesCommand.php` (+1 -0) 📝 `lib/Doctrine/ORM/Tools/Console/Command/InfoCommand.php` (+1 -0) 📝 `lib/Doctrine/ORM/Tools/Console/Command/SchemaTool/AbstractCommand.php` (+1 -0) 📝 `lib/Doctrine/ORM/Tools/Console/Command/ValidateSchemaCommand.php` (+1 -0) </details> ### 📄 Description The console commands use the metadata cache. If the metadata has been updated, you manually need to run `console orm:clear-cache:metadata`. For most commands, e.g. `console orm:schema-tool:update`, this is rather annoying. I don't see any good reason why you would generate queries to make your database match the stale metadata in the cache rather than the fresh metadata stored in files. This patch disables the metadata cache for most commands. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 16:02:40 +01:00
admin closed this issue 2026-01-22 16:02:41 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8993