mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-2783: EntityManager#transactional() support for non-truthy values
#3480
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 (Nov 7, 2013).
Originally assigned to: @Ocramius on GitHub.
Jira issue originally created by user chebba:
The problem:
Any response from transactional callback which is evaluated to *false* (empty array, empty string, 0, null, etc) becomes true
There is the old resolved issue DDC-1336, which describes this behavior.
@returntag is clear now.But this logic is blowing mind and leading to unexpectable results. The expected behavior is just return callback result, i don't see any good use cases for current implementation.
It requires a BC break. Can the deprecation process be started to change this behaviour in few major releases?
@doctrinebot commented on GitHub (Nov 7, 2013):
Comment created by stof:
I agree that this makes the method hard to use. And I don't undertstand why it would replace the return value.
What was the intention for this Benjamin ?
@doctrinebot commented on GitHub (Apr 18, 2014):
Comment created by @guilhermeblanco:
[stof] [beberlei] I'm considering to remove the ternary and always return the callback result.
What do you think? It seems like a minor BC break, but would like to get more feedback around this.
@doctrinebot commented on GitHub (Apr 18, 2014):
Comment created by @ocramius:
[~guilhermeblanco] this was already refused before because of the BC break.
@fracz commented on GitHub (Nov 28, 2016):
Is there any chance to change this strange behavior?
@Majkl578 commented on GitHub (Nov 28, 2016):
@fracz Yes, it's aready been done for 3.0 in #6147.
Ping @Ocramius, this could be marked as BC break & done & 3.0 milestone, I guess?
@lcobucci commented on GitHub (Nov 28, 2016):
@fracz did you see #6147?
@fracz commented on GitHub (Nov 28, 2016):
I have not. Thank you for rapid response!
@Ocramius commented on GitHub (Nov 29, 2016):
Closing as per #6147 👍