Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-30699

bazinga:js-translation:dump command triggers ConfigResolver too early

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • 2.5.2, 3.0.0-beta1
    • 2.5.1
    • Symfony

    Description

      During composer install and composer update we execute via composer symfony-scripts the bazinga:js-translation:dump command which requires @twig along with all our Twig Extensions.

      Our services injected into Twig extensions try to resolve SA-aware parameters too early, before current scope is set, which results in a warning:

      $ php ./bin/console bazinga:js-translation:dump --help
      11:50:10 WARNING   [app] ConfigResolver was used by "@twig" before SiteAccess was initialized, loading parameter(s) "$io.binarydata_handler$", "$fieldtypes.ezimageasset.mappings$", "$repository$", "$languages$", "$anonymous_user_id$", "$user_content_type_identifier$", "$user_group_content_type_identifier$", "$pagination.content_draft_limit$", "$subitems_module.limit$". As this can cause very hard to debug issues, try to use ConfigResolver lazily, make the affected commands lazy, make the service lazy or see if you can inject another lazy service.
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            andrew.longosz@ibexa.co Andrew Longosz
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: