Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:116296 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 24949 invoked from network); 25 Oct 2021 08:48:30 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 25 Oct 2021 08:48:30 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 8D436180545 for ; Mon, 25 Oct 2021 02:37:55 -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=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, 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-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-pl1-f175.google.com (mail-pl1-f175.google.com [209.85.214.175]) (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 ; Mon, 25 Oct 2021 02:37:55 -0700 (PDT) Received: by mail-pl1-f175.google.com with SMTP id y1so7505657plk.10 for ; Mon, 25 Oct 2021 02:37:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=XDPqmOGqM1/3INKJOcINCZb+WPGoZHC4wa47hsqA0QQ=; b=koNDVgdWdx5koIu1jLUzvFAnqDgp/cDo/gCn2lCyLiINgj+dpffRe5Q1S361IQtmt8 MdRD4GEsslJBl1dqe81cqwr5ujXJ2s+6PQKcZOriKdMvM9pmFVkG12WY/w/fA0z0N0T8 wh5At1F6EeIcbtPoBwIBtntwxg0OvqVvNZy2BIBnVo3fgs0/mIer/N09g+sJ87aYQNS+ SUC9AT0rvkNyRBeRZX4RkbVBvJ6Nu2HfpZ67zTqFPaXGzBHvlrsAESs2AK/7EAEHKzSU Mg9MO83ZcVT9bHg3NEN/b0zIjk0ufqQOstdMqaCfYby1qAG1WBMtOsDkACf3pn3VbyPS ubfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=XDPqmOGqM1/3INKJOcINCZb+WPGoZHC4wa47hsqA0QQ=; b=yg+cEUQql5z2veaM5j3ByMqpVEjY8muqEwcF0941oD5+At3qpciHdFGvj7LCgVHAvp piyUrAWLTN55+f99cgTuOtiGitKoHCeL0s7CmRz2iZNnPcs0VFLTv32i9umcIuEprrle 0MhsxV/A5CI00dSpntbFFVtH5foSF07XRmKMNj5Ofbjdc/xaveJ291rb++EIF5gt8+at 7pTENyU5w8w35+LQ+Bn98Bmzb8ZZT8FWjCwR0x4ZlPLkpz3Cvr9w01tq/298u0KI6vjD Fp0knOHHHGHRozrfchTd800MgCB/M4rHamJjLdGC9R8HqDalahUoBeawDTwXvjAGbmhA QN0g== X-Gm-Message-State: AOAM533bwZJ2Y/i+t4wMt/ytckmJTd2CLcNBEvrH/HJY/SlDtioF4wtu 0GcqFDBS8+WW+aaHEfnzD3ZYte9+IDjIyx+4GltJL3FsFmFWlA== X-Google-Smtp-Source: ABdhPJzY93NpXRihyK37Ji4ZalOpalBUPk4Lu1NCILDFBp5SqZ/4nj7kZbeDsHzGcQl4Z+cJdO2gldK2mtz8Ycepbvk= X-Received: by 2002:a17:90a:4890:: with SMTP id b16mr20353405pjh.82.1635154673901; Mon, 25 Oct 2021 02:37:53 -0700 (PDT) MIME-Version: 1.0 References: <28be190c-21ea-b796-cec7-b8db21d14eca@gmail.com> In-Reply-To: Date: Mon, 25 Oct 2021 11:37:17 +0200 Message-ID: To: PHP internals Content-Type: multipart/alternative; boundary="0000000000007da43105cf2a1d92" Subject: Re: [PHP-DEV] Deprecation of ext/date ISO8061 constants From: divinity76@gmail.com (Hans Henrik Bergan) --0000000000007da43105cf2a1d92 Content-Type: text/plain; charset="UTF-8" >> the topic was controversial > Why is that? I did not found any information regarding this one on = internals mailing list. mostly because people who have never read the actual ISO8601 specs, or have just skimmed it, swear that "yeah it's totally legal, trust me bro".. and they're loud. it's easy to make that mistake, as the ISO8601 specs is a huge complex mess, and does allow a shit-ton of different formats, like for example: R8/PT72H what does that mean, you ask? i think it means "8 repetitions over 72 hours", but i don't recall for sure. how about P2Y10M15DT10H30M20S i think it means 2 years 10 months~ how about R/P1Y2M15DT12H/1985-04-12T23:20:50 i think that means "something with an unknown amount of repetitions that started in 1985 and repeated for 1 year 2 months~" , but i don't actually remember.. but as someone who has actually read the specs (at least the 2004 edition), i can say with confidence that PHP's DateTime::ISO8601 is not legal in ISO8601:2004. also i doubt it ever was legal in any revision of ISO8601 to mix basic-with-extended, but i don't actually know that. (did the original 1988 revision of ISO8601 allow mixing basic format with extended format? i don't know.) On Sun, 05 Sep 2021 at 06:01, Damian Dziaduch wrote: > From php-internals Sun Sep 05 06:01:52 2021 >> From: Damian Dziaduch >> Date: Sun, 05 Sep 2021 06:01:52 +0000 >> To: php-internals >> Subject: [PHP-DEV] Deprecation of ext/date ISO8061 constants >> Message-Id: <03FA66B8-D164-496C-93D4-B70B9874BB6B () icloud ! com> >> X-MARC-Message: https://marc.info/?l=php-internals&m=163082172305890 >> >> Hello internals! >> >> This is my first time writing here :) >> >> The deprecation was originally added in RFC Deprecations for PHP 8.1, = >> but in a later stage dropped entirely: >> =https://wiki.php.net/rfc/deprecations_php_8_1?do=3Ddiff&rev2%5B0%5D=3D1623= >> 754059&rev2%5B1%5D=3D1623759320&difftype=3Dsidebyside >> >> It was already discussed on this mailing list: >> > List: php-internals >> > Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.1 >> > From: Nikita Popov >> > Date: 2021-06-15 12:23:50 >> > Message-ID: CAF+90c8wht+LpERZxj-XuY4sAYek8fH9hH_fc+JVZYg_yiAMpw () = >> mail ! gmail ! com >> >=20 >> > On Tue, Jun 15, 2021 at 12:48 PM Hans Henrik Bergan = >> >> > wrote: >> >=20 >> >> i don't like this part of the RFC: >> >=20 >> >=20 >> >>> There's a number of bug reports related to this. =46rom 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. >> >>=20 >> >> - this is wrong, DateTime::ISO8601 *is* illegal in ISO8601. >> >> quoting ISO8601:2004 section 4.3.3: >> >>=20 >> >>> 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. >> >>=20 >> >> 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. >> >=20 >> > 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. >> >> I do understand why it was dropped entirely from RFC, but I do not = >> understand this part: >> >> > the topic was controversial >> >> Why is that? I did not found any information regarding this one on = >> internals mailing list. >> >> Kind regards. >> >> --0000000000007da43105cf2a1d92--