Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:112497 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 25323 invoked from network); 14 Dec 2020 18:09:54 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 14 Dec 2020 18:09:54 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 6EFD51804E1 for ; Mon, 14 Dec 2020 09:40:38 -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.2 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,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 mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (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, 14 Dec 2020 09:40:37 -0800 (PST) Received: by mail-ej1-f51.google.com with SMTP id w1so19005202ejf.11 for ; Mon, 14 Dec 2020 09:40:37 -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=CJKRHc0EJm0mOzGRyQ5eeFvbJXvyYToSRAm8urz7ZOw=; b=F6BAQz3vkC58Z+N29/uWoE0adySl0hvFR1PZFquvqsolOPdClTlo8pEcV7h99N9/mx 4crM64blh3R00B/SRxu0I1chsJh4eNfcRQnh/QCHpSnX5SUExPYUD3mGKuJQw8wvfXUk VzTKeox5t4D/L4O4nCPK2mkOir/ApdAt4VoAynYaniQS7VBASsZ12SEHrj8N7wxCI4YI aT1yYJHF/4qYGy4mfE1UOlg4+kXmMAbwUTFFgSRNUwyhv35XrBaN3dimMEEFREoZLfru oPVnoUB/Y0NJeWYEH0KlsPqiax9HGzQI33oJWndi+IAhogUgzhRY233FnjzCgIbEAy/0 pQaQ== 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=CJKRHc0EJm0mOzGRyQ5eeFvbJXvyYToSRAm8urz7ZOw=; b=DdWGFyJyoRjqnXEh8o08DBAEQmt4B3KnYyqAhzfd2E0VUCDZGghtl4A6PWYflD0YMy Z71r7ncD1dh/P0Su0rzB7ZNxyUraZ2uPZ5kbbtw8A+r9BkuFpfD1vukryiyVOzwL/zi2 SecQ76ucptyoLfveO/jk6uxfyASsqZEt5xyvTCiLjgRUM7B7l7wVgBXGDjopZHxssVmd /8cRte+9MppEZuOVTASGdUR8evXEcqTeYIx6ZleS3ENquJTf7dTZ7wC89pe4tn38xLoc qZN7pobCsuJZW2xXJIetr95C3jIE7GJIs9kwfk4L64/zX5ucfFHnC3gt2mEbUxv+3gif XZQQ== X-Gm-Message-State: AOAM533egnSbXhJkiWVBHhdSu0nQN8fF+cICmfkLRtMqAfyi5UG1mAoc p2ES6r2ss6QAx8oEvozf8sBhxzTwfvpC2xPai18= X-Google-Smtp-Source: ABdhPJxBcC1BVEzLKFBs0WKm6797DW7qVPZrnWAg8IBlGcvDPgoeXj01oKWyz0uatAD0Gpack2qwP6AMUvueXJd3EpE= X-Received: by 2002:a17:906:4e52:: with SMTP id g18mr24138622ejw.385.1607967634239; Mon, 14 Dec 2020 09:40:34 -0800 (PST) MIME-Version: 1.0 References: <283eb44a-d6f9-b91b-115e-cc95e9523c30@telia.com> In-Reply-To: Date: Mon, 14 Dec 2020 18:40:22 +0100 Message-ID: To: Nikita Popov Cc: =?UTF-8?Q?Bj=C3=B6rn_Larsson?= , PHP internals Content-Type: multipart/alternative; boundary="000000000000a6369105b670239b" Subject: Re: [PHP-DEV] Re: [RFC] Phasing out Serializable From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000a6369105b670239b Content-Type: text/plain; charset="UTF-8" Hi Nikita, > > > 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. > thank you for the RFC, I fully support it! > 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(). > I think it's critical to create a smooth path, and the one you propose is very sensible to me. We're not in a hurry to remove the interface. It should just be super clear what the direction is, and this path with a deprecation works well IMHO. Nicolas --000000000000a6369105b670239b--