Details

    • Icon: Sub-task Sub-task
    • Resolution: Fixed
    • Icon: Medium Medium
    • 5.0.x-dev
    • 5.0.x-dev
    • OSS
    • None
    • v5 LTS - Sprint 11
    • Ibexa Open Source

    Description

      We have the following definition of RepositoryFactory in the Repository layer of ibexa/core
       

      Ibexa\Bundle\Core\ApiLoader\RepositoryFactory: 
          class: Ibexa\Core\Base\Container\ApiLoader\RepositoryFactory
          # ...
      Ibexa\Core\Repository\Repository: 
          factory: ['@Ibexa\Bundle\Core\ApiLoader\RepositoryFactory', buildRepository] 

      The bundle class is formally not available in that layer, so it was defined as an alias which is then overridden on a full stack bundle level. While this works, it causes headache for PHPStorm's static analysis, Symfony Rectors, and in the past it caused a difficult to track permission resolver-related bug, because 2 definitions of RepositoryFactory exist in the DI container and in one of them landed an uninitialized instance of permission resolver.

      The latter case was solved by laziness, however the proper fix is to actually move Bundle logic to Repository layer by providing proper abstraction (see IBX-8399) and use only one RepositoryFactory - from the Repository layer.

      Designs

        Attachments

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: