An error occurred when executing the ‘cache:clear –no-warmup’ command: Property x does not exist

  caching, deployment, doctrine, php, symfony

We use manual deployment that runs through a bash script. Everything was going fine until I deleted a one-to-many relationship from an entity. We no longer are using the table payment_orders. Naturally, I removed the field $paymentOrders from the user entity as well as the entity payment_orders in the code, as we don’t need it anymore.

Deployment to acceptance environment worked just fine, but when I deploy to production, I get the following error:

RuntimeException: An error occurred when executing the
cache:clear–no-warmup command in RunTimeReflectionService.php.

enter image description here

I already looked for other suggestions on stackoverflow and tried:

  • clearing the doctrine cache by running bin/console doctrine:cache:clear-query bin/console doctrine:cache:clear-metadata bin/console doctrine:cache:clear-result. Also with all environments like: --env=prod
  • removing /var/cache folder manually and all it’s contents with commands like rm -rf prod or rm -rf dev.
  • clearing the cache by running php bin/console cache:clear . Also with all environments like : --env=prod
  • Warming up the cache with php bin/console cache:warmup --env=prod
  • Other suggestions on stackoverflow like running composer with option --no-scripts

None of these work.

Source: Symfony Questions

One Reply to “An error occurred when executing the ‘cache:clear –no-warmup’ command: Property x does not exist”