mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 17:33:15 +02:00
Differences for flush ObjectManager <-> vs. EntityManager #4941
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 @firegate666 on GitHub (Dec 17, 2015).
Originally assigned to: @Majkl578 on GitHub.
Hi,
is there a reason why
flush()forEntityManageraccepts an entity andObjectManagerdoes not? Would it make sense to add this altered method signature at least to theEntityManagerInterface?Even the
EntityManagerDecoratorcomplains about the signature change (method called with 1 parameter, but 0 expected).@ghost commented on GitHub (Jan 6, 2016):
@deeky666 commented on GitHub (Jan 6, 2016):
I suppose that the optional parameter was introduced in ORM/ODM after the common ObjectManager interface was established. Therefore changing this would be a BC break and cannot be fixed before the next major version of the common lib.
@firegate666 commented on GitHub (Jan 6, 2016):
Too bad ...
@Ocramius commented on GitHub (Jan 6, 2016):
The optional parameter was introduced as an optimization, and has caused only problems since then. It will likely also disappear in future :-P
@Majkl578 commented on GitHub (Dec 20, 2017):
This disparity will be removed in Doctrine 3.0, flush will not accept entity parameter anymore. @Ocramius was right again. 🤣