Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112458 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 58995 invoked from network); 7 Dec 2020 16:21:15 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 7 Dec 2020 16:21:15 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 7A8061804D1 for ; Mon, 7 Dec 2020 07:50:13 -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.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-f175.google.com (mail-lj1-f175.google.com [209.85.208.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, 7 Dec 2020 07:50:12 -0800 (PST) Received: by mail-lj1-f175.google.com with SMTP id f11so3576749ljn.2 for ; Mon, 07 Dec 2020 07:50:12 -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=U3dw2WKE0po9H1nMS+lkphbALK+rwZbKcNi/rPoRq0o=; b=IIHJavSy6/2MTvOn4fGz/OK1FZaW+jkJo6FbnzUVooGNp0eXsVDZR5egOfDQAA8/XV fUf/SQETfgnoPRdrDw/ehlQwNT43POMdYxt8zd3ufIxXFWJ3z6uRCgHkdBKkrlI8GdiS hzhS0Pq737IFWAJNrfaNp2jvum3lWqBqqcTl2kSR78mD1TVN41DuDGuDhiggCl5VAPR6 Y2zIBuugIgFhs/Hfgo8yMsKF9anTiudSYfv/NwMPXgqnqVYGOlUx54y9iYoGqwCP2lay bjzZAN5rV6w5tEHtz+jUpik+cMhM7B3wSOZqu1kRL7kylcrMwckJcGtLqEgo8DRLvKgv LBbg== 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=U3dw2WKE0po9H1nMS+lkphbALK+rwZbKcNi/rPoRq0o=; b=CRjZxLq7mr6dqhgw+KG71DoK21TQUI2oPnRJWncltly3ZtrLfeYfk2hejWQcp4zKc7 LINBwElfHcNVam4ZQbJtDZZVsqRKTE0rnM4v45Gep4DM6nH41FIkMtNSVKjlns2U4+Qw r8+RMfhcDSpbsWODzWCUpuo+Q7v8hbFBLVeceeeTldT6DEPDf91We6ZaDXUjpE+hgr/A k5OI+mglujbJTgiVeGGyy5WkFueSxxP3x50n4Bldru2VEM63WcZYlnU55w854BWp3EDE ronpgGNsHslxeO8ouOjNBRcClSNGbwTWovZDvVhmsYSfy4+K08H+i1AxoGpl72qqY5bP 6eLA== X-Gm-Message-State: AOAM530yM5Cv+5k7e0poAfUwlI9aQSu3Fo8/M0ubgsukX3CYA1QBuef8 tG7Z8I3x8eUXivWRjRwXK+xKk/sk0UD/8tu2WOA= X-Google-Smtp-Source: ABdhPJzEgFMBX02bECGVmuODmQiZW56t1YK+j0XRLJ/ruZ7p9pHtcVfzjrJaKFF6sCvA4gbHrjRWsoA2Pkak/UkbC+Q= X-Received: by 2002:a2e:9617:: with SMTP id v23mr9193634ljh.135.1607356209751; Mon, 07 Dec 2020 07:50:09 -0800 (PST) MIME-Version: 1.0 References: <283eb44a-d6f9-b91b-115e-cc95e9523c30@telia.com> In-Reply-To: <283eb44a-d6f9-b91b-115e-cc95e9523c30@telia.com> Date: Mon, 7 Dec 2020 16:49:53 +0100 Message-ID: To: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= Cc: PHP internals Content-Type: multipart/alternative; boundary="000000000000e8e97305b5e1c796" Subject: Re: [RFC] Phasing out Serializable From: nikita.ppv@gmail.com (Nikita Popov) --000000000000e8e97305b5e1c796 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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 --000000000000e8e97305b5e1c796--