Skip to content

Commit

Permalink
doctrine#6118 remove flush\($entity\)` signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Ocramius authored and lcobucci committed Dec 31, 2017
1 parent ea2ec07 commit e204b96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions lib/Doctrine/ORM/Decorator/EntityManagerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ public function find($entityName, $id, $lockMode = null, $lockVersion = null)
/**
* {@inheritdoc}
*/
public function flush($entity = null)
public function flush()
{
return $this->wrapped->flush($entity);
return $this->wrapped->flush();
}

/**
Expand Down
6 changes: 2 additions & 4 deletions lib/Doctrine/ORM/EntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,19 +344,17 @@ public function createQueryBuilder()
* If an entity is explicitly passed to this method only this entity and
* the cascade-persist semantics + scheduled inserts/removals are synchronized.
*
* @param null|object|array $entity
*
* @return void
*
* @throws \Doctrine\ORM\OptimisticLockException If a version check on an entity that
* makes use of optimistic locking fails.
* @throws ORMException
*/
public function flush($entity = null)
public function flush()
{
$this->errorIfClosed();

$this->unitOfWork->commit($entity);
$this->unitOfWork->commit();
}

/**
Expand Down

0 comments on commit e204b96

Please sign in to comment.