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

Drop Symfony DIC .class parameters from ezpublish-kernel

    XMLWordPrintable

    Details

      Description

      Currently most of the services have parametrized class names by means of Symfony DIC parameters with .class suffix. This convention has been removed from Symfony 3.0 in favor of explicit inline class names for each service definitions.

      We should do the same to force developers to properly decorate services when in need of an override.

      Not to mention that it clutters both parameter bag and service configuration files.

      Example

      Before:

      parameters: 
          ezpublish.search.legacy.connection.factory.class: eZ\Bundle\EzPublishLegacySearchEngineBundle\ApiLoader\ConnectionFactory
      
      services: 
          ezpublish.search.legacy.connection.factory: 
              class: "%ezpublish.search.legacy.connection.factory.class%"
              arguments: 
                  - "@ezpublish.api.repository_configuration_provider"
              calls: 
                  - [setContainer, ["@service_container"]]
      

      After:

      services: 
          ezpublish.search.legacy.connection.factory: 
              class: eZ\Bundle\EzPublishLegacySearchEngineBundle\ApiLoader\ConnectionFactory
              arguments: 
                  - "@ezpublish.api.repository_configuration_provider"
              calls: 
                  - [setContainer, ["@service_container"]]

        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: