cakephp / chronos

A standalone DateTime library originally based off of Carbon
http://book.cakephp.org/chronos
MIT License
1.34k stars 61 forks source link

Bring back toNative() alias of toDateTimeImmutable() #427

Closed othercorey closed 9 months ago

othercorey commented 9 months ago

refs https://github.com/cakephp/chronos/pull/424

We want to keep BC with 3.0 as users have changed code to call toNative(). Users can decide which makes their code clearer or cleaner.

dereuromark commented 9 months ago

Ohh Chronos itself is missing here it seems

othercorey commented 9 months ago

Chrnis is already DateTimeImmutable

othercorey commented 9 months ago

But it could be a BC break although its a weird conversation

dereuromark commented 9 months ago

But it still isnt the actual native object, so it does make sense to keep toNative() everywhere if someone really needs the native class type. Especially for BC reasons, though, this method for sure can only be deprecated now, not removed.