dg / dibi

Dibi - smart database abstraction layer
https://dibiphp.com
Other
488 stars 135 forks source link

Bug in Dibi\Datetime modify #435

Closed Adamko23 closed 1 year ago

Adamko23 commented 1 year ago

Version: 4.2.7

Bug Description

Dibi\Datetime modify is broken, there is not working modify correctly.

Steps To Reproduce

(new \Dibi\Datetime('2023-01-01'))->modify('last day of this month') this code do nothing.

Expected Behavior

the correct return of this method is object with date 2023-01-31, standard \DateTime works with it, but dibi return 2023-01-01

Adamko23 commented 1 year ago

oh, there is extends of DateTimeImmutable in this version... it is ok, just it is really complicate migration from v3 to v4 for it. there was extends \DateTime

dg commented 1 year ago

In version 4.0.x there was a detector for problems with switching to immutable datetime, so try updating to that version first and then to the current version..