[PR #5719] #1497 - fix call to method removed in df12963 #9704

Closed
opened 2026-01-22 16:05:10 +01:00 by admin · 0 comments
Owner

Original Pull Request: https://github.com/doctrine/orm/pull/5719

State: closed
Merged: No


Note: I did not reintroduce the getUtc method, since it was purposely removed in df129635cf for performance reasons,
but now the “self::$utc ? self::$utc : self::$utc = new \DateTimeZone('UTC')” logic is duplicated in 2 places, not sure if OK...

Edit: After checking, I guess it is OK, because commit df129635cf actually reverted (partly) the refactoring of (self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC')) into self::getUtc() which was done in commit 93806a8036, and the net result diff 93806a8036%5E...df129635cf2de5f137145af478335bcda78ed019 shows that the ternary logic was already duplicated originally.

**Original Pull Request:** https://github.com/doctrine/orm/pull/5719 **State:** closed **Merged:** No --- _Note:_ I did not reintroduce the `getUtc` method, since it was purposely removed in df129635cf2de5f137145af478335bcda78ed019 for performance reasons, but now the “`self::$utc ? self::$utc : self::$utc = new \DateTimeZone('UTC')`” logic is duplicated in 2 places, not sure if OK... _Edit:_ After checking, I guess it _is_ OK, because commit df129635cf2de5f137145af478335bcda78ed019 actually reverted (partly) the refactoring of `(self::$utc) ? self::$utc : (self::$utc = new \DateTimeZone('UTC'))` into `self::getUtc()` which was done in commit 93806a80369a84a904f41c76ec3467fa31a54c8c, and the net result diff https://github.com/doctrine/doctrine2/compare/93806a80369a84a904f41c76ec3467fa31a54c8c%5E...df129635cf2de5f137145af478335bcda78ed019 shows that the ternary logic was already duplicated originally.
admin added the pull-request label 2026-01-22 16:05:10 +01:00
admin closed this issue 2026-01-22 16:05:10 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#9704