Skip to content
This repository has been archived by the owner on Jan 8, 2020. It is now read-only.

Cache: fix mongo options #7203

Merged
merged 1 commit into from
Feb 25, 2015
Merged

Cache: fix mongo options #7203

merged 1 commit into from
Feb 25, 2015

Conversation

marc-mabe
Copy link
Member

This PR addresses the configuration of the mongo db storage adapter in the following form:

  • removed option lib_options -> this was copied from moncached but the mongo db hasn't such an option
  • moved server, database, collection into own configuration options (before part of lib_options)
  • removed default server so the default will be auto detected by ext/mongo using INI options
  • added own configuration options for connection_options and driver_options
  • removed default connection_options so the default will be defined by ext/mongo.

As of the mongo db cache storage adapter is new in 2.4 this will be no BC break until 2.4 is out!!

ping @Ocramius Hopefully soon enough for 2.4
ping @alexdenvir please review as author of this adapter

@alexdenvir
Copy link
Contributor

👍
Looks good to me.

@weierophinney weierophinney added this to the 2.4.0 milestone Feb 19, 2015
@@ -110,14 +66,8 @@ public function testSetResourceThrowsException()
$id = 'foo';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test fails currently, indicating that a Zend\Cache\Exception\InvalidArgumentException was not thrown. When I look at MongoDbResourceManager::setResource() there is no validation of the $resource argument. The typehint specifies array or MongoCollection, but does not test for anything other than MongoCollection (in which case it branches logic). I'll update it on merge to raise the exception if $resource is neither of the two types.

@weierophinney weierophinney merged commit 9512a3d into zendframework:develop Feb 25, 2015
weierophinney added a commit that referenced this pull request Feb 25, 2015
weierophinney added a commit that referenced this pull request Feb 25, 2015
weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
…che/fixMongoOptions

Cache: fix mongo options
weierophinney added a commit to zendframework/zend-cache that referenced this pull request May 15, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants