Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128659 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 2AA191A00BC for ; Mon, 8 Sep 2025 17:25:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1757352259; bh=a5BP1wgZsp9VCDHJPQJfSTD+mwHy/qbJzF0yP9EeR0I=; h=References:In-Reply-To:From:Date:Subject:To:From; b=bN/V4CKU2OvwATEWc2Rygp+oY2XWurLJQmYzN4MULaGjlb7vIbJK60MRWpA9s9/YA qwjWw02aiFv3xu6L2AfLcsQUmTYc5Ax/fTdAK0+ULDg7iOLix9KICKxazIAvR7zPcl 7jy27UmvsTo5Ai3kJNxv3hGp6HjYMbi8OemZ8OoFeomyfJPVFoTU8bH1B0UChPy5Ko 3pRbfg9fNZ/KT5rp63V0qy2T8uol+WurhHfNDp7ySmLAzmi91lo/QoW8mEt663eWN1 t+O8nLrcZ0EpVSy1aeyc9iYKKKmdD4s8QTRRASwWbxh6iFsVA7UDxCE3shdFj1BFd9 zKG5Ag6Zu5Pig== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 560C818006A for ; Mon, 8 Sep 2025 17:24:18 +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.8 required=5.0 tests=BAYES_40,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, FREEMAIL_REPLY,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-yb1-f173.google.com (mail-yb1-f173.google.com [209.85.219.173]) (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 ; Mon, 8 Sep 2025 17:24:18 +0000 (UTC) Received: by mail-yb1-f173.google.com with SMTP id 3f1490d57ef6-e96ee32f86bso3951979276.0 for ; Mon, 08 Sep 2025 10:25:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757352345; x=1757957145; darn=lists.php.net; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=a5BP1wgZsp9VCDHJPQJfSTD+mwHy/qbJzF0yP9EeR0I=; b=Bcp4JIm2+r5fe/h2431CINlNvAGs9hVcLeO7Zw1hmvvk3xIPmszudKbSjkMQZxv8II 37vQX6dlm/rGW+aUcudgXIKtLa4C74BJaJ3NlnP5vCy/fc3+RyhzS28l78Dlln+m8L6m G5SMMueRJhB3uyoqIMzTkFSDe86Jz5uzA5P82Rkv550h7fcS+hUslE92e7tumI7LQJZD 5g2gviei/2Fc50cGmHLyHaWW5qDOOWSANr+EN8XCN3y1EBK91liPlfFk6yUZAn+lD00a WvVt9Be4MM1qEJTIXXWJSuVa7VOqT9RjJqPcZL7viR+AkS1V2utZie10QvU66D548IoN /8KQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757352345; x=1757957145; h=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=a5BP1wgZsp9VCDHJPQJfSTD+mwHy/qbJzF0yP9EeR0I=; b=DLeeCFKgDOVXqwlPcaaULxuRVjHJQ/+67XT+2TLfFc8cMx0SJFBsyJ5O6NTbOsh2OT 0yOh54jGHM5TbCpnYiKWUloACSTG3vqw/B3/dH0klYV3iWayZ6XNif4kZHxZMwJ8VKAM dr4dbgR4IKWW+YMBD8iU2jJRK4s8q7S6XIjsBQb5Ez+cda9ozZYYi8lssZ+NHqHMPoEt YiYc2I/HduWU5R8Uz9ImWUMRG8lpXYFfuxmaQn9CJ0gGoqzvJqjpDxUHnVd8gAZpCSWI 6eNCiZHFpyfSj8kgSZk+R2myIKPhZx3KOcL1Ex2ajq82iy4BvBiOOH8a1Mc5FRQ42WaH GvPQ== X-Forwarded-Encrypted: i=1; AJvYcCVyrCLEnj5xeOgz+y09jCuE8XnXpJMbqTMQUvQSIBb5w+wUTTNSUhnkhCDLCcAWqmuU6A3TlaxdnF4=@lists.php.net X-Gm-Message-State: AOJu0Yywu1YJ8P/V5M6zJTOiBSzb3MI53PbJ/xe5NyxvHHu5FhJ2P8uJ HqdDBv/IVbzBZXz4gSsUEs6KWjoCtMkPA5zp81RYZxXBodHkngldDxs4CK/acFrlA4u3UE1Y44P hEek8DLq7rvWVjarpZmK98QaoGNszmN4goRAtwvw= X-Gm-Gg: ASbGncsdc2WJBIrO5zbFTvzv08Nh+05QwAMeTTf+LlP6aW1wRV+cwE0s30LHNPmQ+8p 8IC5Qr2xROgYpJLuXrrAUoSqWPZ0kbJ5GvLoQedJvsOjkYam8jjQVwJiBepZX0MTJGDsImdeFGz 2Ekx1I5crvY+WpXx7GYb0SgubzyUZEWVYgIAASuZyZYGiGnXNmUtLFmap7wQvKQPGgvGzGTxHpw Yv0N7bBLGaiC2757UExT5k67C+hvEtwEz0UJqtI X-Google-Smtp-Source: AGHT+IF7S1SingCv+4Ed9g4pIpUhVvm0HaiELuMPdnARWUMFev6gKR3QQnTXRCrwWtpdB13tatMKfaIZLsBc4pEj1ig= X-Received: by 2002:a05:690c:30a:b0:71f:a867:3fa8 with SMTP id 00721157ae682-727f3686507mr84368227b3.20.1757352344681; Mon, 08 Sep 2025 10:25:44 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Mon, 8 Sep 2025 20:25:09 +0300 X-Gm-Features: Ac12FXzEFue5B_eWFRF8lhPD0XAWcyGB23hNF68lSyeq4clH-ve5GrX-3qRADm4 Message-ID: Subject: Re: [PHP-DEV] [RFC] Soft-Deprecate __sleep() and __wakeup() To: Nicolas Grekas , PHP Internals List Content-Type: multipart/alternative; boundary="00000000000040009f063e4d7a94" From: daniel.e.scherzer@gmail.com (Daniel Scherzer) --00000000000040009f063e4d7a94 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Sep 8, 2025 at 8:21=E2=80=AFPM Nicolas Grekas wrote: > Hello internals, > > Following the discussion that started at > https://externals.io/message/128226#128456 I wrote this RFC to formalize > our consensus on the topic. > > TL;DR, this is about converting the deprecation of __sleep and __wakeup t= o > a documentation-based soft deprecation: > https://wiki.php.net/rfc/soft-deprecate-sleep-wakeup > > Cheers, > Nicolas > The PHP 8.5 RM team has discussed this internally, and arrived at the following. A full explanation of our reasoning follows. - Given the accepted RFC for deprecating `__sleep()` and `__wakeup()` in PHP 8.5, we should aim to merge the deprecation in time for PHP 8.5, i.e. before PHP-8.5 is branched on September 23. - If the RFC to switch the deprecation to a "soft deprecation" is accepted, the RM team is comfortable with landing a revert of the deprecation as long as the revert can land before RC2. Our reasoning is as follows ("hard deprecation" means the warnings, "soft deprecation" is just the documentation): 1. We cannot assume that the soft deprecation RFC will be accepted. However, if we wait until we know for certain that the RFC fails, it would be too late to *then* merge the hard deprecation. By our math, if the soft deprecation RFC had exactly 2 weeks of discussion and then 2 weeks of voting, the earliest it would close is October 4, with RC*2* being tagged October 7. 2. Since we cannot merge the hard deprecation after RC1, the hard deprecation either needs to go into PHP 8.5 before RC1, or be delayed until the next release. Since there was an RFC for doing the deprecation in PHP 8.5 that got accepted, 8.5 should be preferred. 3. Having a hard deprecation in PHP 8.5, and converting it to a soft deprecation in PHP 8.6 (or PHP 9.0, whatever is next), does not make sense. For the soft deprecation RFC to be meaningful, we would need to not have the hard deprecation warnings in PHP 8.5. 4. If the hard deprecation is implemented for 8.5 (per note 2) but the soft deprecation RFC is accepted, then (per note 3) we should remove the hard deprecation warnings from PHP 8.5. However, such a relatively large change should not be made too close to the GA release of PHP 8.5.0. Release candidates are meant to match the eventual release as closely as possible. 5. Given the minimum schedule outlined in note 1 above, there are a few days before the soft deprecation RFC could finish voting and when RC2 is packaged. This should be enough time to land a revert of the hard deprecation, given that a) the patch can be reviewed and approved before the RFC finishes, and b) the patch is likely to be just a revert of the original deprecation patches. By removing the warnings from RC2, community developers waiting to test the release candidates until after the warnings were removed can have 3 release candidates to do so. Thanks, --Daniel Scherzer, Volker Dusch, and Pierrick Charron --00000000000040009f063e4d7a94 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Mon, Sep 8, 2025 at 8:21=E2=80=AFPM Ni= colas Grekas <nicolas.= grekas+php@gmail.com> wrote:
Hello internals,

Following the discu= ssion that started at https://externals.io/message/128226#128456 I wrote = this RFC to formalize our consensus=C2=A0on the topic.

=
TL;DR, this is about converting the deprecation of __sleep and __wakeu= p to a documentation-based soft deprecation:

Cheer= s,
Nicolas

The PHP 8.5 RM = team has discussed this internally, and arrived at the following. A full ex= planation of our reasoning follows.

- Given the accepted RFC for dep= recating `__sleep()` and `__wakeup()` in PHP 8.5, we should aim to merge th= e deprecation in time for PHP 8.5, i.e. before PHP-8.5 is branched on Septe= mber 23.
- If the RFC to switch the deprecation to a "soft deprecat= ion" is accepted, the RM team is comfortable with landing a revert of = the deprecation as long as the revert can land before RC2.

Our reaso= ning is as follows ("hard deprecation" means the warnings, "= soft deprecation" is just the documentation):

1. We cannot assu= me that the soft deprecation RFC will be accepted. However, if we wait unti= l we know for certain that the RFC fails, it would be too late to *then* me= rge the hard deprecation. By our math, if the soft deprecation RFC had exac= tly 2 weeks of discussion and then 2 weeks of voting, the earliest it would= close is October 4, with RC*2* being tagged October 7.

2. Since we = cannot merge the hard deprecation after RC1, the hard deprecation either ne= eds to go into PHP 8.5 before RC1, or be delayed until the next release. Si= nce there was an RFC for doing the deprecation in PHP 8.5 that got accepted= , 8.5 should be preferred.

3. Having a hard deprecation in PHP 8.5, = and converting it to a soft deprecation in PHP 8.6 (or PHP 9.0, whatever is= next), does not make sense. For the soft deprecation RFC to be meaningful,= we would need to not have the hard deprecation warnings in PHP 8.5.
4. If the hard deprecation is implemented for 8.5 (per note 2) but the sof= t deprecation RFC is accepted, then (per note 3) we should remove the hard = deprecation warnings from PHP 8.5. However, such a relatively large change = should not be made too close to the GA release of PHP 8.5.0. Release candid= ates are meant to match the eventual release as closely as possible.
5. Given the minimum schedule outlined in note 1 above, there are a few da= ys before the soft deprecation RFC could finish voting and when RC2 is pack= aged. This should be enough time to land a revert of the hard deprecation, = given that a) the patch can be reviewed and approved before the RFC finishe= s, and b) the patch is likely to be just a revert of the original deprecati= on patches. By removing the warnings from RC2, community developers waiting= to test the release candidates until after the warnings were removed can h= ave 3 release candidates to do so.

Thanks,
--Daniel Scherzer= , Volker Dusch, and Pierrick Charron=C2=A0
--00000000000040009f063e4d7a94--