Skip to content

Commit 6dccd9e

Browse files
committed
Remove deprecated argument from DocumentPersister::refresh
1 parent a000a45 commit 6dccd9e

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -457,12 +457,9 @@ public function delete($document, array $options = array())
457457
/**
458458
* Refreshes a managed document.
459459
*
460-
* @param string $id
461460
* @param object $document The document to refresh.
462-
*
463-
* @deprecated The first argument is deprecated.
464461
*/
465-
public function refresh($id, $document)
462+
public function refresh($document)
466463
{
467464
$query = $this->getQueryForDocument($document);
468465
$data = $this->collection->findOne($query);

lib/Doctrine/ODM/MongoDB/UnitOfWork.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -2040,8 +2040,7 @@ private function doRefresh($document, array &$visited)
20402040

20412041
if ( ! $class->isEmbeddedDocument) {
20422042
if ($this->getDocumentState($document) == self::STATE_MANAGED) {
2043-
$id = $class->getDatabaseIdentifierValue($this->documentIdentifiers[$oid]);
2044-
$this->getDocumentPersister($class->name)->refresh($id, $document);
2043+
$this->getDocumentPersister($class->name)->refresh($document);
20452044
} else {
20462045
throw new \InvalidArgumentException('Document is not MANAGED.');
20472046
}

0 commit comments

Comments
 (0)