You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
trigger_error(
'Since 2.4 ChronosInterval is deprecated. Use Chronos::createInterval() instead.',
E_USER_DEPRECATED
);
Why is that?
The suggested method doesnt exist in the code
I would recommend we keep this method as it is useful and better than using the native DateInternal class and its methods.
E.g. (string) casting to the native format is super important IMO.
I see that 3449eca dropped it as there were some issues with the native class and compatibility.
I have the same issue when trying to actually create any kind of improved wrapper around it.
Maybe instead of extending it, we could encapsulate it using the proxy pattern?
I have the same issue when trying to actually create any kind of improved wrapper around it.
Maybe instead of extending it, we could encapsulate it using the proxy pattern?
Given how thorny datetime can be, I think the proxy/decorator pattern is the only good option we have. We could include a toNative() or toDateInterval method so that working with other libraries is reasonable.
Why is that?
The suggested method doesnt exist in the code
I would recommend we keep this method as it is useful and better than using the native DateInternal class and its methods.
E.g. (string) casting to the native format is super important IMO.
I see that 3449eca dropped it as there were some issues with the native class and compatibility.
I have the same issue when trying to actually create any kind of improved wrapper around it.
Maybe instead of extending it, we could encapsulate it using the proxy pattern?
But according to e.g. https://github.com/pauci/datetime/blob/master/src/DateInterval.php it should work with extension.
The text was updated successfully, but these errors were encountered: