Doctrine\Common\Persistence\ObjectManager::detach
Detaches an object from the ObjectManager, causing a managed object to become detached. Unflushed changes made to the object if any (including removal of the object), will not be synchronized to the database.
Objects which previously referenced the detached object will continue to reference it.
Signature
Parameters
$object
— object- The object to detach.