Skip to content
This repository has been archived by the owner on Feb 5, 2024. It is now read-only.

Update Metadata infrastructure to the latest doctrine libraries #47

Merged
merged 2 commits into from Nov 10, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 4 additions & 1 deletion composer.json
Expand Up @@ -16,8 +16,11 @@
"symfony/console": ">=2.0"
},
"minimum-stability": "dev",
"require-dev": {
"symfony/yaml": ">=2.0.0,<2.2.0-dev"
},
"suggest": {
"symfony/yaml": ">=2.0"
"symfony/yaml": ">=2.0.0,<2.2.0-dev"
},
"autoload": {
"psr-0": {
Expand Down
35 changes: 0 additions & 35 deletions composer.lock

This file was deleted.

6 changes: 3 additions & 3 deletions lib/Doctrine/ODM/CouchDB/Configuration.php
Expand Up @@ -23,7 +23,7 @@
use Doctrine\CouchDB\HTTP\Client;
use Doctrine\CouchDB\HTTP\SocketClient;
use Doctrine\CouchDB\HTTP\LoggingClient;
use Doctrine\ODM\CouchDB\Mapping\Driver\Driver;
use Doctrine\Common\Persistence\Mapping\Driver\MappingDriver;
use Doctrine\ODM\CouchDB\Mapping\MetadataResolver\MetadataResolver;
use Doctrine\ODM\CouchDB\Mapping\MetadataResolver\DoctrineResolver;

Expand Down Expand Up @@ -144,11 +144,11 @@ public function setDocumentNamespaces(array $documentNamespaces)
/**
* Sets the cache driver implementation that is used for metadata caching.
*
* @param Driver $driverImpl
* @param MappingDriver $driverImpl
* @todo Force parameter to be a Closure to ensure lazy evaluation
* (as soon as a metadata cache is in effect, the driver never needs to initialize).
*/
public function setMetadataDriverImpl(Driver $driverImpl)
public function setMetadataDriverImpl(MappingDriver $driverImpl)
{
$this->attributes['metadataDriverImpl'] = $driverImpl;
}
Expand Down
11 changes: 7 additions & 4 deletions lib/Doctrine/ODM/CouchDB/Mapping/ClassMetadata.php
Expand Up @@ -2,7 +2,9 @@

namespace Doctrine\ODM\CouchDB\Mapping;

use Doctrine\Common\Persistence\Mapping\ClassMetadata AS IClassMetadata;
use Doctrine\Common\Persistence\Mapping\ClassMetadata AS IClassMetadata,
ReflectionClass,
ReflectionProperty;

/**
* Metadata class
Expand Down Expand Up @@ -67,6 +69,7 @@ public function deriveChildMetadata($childName)
$cm->reflClass = new \ReflectionClass($childName);
$cm->name = $cm->reflClass->getName();
$cm->namespace = $cm->reflClass->getNamespaceName();

if ($this->isMappedSuperclass) {
$cm->rootDocumentName = $cm->name;
}
Expand Down Expand Up @@ -296,14 +299,14 @@ public function getIdentifierValue($document)
{
return (string) $this->reflFields[$this->identifier]->getValue($document);
}

/**
* Get identifier values of this document.
*
*
* Since CouchDB only allows exactly one identifier field this is a proxy
* to {@see getIdentifierValue()} and returns an array with the identifier
* field as a key.
*
*
* @param object $document
* @return array
*/
Expand Down