Skip to content

Doctrine documentation about caches lacks detailed explanation #8251

Closed
@NicoHaase

Description

@NicoHaase

I am just experimenting with the capabilities of the doctrine cache. According to https://symfony.com/doc/current/reference/configuration/doctrine.html, there should be a caching driver option of "service". If I set the option in my yml, the container cannot be built.

doctrine:
    dbal:
      default_connection: default
      connections:
        default:
          driver:   pdo_mysql
          host:     mysql.local
          port:     ~
          dbname:   db
          user:     db
          password: db
          charset:  UTF8
    orm:
      default_entity_manager: default
      auto_generate_proxy_classes: %kernel.debug%
      entity_managers:
        default:
          connection: default
          metadata_cache_driver: service
[Tue Aug 01 16:33:46 2017] [error] [client 10.13.110.75] PHP Fatal error:  Uncaught exception 'Symfony\\Component\\DependencyInjection\\Exception\\ServiceNotFoundException' with message 'The service "doctrine.orm.default_entity_manager" has a dependency on a non-existent service "".' in /home/niha/projects/project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php:58
[Tue Aug 01 16:33:46 2017] [error] [client 10.13.110.75] Stack trace:
[Tue Aug 01 16:33:46 2017] [error] [client 10.13.110.75] #0 /home/niha/projects/project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(51): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences(Array)
[Tue Aug 01 16:33:46 2017] [error] [client 10.13.110.75] #1 /home/niha/projects/project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php(51): Symfony\\Component\\DependencyInjection\\Compiler\\CheckExceptionOnInvalidReferenceBehaviorPass->processReferences(Array)
[Tue Aug 01 16:33:46 2017] [error] [client 10.13.110.75] #2 /home/niha/projects/project/vendor/symfony/ in /home/niha/projects/project/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/Compiler/CheckExceptionOnInvalidReferenceBehaviorPass.php on line 58

In Symfony 2.8, using doctrine/cache v1.6.2, I can find many implementations of \Doctrine\Common\Cache\CacheProvider (including classes like CouchbaseCache, FilesystemCache, MongoDBCache, PhpFileCache,....) which are not document, but not a ServiceCache or something like that which is documented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DoctrinehasPRA Pull Request has already been submitted for this issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions