lexik / LexikTranslationBundle

This Symfony bundle allow to import translation files content into the database and provide a GUI to edit translations.
MIT License
428 stars 262 forks source link

ORM Storage: MongoDB dependency error on cache:clear #232

Open henningborchers opened 7 years ago

henningborchers commented 7 years ago

My cache clear throws the following exception in file: vendor/lexik/translation-bundle/Document/FileRepository.php on line 12

[Symfony\Component\Debug\Exception\ClassNotFoundException]
Attempted to load class "DocumentRepository" from namespace "Doctrine\ODM\MongoDB".
Did you forget a "use" statement for "Doctrine\ODM\PHPCR\DocumentRepository"?

Here is my Config

lexik_translation: fallback_locale: [de] managed_locales: [en, fr, de] storage: type: orm object_manager: default resources_registration: type: database managed_locales_only: true

phiamo commented 6 years ago

having the same:


 // Warming up the cache for the prod environment with debug false                                                      

PHP Fatal error:  Class 'Doctrine\ODM\MongoDB\DocumentRepository' not found in APPDIR/vendor/lexik/translation-bundle/Lexik/Bundle/TranslationBundle/Document/TransUnitRepository.php on line 15
PHP Stack trace:
PHP   1. {main}() APPDIR/app/console:0
PHP   2. Symfony\Bundle\FrameworkBundle\Console\Application->run() APPDIR/app/console:27
PHP   3. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() APPDIR/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:117
PHP   4. Symfony\Bundle\FrameworkBundle\Console\Application->doRun() APPDIR/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:83
PHP   5. Symfony\Bundle\FrameworkBundle\Console\Application->doRunCommand() APPDIR/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:193
PHP   6. Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand->run() APPDIR/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:860
PHP   7. Symfony\Bundle\FrameworkBundle\Command\CacheWarmupCommand->execute() APPDIR/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:242
PHP   8. Symfony\Component\HttpKernel\CacheWarmer\CacheWarmerAggregate->warmUp() APPDIR/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php:68
PHP   9. Doctrine\Bundle\PHPCRBundle\CacheWarmer\UniqueNodeTypeCacheWarmer->warmUp() APPDIR/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/CacheWarmer/CacheWarmerAggregate.php:48
PHP  10. Doctrine\ODM\PHPCR\Tools\Helper\UniqueNodeTypeHelper->checkNodeTypeMappings() APPDIR/vendor/doctrine/phpcr-bundle/CacheWarmer/UniqueNodeTypeCacheWarmer.php:68
PHP  11. Doctrine\ODM\PHPCR\Mapping\ClassMetadataFactory->getAllMetadata() APPDIR/vendor/doctrine/phpcr-odm/lib/Doctrine/ODM/PHPCR/Tools/Helper/UniqueNodeTypeHelper.php:45
PHP  12. Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain->getAllClassNames() APPDIR/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/AbstractClassMetadataFactory.php:114
PHP  13. Doctrine\ODM\PHPCR\Mapping\Driver\AnnotationDriver->getAllClassNames() APPDIR/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/MappingDriverChain.php:128
PHP  14. require_once() APPDIR/vendor/doctrine/common/lib/Doctrine/Common/Persistence/Mapping/Driver/AnnotationDriver.php:236

  [Symfony\Component\Debug\Exception\ClassNotFoundException]                           
  Attempted to load class "DocumentRepository" from namespace "Doctrine\ODM\MongoDB".  
  Did you forget a "use" statement for "Doctrine\ODM\PHPCR\DocumentRepository"?