Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:119074 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 88282 invoked from network); 2 Dec 2022 10:15:24 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 2 Dec 2022 10:15:24 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3111D1804A7 for ; Fri, 2 Dec 2022 02:15:24 -0800 (PST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,SPF_HELO_PASS, SPF_NEUTRAL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS30827 82.113.144.0/20 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Fri, 2 Dec 2022 02:15:23 -0800 (PST) Received: from localhost (localhost [IPv6:::1]) by xdebug.org (Postfix) with ESMTPS id 7642310C025; Fri, 2 Dec 2022 10:15:22 +0000 (GMT) Date: Fri, 2 Dec 2022 10:15:22 +0000 (GMT) X-X-Sender: derick@singlemalt.home.derickrethans.nl To: Paul Dragoonis cc: "Christoph M. Becker" , mickmackusa , PHP Internals List In-Reply-To: Message-ID: References: <9b74bcf3-9e0a-bf41-ef2e-d47948f815f8@gmx.de> User-Agent: Alpine 2.23 (DEB 453 2020-06-18) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="8323329-2038779738-1669976122=:249346" Subject: Re: [PHP-DEV] Remove warning when parsing datetime with + symbol? From: derick@php.net (Derick Rethans) --8323329-2038779738-1669976122=:249346 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: QUOTED-PRINTABLE On Mon, 28 Nov 2022, Paul Dragoonis wrote: > On Mon, 28 Nov 2022, 16:32 Christoph M. Becker, wrote= : >=20 > > 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 Date= Time > > >> 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 year= s, > > > and I'm perfectly happy to remove that restriction from PHP 8.3 > > > forwards =E2=80=94 it's too late to do that in PHP 8.2 now, as it's b= eing > > > 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 u= ser. > > >=20 > We are allowed to break BC in minor version upgrades, Chris. >=20 > We can allow this is 8.3 I think, rather than waiting for 9.0 >=20 > What do you think? No, we don't break BC for minor gains. If Christopher says that this is=20 a documented feature, then there is even less opportunity to do so. I'll see if I can come up with a different letter to allow for just=20 ignoring trailing data. cheers, Derick --=20 https://derickrethans.nl | https://xdebug.org | https://dram.io Author of Xdebug. Like it? Consider supporting me: https://xdebug.org/suppo= rt Host of PHP Internals News: https://phpinternals.news mastodon: @derickr@phpc.social @xdebug@phpc.social twitter: @derickr and @xdebug --8323329-2038779738-1669976122=:249346--