mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-394: Enable method chaining on EntityManager::persist #487
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Mar 8, 2010).
Jira issue originally created by user seldaek:
Please allow method chaining on persist so you can do:
$em->persist($foo)
->persist($bar)
->flush();
Patch is there:
http://dump.seld.be/D2-persist_return.patch
@doctrinebot commented on GitHub (Mar 8, 2010):
Comment created by romanb:
I dont see any good reason to do this. The EntityManager API is not meant to be a fluent API. There are methods with different return values (merge cant return $this). It does not create some kind of DSL or whatever. Fluent interface just for the sake of saving a few keystrokes, without any actual improvements of API readability or conciseness is abuse and a bad application of a fluent interface.
@doctrinebot commented on GitHub (Mar 8, 2010):
Issue was closed with resolution "Won't Fix"