mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
doctrine:cache:clear-* and doctrine:mongodb:cache:clear-* have inconsistent behaviors #6110
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @edhelas on GitHub (Nov 26, 2018).
Bug Report
doctrine/mongodb-odm 1.2.5
doctrine/orm v2.6.2
Summary
When calling the following doctrine commands
doctrine:cache:clear-metadatadoctrine:cache:clear-querydoctrine:cache:clear-resultI'm expecting the same behavior as
doctrine:mongodb:cache:clear-metadataCurrent behavior
Those commands are actually failing if no cache was cleared
How to reproduce
Call those commands with an empty cache
Expected behavior
The behavior from MongoDB seems more natural. Those commands shoudn't return an error if no cache was cleared but simply display an information message.
When wrapping those commands in composer there is no proper way to make them fail silently