Skip to content

Commit

Permalink
Merge pull request #6803 from SenseException/deprecate-copy-method
Browse files Browse the repository at this point in the history
Deprecation of EntityManager copy method
  • Loading branch information
Ocramius authored Jan 4, 2018
2 parents afae3f7 + 63c6526 commit f4eb8ca
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
7 changes: 7 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Upgrade to 2.7

## Deprecated: `Doctrine\ORM\EntityManagerInterface#copy()`

Method `Doctrine\ORM\EntityManagerInterface#copy()` never got its implementation and is deprecated.
It will be removed in 3.0.

# Upgrade to 2.6

## Minor BC BREAK: `Doctrine\ORM\Tools\Console\ConsoleRunner` is now final
Expand Down
3 changes: 0 additions & 3 deletions lib/Doctrine/ORM/EntityManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,6 @@ public function merge($entity)

/**
* {@inheritDoc}
*
* @todo Implementation need. This is necessary since $e2 = clone $e1; throws an E_FATAL when access anything on $e:
* Fatal error: Maximum function nesting level of '100' reached, aborting!
*/
public function copy($entity, $deep = false)
{
Expand Down
2 changes: 2 additions & 0 deletions lib/Doctrine/ORM/EntityManagerInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,8 @@ public function close();
/**
* Creates a copy of the given entity. Can create a shallow or a deep copy.
*
* @deprecated method will be removed in 3.0
*
* @param object $entity The entity to copy.
* @param boolean $deep FALSE for a shallow copy, TRUE for a deep copy.
*
Expand Down

0 comments on commit f4eb8ca

Please sign in to comment.