Skip to content


DDC-3190: [GH-1071] Setup::createConfiguration breaks Cache interface contract #3973

doctrinebot opened this Issue · 2 comments

2 participants


Jira issue originally created by user @doctrinebot:

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

Url: #1071


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.


Comment created by @ocramius:

Merged: 22d71de


Issue was closed with resolution "Fixed"

@Ocramius Ocramius was assigned by doctrinebot
@doctrinebot doctrinebot added this to the 2.5 milestone
@doctrinebot doctrinebot closed this
@doctrinebot doctrinebot added the Bug label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.