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

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: 2.5.1
    • Fix Version/s: 2.5.2, 3.0.0-beta1
    • Component/s: Symfony
    • Labels:

      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

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              andrzej.longosz@ez.no Andrzej Longosz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: