Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112784 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 41716 invoked from network); 6 Jan 2021 17:15:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 6 Jan 2021 17:15:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7ABF91804E2 for ; Wed, 6 Jan 2021 08:51:45 -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=-0.7 required=5.0 tests=BAYES_05,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-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 ; Wed, 6 Jan 2021 08:51:44 -0800 (PST) Received: by mail-lf1-f53.google.com with SMTP id a12so8009175lfl.6 for ; Wed, 06 Jan 2021 08:51:44 -0800 (PST) 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=skmW+TFE5oCjYmsKxLBYgNxRhHDOxJyFp3x3xs69YtM=; b=vTUAEFbZRJGTLA7F6pUA0rIL3GPcguvWtpbLRiEsPuMyUjzor+Gd35OQPhlRYS6YkW vzSAT0PLwhioQapiFJ5vBZn99KekwZVborJmlT2tFCHkJD+Uun0N7ezwrPPgmfh1jAQl lT7x33ySDDCNUkP4MH5Bq3RaHbqsWcd4A6cwxkFthbLag5Rv0JnDhmwjrNSk/lo4gJz4 +3ICK3jthdFB2lZXZG1nj3bOsGYQRtw/qLKK0cQRm7XX2LB9Q8pM/bbjXP+OSXsO9PEm KAAdoKbRxTaUQV0swkMxHWbm1GYvQMHLpgBnmqc3PTnxY+IDVXfOrEteMItFbDwOsHI9 Mw6w== 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=skmW+TFE5oCjYmsKxLBYgNxRhHDOxJyFp3x3xs69YtM=; b=B4eA6pWkjys6w28gWfV+IMez8m/8+KKuxGlidQyMVVxxT+3o/OVUeIYZGXb3ZcsLna YuBbNpoV8gaBJ8AAWIQCqzUbsW0Ji819f/v7U2ycMoCXOiMYIhI+b5yAFfQWdxJuDwi0 26HbyFRs2T5UgHkgAw/HCo6k0w78Mq34i+1G3y1jASoXuo9Z45gc5WyCBDpXJtr5v6QM tVNsek6kskfARWr0DkQmPzoCEmrAsIvsVLW/kfBLJGhXPQezZiH96ncrl6WpIVjtMfc+ nz2BVBKLRJUKWPG+0471vhHdU8c2rdwf/wCo6QHUdi9K0gwq9ZKRjq7x3aKs+C+PQAOQ uhQQ== X-Gm-Message-State: AOAM532s8jTUPYhpfw/HP0P4PirI4pVxQYb83la+nrRq0cm9c8lA0+tY OLvv+NA63YhzZ5Pf3lKnrJmlnaKWyihDdsc7150= X-Google-Smtp-Source: ABdhPJy1CpRshqNP+IFrKfI1Im4NYpCcCMT9FzJyp7RDnhKE2rOs7XBwL+XMf/PLAmDCZq53g66KNoaiLgS+9nToUtc= X-Received: by 2002:a2e:2284:: with SMTP id i126mr2528167lji.93.1609951900083; Wed, 06 Jan 2021 08:51:40 -0800 (PST) MIME-Version: 1.0 References: <283eb44a-d6f9-b91b-115e-cc95e9523c30@telia.com> <6fed4bf0-fa17-c5b5-509f-631e561af037@telia.com> In-Reply-To: <6fed4bf0-fa17-c5b5-509f-631e561af037@telia.com> Date: Wed, 6 Jan 2021 17:51:24 +0100 Message-ID: To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Cc: PHP internals Content-Type: multipart/alternative; boundary="0000000000001c2f8f05b83e2311" Subject: Re: [PHP-DEV] Re: [RFC] Phasing out Serializable From: nikita.ppv@gmail.com (Nikita Popov) --0000000000001c2f8f05b83e2311 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, Dec 15, 2020 at 12:14 AM Bj=C3=B6rn Larsson wrote: > Den 2020-12-07 kl. 16:49, skrev Nikita Popov: > > On Mon, Dec 7, 2020 at 3:49 PM Bj=C3=B6rn 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 wil= l > >> be a > >>> deprecation warning if Serializable is implemented without also > >>> implementing __serialize() and __unserialize(). In PHP 9.0, support f= or > >>> 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 simila= r > >> 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 th= at > > 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. 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 ;) Regards, Nikita --0000000000001c2f8f05b83e2311--