Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:114885 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74985 invoked from network); 15 Jun 2021 12:07:41 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 15 Jun 2021 12:07:41 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8882E1804C0 for ; Tue, 15 Jun 2021 05:24:11 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f177.google.com (mail-lj1-f177.google.com [209.85.208.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Tue, 15 Jun 2021 05:24:11 -0700 (PDT) Received: by mail-lj1-f177.google.com with SMTP id l4so12215770ljg.0 for ; Tue, 15 Jun 2021 05:24:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pZYrH/Ks1/Y2GNxABFToYIQX5t+D6PkK4JQ0gl2paK4=; b=d+PMf/+YlWF/I1rYpEuXtnY8yQg+YEBXY6kOVQe/FGYpt1f/lxcPsE/WDiaAleCl3L Q9rgkRFEqz1Iha9f2lXnx4vvlEU+FIZYJBUGsDOSgfdWiHEodNx+foOZx/TL00nHRXns y1R4si4eok3YsN+d2B3VrKNE7iseM/sbkZ8VOlsYD2ool/kxEL4LLQV5nSuZHjOgdL6p 7tuw4EhK/GLBp4KrNFCm8CBeQnrftOhElr21HzMo4CYYmAnM+AwBAKFMuXfE/2pEiMJZ o5j0uIYJm+6o3JQfmhhBYruAgfMrwWLDqmsjFWiUvg2Kzn7QbiWQgWGzYE4sw+Kpk/+A /bbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pZYrH/Ks1/Y2GNxABFToYIQX5t+D6PkK4JQ0gl2paK4=; b=Ko9Hz8MyPogafvA2eGUd384dRKac9vl/QDtPa1Ng/zUxTKgn02Vbw9u+GurtUwrpaA 6SDr3Uj8j2C3v99DU06YGyIv5LvEZ4fLH05G46BNpX/4xpOHZUGWByqvbpncbHeoU531 HjjfDvbMu9nbibCoMvleg3Ds4z9eTK+rkbWc9lOJie/eXDjfJacc73AOLR3FXKuogQ4H 8ctNz/pB4aSo9Rjvu3uDzpbMkEwNCbwB7zTip/r3f7Ird4SnI5W4j1wqIPiBVhXxnZaV 4EdlQMeoawZlDuyT5bX2MR0HyVGuuk1zwmAHOT/dpFnJhYuz2yGFP1h77yK/rJaDYvnq Y9BQ== X-Gm-Message-State: AOAM530PKf/+stA8vHJROhk4J/Y/WDX24PZqDVIWYuYhPxXhwc0dYArI Vm1MooBRJZTINszQsoBIlEtz8gfGPob55hEoXaM= X-Google-Smtp-Source: ABdhPJznlhzRMvjDF6nPhWd/xeYxXFNwDf+kFKi/TPV+Z2PB6BfXXCznv62IRokoidKUZ4sXqqzYqKeXHlkuuFizw0g= X-Received: by 2002:a2e:a234:: with SMTP id i20mr17746283ljm.272.1623759846213; Tue, 15 Jun 2021 05:24:06 -0700 (PDT) MIME-Version: 1.0 References: <28be190c-21ea-b796-cec7-b8db21d14eca@gmail.com> In-Reply-To: Date: Tue, 15 Jun 2021 14:23:50 +0200 Message-ID: To: Hans Henrik Bergan Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000d5893705c4cd0c32" Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1 From: nikita.ppv@gmail.com (Nikita Popov) --000000000000d5893705c4cd0c32 Content-Type: text/plain; charset="UTF-8" On Tue, Jun 15, 2021 at 12:48 PM Hans Henrik Bergan wrote: > i don't like this part of the RFC: > > > There's a number of bug reports related to this. From what I understand, > the core problem here is not that the ISO8601 format is *wrong*, it's just > one of multiple legal ISO-8601 formats. As DateTime formats always refer to > a specific format, not a set of multiple possible ones, there doesn't seem > to be anything actionable here. > > - this is wrong, DateTime::ISO8601 *is* illegal in ISO8601. > quoting ISO8601:2004 section 4.3.3: > > > For reduced accuracy, decimal or expanded representations of date and > time of day, any of the representations in 4.1.2 (calendar dates), 4.1.3 > (ordinal dates) or 4.1.4 (week dates) followed immediately by the time > designator [T] may be combined with any of the representations in 4.2.2.2 > through 4.2.2.4 (local time), 4.2.4 (UTC of day) or 4.2.5.2 (local time and > the difference from UTC) provided that (...skipped stuff...) d) the > expression shall either be completely in basic format, in which case the > minimum number of separators necessary for the required expression is used, > or completely in extended format, in which case additional separators shall > be used in accordance with 4.1 and 4.2. > > DateTime::ISO8601 does exactly what part "d" says isn't legal, > 1970-01-01T01:00:00 is extended format, and +0100 is basic format, breaking > the "the expression shall either be completely in basic format, in which > case the minimum number of separators necessary for the required expression > is used, or completely in extended format" -part. " 1970-01-01T01:00:00" is > legal extended format but illegal basic format, and "+0100" is legal basic > format but illegal extended format, and mixing the 2 isn't legal. > Thanks for the reference. I've removed the mention of DateTime::ISO8601 from the RFC to make sure that the RFC text doesn't make any incorrect statements. Not going to include a deprecation proposal as part of this RFC though -- from past discussions, the topic was controversial, so I don't want to include it this late in the process. Regards, Nikita > On Tue, 15 Jun 2021 at 12:33, Christoph M. Becker > wrote: > > > On 23.03.2021 at 06:04, Stanislav Malyshev wrote: > > > > >> t fopen mode > > > > > > I'm afraid there's - despite the warning - a bunch of code for Windows > > > that relies on "t" and I don't think we should be breaking it. Is there > > > a good reason to drop this mode? > > > > I don't see much need for 't' mode nowadays. Even Notepad properly > > handles LF fine for some years now. It's not really bad, if it can be > > explicitely specified. However, deprecating 't' mode would pave the way > > to sometime change shell_exec() to no longer use 't' mode, what is a > > footgun when dealing with binary data. So when using the backtick > > operator on Windows, you always need to keep that in mind. From my > > experience, 't' mode causes more harm than good. > > > > And if there is really the need for LF conversion, that still can be > > done with an explicit filter. > > > > -- > > Christoph M. Becker > > > > -- > > PHP Internals - PHP Runtime Development Mailing List > > To unsubscribe, visit: https://www.php.net/unsub.php > > > > > --000000000000d5893705c4cd0c32--