Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-3190

[GH-1071] Setup::createConfiguration breaks Cache interface contract

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.5
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      This issue is created automatically through a Github pull request on behalf of VasekPurchart:

      Url: https://github.com/doctrine/doctrine2/pull/1071

      Message:

      Method `setNamespace` is called in `Setup::createConfiguration`, but at the moment there can be an instance of `Doctrine\Common\Cache\Cache` (when given in the 3rd parameter), which does not define this method. This method is defined in `Doctrine\Common\Cache\CacheProvider` from which are the defaults being instantiated in this method extended.

      So there should be an condition or the 3rd parameter should declare a dependency on `CacheProvider` rather than just `Cache` interface. Or maybe the namespace should be set only if the Cache instance is not given by the 3rd parameter (as proposed in this PR now), assuming that when someone is giving a ready instance of Cache, it is configured properly.

      If you want to take another approach, I can change this PR.

        Activity

        Show
        Marco Pivetta added a comment - Merged: https://github.com/doctrine/doctrine2/commit/22d71de2c3f9632deb63a77646b11e21d9105cbd

          People

          • Assignee:
            Marco Pivetta
            Reporter:
            Doctrine Bot
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: