Re: Remove warning when parsing datetime with + symbol?

From: Date: Mon, 28 Nov 2022 16:47:55 +0000
Subject: Re: Remove warning when parsing datetime with + symbol?
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-119048@lists.php.net to get a copy of this message
On Mon, 28 Nov 2022, 16:32 Christoph M. Becker, <cmbecker69@gmx.de> wrote: > On 28.11.2022 at 16:50, Derick Rethans wrote: > > > On Thu, 24 Nov 2022, mickmackusa wrote: > > > >> Can anyone explain to me why it is desirable/beneficial for the DateTime > >> class to store a warning that trailing characters were ignored while > >> parsing a date/time string with the + symbol in createFromFormat()? > > > > I have no idea why I decided that was a good idea back all these years, > > and I'm perfectly happy to remove that restriction from PHP 8.3 > > forwards — it's too late to do that in PHP 8.2 now, as it's being > > released next week. > > That would appear to consitute a BC break. From the docs: > > | If this format specifier is present, trailing data in the string will > | not cause an error, but a warning instead > > This can be used to parse the date (without the +, parsing may fail), > but still be able to return a message about ignored characters to the user. > We are allowed to break BC in minor version upgrades, Chris. We can allow this is 8.3 I think, rather than waiting for 9.0 What do you think? > -- > Christoph M. Becker > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: https://www.php.net/unsub.php > >

« previous php.internals (#119048) next »