Skip to content

Commit

Permalink
Remove deprecated argument from DocumentPersister::refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
malarzm committed Jul 30, 2016
1 parent c515e77 commit 7ce3d6c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
5 changes: 1 addition & 4 deletions lib/Doctrine/ODM/MongoDB/Persisters/DocumentPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,9 @@ public function delete($document, array $options = array())
/**
* Refreshes a managed document.
*
* @param string $id
* @param object $document The document to refresh.
*
* @deprecated The first argument is deprecated.
*/
public function refresh($id, $document)
public function refresh($document)
{
$query = $this->getQueryForDocument($document);
$data = $this->collection->findOne($query);
Expand Down
3 changes: 1 addition & 2 deletions lib/Doctrine/ODM/MongoDB/UnitOfWork.php
Original file line number Diff line number Diff line change
Expand Up @@ -2040,8 +2040,7 @@ private function doRefresh($document, array &$visited)

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

0 comments on commit 7ce3d6c

Please sign in to comment.