Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: Git Master
    • Fix Version/s: None
    • Component/s: Mapping Drivers
    • Security Level: All
    • Labels:
      None
    • Environment:
      Windows 7 64bits
      PHP 5.5.4 32 bits
      pdo_sql_srv 3.0.2 for php 5.5 32 bits
      symfony 2.5
      gedmo deletable @ dev-master
      Redis 2.8.12
      PHPRedis php_redis-2.2.5-5.5-nts-vc11-x86
      IIS 7.5

      Description

      1. Redis is used for cache/meta/result caching.
      2. Entity has property $deleted with gedmo deletable on it.
      3. Removing property $deleted (and all related annotations)
      4. Symfony commands:

      php app/console doctrine:cache:clear-metadata
      php app/console doctrine:cache:clear-query
      php app/console doctrine:cache:clear-result
      php app/console cache:clear --env=prod --no-debug <-- error on this command

      5. [ReflectionException]
      Property Entity::$deleted does not exist

      Trace:

      #0 \vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataInfo.php(989)
      #1 \vendor\doctrine\orm\lib\Doctrine\ORM\Mapping\ClassMetadataFactory.php(571)
      #2 \vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php(210) <-- CacheRedis driver called here
      #3 \vendor\doctrine\common\lib\Doctrine\Common\Persistence\Mapping\AbstractClassMetadataFactory.php(114)
      #4 \vendor\symfony\symfony\src\Symfony\Bridge\Doctrine\CacheWarmer\ProxyCacheWarmer.php(69)
      #5 \vendor\symfony\symfony\src\Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate.php(48)
      #6 \app\bootstrap.php.cache(2513)
      #7 \app\bootstrap.php.cache(2284)
      #8 \vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand.php(128)
      #9 \vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Command\CacheClearCommand.php(90)
      #10 \vendor\symfony\symfony\src\Symfony\Component\Console\Command\Command.php(252)
      #11 \vendor\symfony\symfony\src\Symfony\Component\Console\Application.php(894)
      #12 \vendor\symfony\symfony\src\Symfony\Component\Console\Application.php(193)
      #13 \vendor\symfony\symfony\src\Symfony\Bundle\FrameworkBundle\Console\Application.php(96)
      #14 \vendor\symfony\symfony\src\Symfony\Component\Console\Application.php(124)
      #15 \app\console(27)

      Why do i think this is a Doctrine bug and not a Symfony bug? Because

      php app/console doctrine:cache:clear-metadata
      php app/console doctrine:cache:clear-query
      php app/console doctrine:cache:clear-result

      have been called successfully so RedisCache should not return cache with $this->fieldMappings containing key "deleted"

        Activity

        Hide
        Erik Verheij added a comment -

        As a workaround I figured out that when you add the --flush flag it works as expected. You can read some documentation about what's going in this file; https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php#L44.

        orm:clear-cache:metadata --flush

        Show
        Erik Verheij added a comment - As a workaround I figured out that when you add the --flush flag it works as expected. You can read some documentation about what's going in this file; https://github.com/doctrine/doctrine2/blob/master/lib/Doctrine/ORM/Tools/Console/Command/ClearCache/MetadataCommand.php#L44 . orm:clear-cache:metadata --flush

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Flip
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated: