sonata-project / SonataTranslationBundle

SonataTranslationBundle
https://docs.sonata-project.org/projects/SonataTranslationBundle
MIT License
77 stars 67 forks source link

Service definition of TranslationChecker only avalable for ORM #167

Closed ElectricMaxxx closed 4 years ago

ElectricMaxxx commented 7 years ago

Environment

Sonata packages

sonata-project/admin-bundle                3.16.0             The missing Symfony Ad...
sonata-project/block-bundle                3.3.2              Symfony SonataBlockBundle
sonata-project/cache                       1.0.7              Cache library
sonata-project/cache-bundle                2.3.1              This bundle provides c...
sonata-project/core-bundle                 3.3.0              Symfony SonataCoreBundle
sonata-project/datagrid-bundle             2.2.1              Symfony SonataDatagrid...
sonata-project/doctrine-phpcr-admin-bundle dev-master 119405e Symfony Sonata / Integ...
sonata-project/exporter                    1.7.1              Lightweight Exporter l...
sonata-project/seo-bundle                  2.1.0              Symfony SonataSeoBundle
sonata-project/translation-bundle          2.1.1              SonataTranslationBundle

Symfony packages

symfony/assetic-bundle     v2.8.1 Integrates Assetic into Symfony2
symfony/monolog-bundle     v3.1.0 Symfony MonologBundle
symfony/phpunit-bridge     v3.2.7 Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.3.0 Symfony polyfill backporting apcu_* functions to l...
symfony/polyfill-intl-icu  v1.3.0 Symfony polyfill for intl's ICU-related data and c...
symfony/polyfill-mbstring  v1.3.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php56     v1.3.0 Symfony polyfill backporting some PHP 5.6+ feature...
symfony/polyfill-php70     v1.3.0 Symfony polyfill backporting some PHP 7.0+ feature...
symfony/polyfill-util      v1.3.0 Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.0 Symfony Security Component - ACL (Access Control L...
symfony/swiftmailer-bundle v2.5.4 Symfony SwiftmailerBundle
symfony/symfony            v3.2.7 The Symfony PHP framework

PHP version

ALL

Subject

It seems as the service definiton for the translation checker is available for orm persistence only. Only there the sonata_translation.checker.translatable has a service defintion. When using an other persistence layer the service is requesetd as an argument, but never defined.

Steps to reproduce

use the following config:

sonata_translation:
    locales: '%locales%'
    default_locale: '%locale%'
    phpcr: true

in an application.

Expected results

No Exception, Service definition exists

Actual results

ServiceNotFoundException in ContainerBuilder.php line 803:
You have requested a non-existent service "sonata_translation.checker.translatable".
in ContainerBuilder.php line 803
at ContainerBuilder->getDefinition('sonata_translation.checker.translatable') in SonataTranslationExtension.php line 97
at SonataTranslationExtension->configureChecker(object(ContainerBuilder), array('phpcr' => array('implements' => array('Sonata\\TranslationBundle\\Model\\Phpcr\\TranslatableInterface', 'Symfony\\Cmf\\Bundle\\CoreBundle\\Translatable\\TranslatableInterface'), 'instanceof' => array()))) in SonataTranslationExtension.php line 88
at SonataTranslationExtension->load(array(array('locales' => array('en', 'fr', 'de'), 'default_locale' => 'en', 'phpcr' => array('enabled' => true))), object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 59
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in MergeExtensionConfigurationPass.php line 39
at MergeExtensionConfigurationPass->process(object(ContainerBuilder)) in Compiler.php line 120
at Compiler->compile(object(ContainerBuilder)) in ContainerBuilder.php line 573
at ContainerBuilder->compile() in Kernel.php line 487
at Kernel->initializeContainer() in Kernel.php line 116
at Kernel->boot() in Kernel.php line 165
at Kernel->handle(object(Request)) in app_dev.php line 39
at require('/home/maximilian/OpenSource/Cmf/cmf-sandbox/web/app_dev.php') in router_dev.php line 40
stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.