Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112807 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 20868 invoked from network); 7 Jan 2021 23:46:40 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Jan 2021 23:46:40 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 5CDAB1804D1 for ; Thu, 7 Jan 2021 15:23:29 -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=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Virus: No X-Envelope-From: Received: from v-smtpout3.han.skanova.net (v-smtpout3.han.skanova.net [81.236.60.156]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 7 Jan 2021 15:23:28 -0800 (PST) Received: from [192.168.7.11] ([213.64.245.126]) by cmsmtp with ESMTPA id xecokjXtmMkHRxecokesBc; Fri, 08 Jan 2021 00:23:26 +0100 To: Nikita Popov Cc: PHP internals References: <283eb44a-d6f9-b91b-115e-cc95e9523c30@telia.com> <6fed4bf0-fa17-c5b5-509f-631e561af037@telia.com> Message-ID: Date: Fri, 8 Jan 2021 00:23:27 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------8EBB5F5BE4FB4300092E1818" Content-Language: en-GB X-CMAE-Envelope: MS4wfKoi5C79cOWIRejGH46409uQ5bbnREckXyXsNGhxMUd6HQ+cECwviYLUwKYAK0sqedumHr5VCEBfRouuxlpJBjnEwBLZt55m5Q5U6xPgM4SEmo4qyWnE Y5eMgEAJ9Muxm1m8YjJA9+A6E376HqN4/0CbwMHYJnzWCSzx6xzpWC/c2T8sE2dbjhl0uefDEfrlmeb07UDPwu8YbpRN6xkiJBAexbwxAJG6Qrs7o/4tCi3l Subject: Re: [PHP-DEV] Re: [RFC] Phasing out Serializable From: bjorn.x.larsson@telia.com (=?UTF-8?Q?Bj=c3=b6rn_Larsson?=) --------------8EBB5F5BE4FB4300092E1818 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Den 2021-01-06 kl. 17:51, skrev Nikita Popov: > On Tue, Dec 15, 2020 at 12:14 AM Björn Larsson > > wrote: > > Den 2020-12-07 kl. 16:49, skrev Nikita Popov: > > On Mon, Dec 7, 2020 at 3:49 PM Björn Larsson > > > > wrote: > > > >> Den 2020-12-07 kl. 15:11, skrev Nikita Popov: > >> > >>> Hi internals, > >>> > >>> Picking up a loose thread: > >>> https://wiki.php.net/rfc/custom_object_serialization > introduced a > >>> replacement for Serializable in PHP 7.4, so it's time to think > about > >>> deprecating and removing the old mechanism: > >>> > >>> https://wiki.php.net/rfc/phase_out_serializable > > >>> > >>> This RFC follows a rather conversative approach. In PHP 8.1 > there will > >> be a > >>> deprecation warning if Serializable is implemented without also > >>> implementing __serialize() and __unserialize(). In PHP 9.0, > support for > >>> Serializable is dropped internally, and only the interface > retained. In > >> PHP > >>> 10.0 the interface is dropped as well. > >>> > >>> Regards, > >>> Nikita > >> > > > > I had to slightly extend this RFC to also deprecate & remove the > > PDO::FETCH_SERIALIZE mode, which is based on Serializable. > Doesn't seem to > > be a big loss, as this fetch mode isn't working correctly in the > first > > place... > > > > > >> Given that 10.0 lies maybe ten years in the future if we have a > similar > >> timeline >> like for 7.0 to 8.0. Is it then realistic to have > such a > >> long-term planning? For me it feels a bit more prudent to remove it > >> completely in 9.0. > >> > >> Otherwise +1! > >> > > > > I'd be also okay with dropping it entirely in PHP 9. That would > mean that > > there is no prior deprecation warning if you implement it > together with > > __serialize() and __unserialize() though, which is why I went > with the > > proposed timeline. From my own (technical) perspective, the case > is closed > > in PHP 9 either way, because that's where we can rip out support in > > unserialize(). > > > > Nikita > > > Not sure I understand why no deprecation warning is needed in 8.1, > if removing completely in 9.0? > > The current proposed timeline only removes in PHP 9.0 what was > deprecated in PHP 8.1. Possibly I'm misunderstanding what you have in > mind here. Ok, then I read it wrong, completely fine with above. > > Anyway, my main objection towards the proposed timeline is not so > much about the functionality removed. It's more related with that > I think an RFC that mandates what should happen in 10.0, maybe > 10 years into the future feels a bit farfetched. > > Of course there could be exceptions for RFC's targeting PHP 10.0, > but then I think it should be for something big, like replacing > the SPL library etc. > > > I'm not sure I understand what your actual concern here is. Yes, it's > a long-term plan, but why is that a problem? Why should long-term > planning only be limited to major changes? Even a simple deprecation > already works on a 5 year timeline, between deprecation and removal. > Of course, I have no idea whether I'll still be involved with the PHP > project in ten years time, but I suspect there will always be someone > who enjoys deleting deprecated code to carry out the will ;) Not sure we had RFC's earlier with a ten year lifespan. So I have a concern about how realistic it would be ;-) The RFC is targetting two major versions, think it would be cleaner to target only one of them, not two. Now we have this RFC for 8.1 and we remove it it in the first step in 9.0 followed by removing it completely in 10.0. One motive for this as I understand it, is the <7.4 support. Anyway, come to think on the RFC "Remove PHP 4 Constructors" which targeted 7.0 and then it was removed completely in 8.0. Also thinking on the 7.4 deprecation RFC, where the items was removed in 8.0. So is it by having this RFC targeting 8.1, we get five extra years or is it the <7.4 support? r//Björn L --------------8EBB5F5BE4FB4300092E1818--