Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128459 X-Original-To: internals@lists.php.net Delivered-To: internals@lists.php.net Received: from php-smtp4.php.net (php-smtp4.php.net [45.112.84.5]) by lists.php.net (Postfix) with ESMTPS id AED321A00BC for ; Wed, 13 Aug 2025 10:47:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1755081965; bh=brpSNhCkyMMT+ytAbrg1kbKOtkOPzbldx1OFG7mfWno=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=B1cPTLzhTE9bOUMPjqzXT47NGKIArrPqqA+1NuexdPpkkRMMvABBZQICDykADIMzz 3AEiQxAxjEL4/KO5zGtgmQ037RRdnVDQzTYApEqFweyrC97UN01smq6jm5eXg0jlZx ttzsh4xrE3OXE5RU0O8QrMwWtvcr+/NfP2ShBnBqcryFfO66ddP6SQ75GUU4kD0Qtq 3y0IBpmaByS8iMfPDFde3Kfnb893JWWcR/qKUAnuF95NHuyQwZeIV66Cpz7R+WYGWY 3x1XwCsFBa4Sqs0U5vHpHiuF3PcT/DuHQ3hbkByxNS1fqzKPHOjlOHaxAGnvAuaz1G 3zAWfU9PeIN0Q== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A052E18020B for ; Wed, 13 Aug 2025 10:46:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS, 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=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Wed, 13 Aug 2025 10:45:51 +0000 (UTC) Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-333dde3fa8dso12047551fa.2 for ; Wed, 13 Aug 2025 03:47:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1755082047; x=1755686847; darn=lists.php.net; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=hps87FN3j8Zxvu38aePG0jjBeYbGjjZoE/gsTf/VgiM=; b=UYjXXa4Lr3wa0zKG0eMsLQ34gQ1e8JyfdIs97X346wVumlVDV8ecmN92/hRKjpIV/e ZKKjJ1ZqTSnR2STa5oP6c7XM8IzlLTBB9+Lst0Yz9U98ClW/i14Gtnf4mQW1BFPSax4r VTWYtxrpGrG+WZVpHdK+vqsVbGAjihZZcZK01Ubj6iGZefy9Nb9AV2GA0ynVpWYKSjTL MFNk1PGIpAcMl205C7j7CdcmsY2HHdc4/nJ4Kn5tSwHYG3nq9blvkaXnW6m9xFlLMrTx dHuXPETfQiLwRgLXlZwWNOOU7enPujs9wCwSUGxsJFWrb8EAvqtHOhtXcOK/slnhsV0n CT2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1755082047; x=1755686847; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=hps87FN3j8Zxvu38aePG0jjBeYbGjjZoE/gsTf/VgiM=; b=iVYiQY4lwilFrRO2B6X0GomHTsmKAuk/CBELb1DQifX9YFLJ7YQojoXL4QMETZ6xQD 1JqUneHQpdjJnLGbh5XyJwmypVz8uvTVfqRL5xGDfE3+Hcvo+IvUHNOGzSMiGZY7Ul/K MgZDoYX+dGFIhHfc/lRjquiv+VJLYt49wqmBpjcvuKRfem1BejWGhahX+I/m3IIOBJpB LwP8DxK8IclWffBxYcReSx3FdoJhch9km6X1MkqD6hZ0VuLNf5zNk3fWkJ0qkrhtP67R 8oFRwRNi8lK363Ge1si0dM2sIM4DyaxorS74wJccxziZJj04I062n15qagQ+sURNrtNc FCXw== X-Forwarded-Encrypted: i=1; AJvYcCUIhPD+ICwbDZXc0gjqupsFHJK2+GkQO7vnWn3n6XF54D+a7St7owd7x2mosoq2keSwbP1vE7yT1T0=@lists.php.net X-Gm-Message-State: AOJu0YztUuypQnWhqC8oZc6CR0lr91a33o13DiUu9dLcLL1F6TjEq5bG bVu1757ljuPtPIgndOU/vmRyyeGcwZunWefMQEwkbqzOvA7Z0aVsHdvHvP17Qgvbrz3uWLL/9Ig RlJoFbXa7OBwmPP9MI1KYiyUPKElLyrs= X-Gm-Gg: ASbGncvom9u5lVRy7NtUr7PxmssjHAPS4LBEPFL6k1ZEhCqOnCMZeVRCWgpdfsGzNZv /t3UEQ++NkQSJi0/v4wmOzHOIpGYp8pstDK9wM2zfDEI8/rtSTv65gKpORSbml/QXRb8tFE+r3r Ym18CbPi39MbXssmBZvbsQ77lLHUq3irVY7ABgWaWcC3xrTl0q5i8ZKlz/vTGz+1av/oGc2jjdp azsM8w= X-Google-Smtp-Source: AGHT+IEhCz2vhGcCbsSHQ/mOPOLM3AvNxo6+TN5BMn4x4ZWjFeyHGnOSH1kTJlqqYWw7I0eqVvUFftO5DlRrKo+9Of0= X-Received: by 2002:a05:651c:4188:b0:32b:7faa:1327 with SMTP id 38308e7fff4ca-333e98684c8mr5407211fa.15.1755082046352; Wed, 13 Aug 2025 03:47:26 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Wed, 13 Aug 2025 13:47:13 +0300 X-Gm-Features: Ac12FXy-MmnF4UjIOMfxTRTM2U2u6GJgsY3rNRDwaHy5G0tevIqE16Y1HIzPF_0 Message-ID: Subject: Re: [PHP-DEV] [RFC] [VOTE] Deprecations for PHP 8.5 To: "Christoph M. Becker" Cc: Nicolas Grekas , "Gina P. Banyard" , PHP internals Content-Type: multipart/alternative; boundary="000000000000ecb24b063c3ce19b" From: tekiela246@gmail.com (Kamil Tekiela) --000000000000ecb24b063c3ce19b Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed 13 Aug 2025, 13:44 Christoph M. Becker, wrote: > On 13.08.2025 at 11:00, Nicolas Grekas wrote: > > > Le ven. 8 ao=C3=BBt 2025 =C3=A0 22:10, Gina P. Banyard a > =C3=A9crit : > > > >> The following proposals have been accepted: > >> > >> - Deprecate the __sleep() and __wakeup() magic methods (18 yay, 9 nay, > >> 66.7%) > > > > I=E2=80=99d like to raise some concerns about the decision to deprecate= __sleep() > > and __wakeup(). > > > > While I understand the intention behind moving toward __serialize() and > > __unserialize(), in practice the migration path is often non-trivial. F= or > > example, in Symfony=E2=80=99s codebase there are numerous cases where s= witching > > requires deep knowledge of PHP=E2=80=99s serialization format to mainta= in > > compatibility with existing payloads. This is essential so that updated > > applications can still communicate with older versions. > > > > For many projects, this will be a significant burden, especially given > that > > __sleep() and __wakeup() have historically worked well for these use > cases. > > I=E2=80=99m concerned that the practical cost to the community may outw= eigh the > > benefits, particularly since the rationale for removal seems, at least > from > > a user=E2=80=99s perspective, debatable. > > > > I don=E2=80=99t know if there is room to reconsider the deprecation, bu= t I wanted > > to share this perspective from the field. > > Frankly, I do not quite understand why it has even been suggested (so > early) to deprecate __sleep()/__wakeup(). Even the New custom object > serialization mechanism RFC[1] acknowledged that this mechanism is *not* > fundamentally broken, but only somewhat limited, and that: > > | There is no particular pressing need to phase out __sleep() and > | __wakeup(). > > However, I'm afraid that ship has sailed. > > [1] > > Christoph > Can we propose to undeprecate it before the feature freeze? > --000000000000ecb24b063c3ce19b Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Wed 13 Aug 2025, 13:44 Christ= oph M. Becker, <cmbecker69@gmx.de> wrote:
On 13.08.2025 at 11:0= 0, Nicolas Grekas wrote:

> Le ven. 8 ao=C3=BBt 2025 =C3=A0 22:10, Gina P. Banyard <internals@g= pb.moe> a =C3=A9crit :
>
>> The following proposals have been accepted:
>>
>> - Deprecate the __sleep() and __wakeup() magic methods (18 yay, 9 = nay,
>> 66.7%)
>
> I=E2=80=99d like to raise some concerns about the decision to deprecat= e __sleep()
> and __wakeup().
>
> While I understand the intention behind moving toward __serialize() an= d
> __unserialize(), in practice the migration path is often non-trivial. = For
> example, in Symfony=E2=80=99s codebase there are numerous cases where = switching
> requires deep knowledge of PHP=E2=80=99s serialization format to maint= ain
> compatibility with existing payloads. This is essential so that update= d
> applications can still communicate with older versions.
>
> For many projects, this will be a significant burden, especially given= that
> __sleep() and __wakeup() have historically worked well for these use c= ases.
> I=E2=80=99m concerned that the practical cost to the community may out= weigh the
> benefits, particularly since the rationale for removal seems, at least= from
> a user=E2=80=99s perspective, debatable.
>
> I don=E2=80=99t know if there is room to reconsider the deprecation, b= ut I wanted
> to share this perspective from the field.

Frankly, I do not quite understand why it has even been suggested (so
early) to deprecate __sleep()/__wakeup().=C2=A0 Even the New custom object<= br> serialization mechanism RFC[1] acknowledged that this mechanism is *not* fundamentally broken, but only somewhat limited, and that:

| There is no particular pressing need to phase out __sleep() and
| __wakeup().

However, I'm afraid that ship has sailed.

[1] <
https://wiki.php.net/rfc/cust= om_object_serialization>

Christoph

Can we propose to undeprecate it before the feature freeze?
=
--000000000000ecb24b063c3ce19b--