-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Deprecate Zend\Stdlib\DateTime and use \DateTime constructor internally instead #3951
Conversation
Imho we can't do this for ZF2 as this effectively is a BC Break. Time to get a version3 branch up & running ;) |
👍 for a version3 branch. :) |
In case we can't make the Zend\Stdlib\DateTime removal anymore, we can at least incorporate the Zend\Feed changes. |
Just for the record: I highly doubt that anyone has really used this class yet apart from our internal usage. It has been documented nowhere and is only in for this single version. |
Also, I talked with Derick; He actually stated that the constants were not meant to be used with the createFromFormat() method, but only for formatting dates for output:
So eventually, Zend\Feed was already doing it "wrong". He also approved that the DateTime constructor is perfectly fine for parsing such dates. |
I'll accept this on the conditions that:
If that's done, we can merge this for 2.2.0. |
@weierophinney Is it fine to mark |
@DASPRiD Yes. On Monday, March 11, 2013, Ben Scholzen wrote:
Matthew Weier O'Phinney |
Deprecate Zend\Stdlib\DateTime and use \DateTime constructor internally instead
- Added an error handler to catch the deprecation warning now emitted by Zend\Stdlib\DateTime
Merged to develop for release with 2.2.0 |
…val/stdlib-datetime Deprecate Zend\Stdlib\DateTime and use \DateTime constructor internally instead
…warning - Added an error handler to catch the deprecation warning now emitted by Zend\Stdlib\DateTime
…val/stdlib-datetime Deprecate Zend\Stdlib\DateTime and use \DateTime constructor internally instead
Zend\Stdlib\DateTime was introduced for no real reason; at least not without looking more deeply into how the native DateTime object works. The main reason was to be able to parse fractional seconds in ISO8601 dates, which was not possible with DateTime::createFromFormat(), but is actually possible with the DateTime constructor itself.
This PR deprecates that unnecessary class again and puts the DateTime constructor in place where needed.