Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doctrine:cache:clear-* and doctrine:mongodb:cache:clear-* have inconsistent behaviors #7486

Closed
edhelas opened this issue Nov 26, 2018 · 0 comments · Fixed by #8376
Closed
Labels

Comments

@edhelas
Copy link

edhelas commented 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-metadata
  • doctrine:cache:clear-query
  • doctrine:cache:clear-result

I'm expecting the same behavior as

  • doctrine:mongodb:cache:clear-metadata

Current behavior

Those commands are actually failing if no cache was cleared

if ( ! $result) {
  $ui->error($message);

  return 1;
}

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

"cache:doctrine": [
    "bin/console doctrine:mongodb:cache:clear-metadata --ansi",
    "bin/console doctrine:cache:clear-metadata --ansi",
    // Fail there 
    "bin/console doctrine:cache:clear-query --ansi",
    "bin/console doctrine:cache:clear-result --ansi"
],
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants