mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
[PR #1392] transactional() wrapper corrupts return values #9449
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?
Original Pull Request: https://github.com/doctrine/orm/pull/1392
State: closed
Merged: No
The EntityManager::transactional() method has undocumented behavior, which unexpectedly rewrites all
false-ish return values intotruebefore passing them on:I think there's a very strong case to be made that this is undesirable, however it's been in existence for a few years now (since DDC-1125) and it's very likely at least a few users have code that relies on the undocumented behavior.
This PR represents the most direct fix, but as a practical matter we may want to improve the documentation instead. If that is the decision, I'd be happy to create a separate PR for documentation changes.