Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128674 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 8E95C1A00BC for ; Thu, 11 Sep 2025 16:52:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1757609443; bh=7oH2L7nU3m0IQ86psiz+x9Epksoc5wPd+UcEXHhybUI=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=HUR7ix/zOkaIiUyiS1NBfDgqpRtB+miAju56w0HNBTzSj/NgW6wk5e2LRzrWyZf5E aZxNBl4v+fKswbtKybfAZjXEEEJyWFcNhztR52AJ6Hbl5SENM7d0+ZQyuMC+Xgk6QP /Df5amJqUZDR2pjDa+87/g8Okd1PbT3wfrLzZZhgHDXsN0MhYbFBgfoqaXjOar32xO aW2GNi6IlOaUGuXcuqkBNyoEUtJq53n18KXzmDKjulQ3vFR97jnficS8bARNCZENpa tjG6BIhNO+N+3XICXZkA01FTYT0xbYRL40n8ZC09ljqe7Urwp7wouvFYHvLvlw+oe9 nV3e/CUkYdC4w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A9E9F180088 for ; Thu, 11 Sep 2025 16:50:42 +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.3 required=5.0 tests=BAYES_05,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_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-qt1-f169.google.com (mail-qt1-f169.google.com [209.85.160.169]) (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 ; Thu, 11 Sep 2025 16:50:42 +0000 (UTC) Received: by mail-qt1-f169.google.com with SMTP id d75a77b69052e-4b5f3672cf4so6686561cf.2 for ; Thu, 11 Sep 2025 09:52:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1757609528; x=1758214328; 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=7oH2L7nU3m0IQ86psiz+x9Epksoc5wPd+UcEXHhybUI=; b=O383xttuUPEq0JnYaY31MuUUQGM8ehVSlgdWN3SpsqEErM9Lk4Z4viLkyWDY2oo9wR mhKNP4Unwt/QGd2HHdV0NjksC5kkVpKDzec/rpGCf8SjK5fv8xdGgbWsAiyE81Ba5weS +Se+rgNIA5jjeoirtGGemN5n994aJf+9wT7zcnNeUQHzCd/KMjPDckq5irxOcq+DFAFM /Gi2XKH+vfcnXbhP3wKux721iq44QXPbsCkjLbhUwRZhkERRKqZqBKYojkLsF9EFwe/Z GQ68rvKT9aSL+DUBcWbzpim1QQbK+OR/IZBpTOrD556wBXPg4LEyDs2DiMPjbwDpSl9f y+lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1757609528; x=1758214328; 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=7oH2L7nU3m0IQ86psiz+x9Epksoc5wPd+UcEXHhybUI=; b=YD1sgr/Khs7e5M4r0q+i0FX963aVKi7Gzu+Mb7lsO6PBigf1lf+obN60F4rcAxJ0xH SDoCU55EhUF8+jBdnNU6a1g0kJoH0u8ipydpzL4S7hTeOGps/xqwYKtFnwdTxo9RPfWu WAk6yeNsmf6wIjlhBY17KZ05XIT3Zf+1dtA/5/63Zy9x8VSYACqRAFTuvo69zK/2yf4I VZxP9gkcZ2six1RuvAPOTkZdO8NEG1svA+xglc6FZB+gzuPQp+YltrAIv/6iDREdXcYu IFrzyh4r8msaKID8x0AFwe0Qym3I1QwH7PR1RyspzoNh9SBPklL3LmtKcjCMatjiRB8H iQSg== X-Gm-Message-State: AOJu0YzSx9P0/vmY+Bc5k2OqyUEE0iQboQFJO2YrHvlpaKqpqoN1pq5R BnH58KmcKvJCOLehgmm6IEEjT0WGW0LnuFjglnA8oKdYM4MPEdJW9hTuyUIjCi3E8/LXaC5YCby 8Uqix08uu5oxe3A4SZDNcB+brRV9RK4E= X-Gm-Gg: ASbGnctF37hyWnAzp45/TI867poVSISRbhagdgryDpn9ij8/YDbygPsLpNohX2EzPd6 zanLOrbWWAVYFKk/KdGbsKTHcg1wgcx2p1Xad2sF4+sRYCzS42FvytS3nGilhP/rqHRrg5D5Bfy pl5yJ3NuqAZ6Tw/A//U4IF5Aet45Wf3zafyyqSJohqtwl3VdW3/zsh+rKPs79csFsFWRZ/gzyeF f+HQctdyOuNmLEnig== X-Google-Smtp-Source: AGHT+IEU/R0AYSqfX/trtbjMvCPbFVvHwT2xubGy7YPGtdbTgo1uJkwT+gljVbJfQtVf0UHead5jPj+s8Uikb0YFtds= X-Received: by 2002:ac8:5f0d:0:b0:4b5:e9e3:3c94 with SMTP id d75a77b69052e-4b5f83902demr202357021cf.9.1757609527493; Thu, 11 Sep 2025 09:52:07 -0700 (PDT) Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 References: In-Reply-To: Date: Thu, 11 Sep 2025 18:51:55 +0200 X-Gm-Features: Ac12FXz2KD0ixsDM1Zk-jIVymdwKWS-lulzDP27gp5ObZBkQjoQy6u2FdYl9VAQ Message-ID: Subject: Re: [PHP-DEV] [RFC] Soft-Deprecate __sleep() and __wakeup() To: Daniel Scherzer Cc: PHP Internals List Content-Type: multipart/alternative; boundary="0000000000008a47df063e895be4" From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --0000000000008a47df063e895be4 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Daniel, Thanks for the update. Le lun. 8 sept. 2025 =C3=A0 19:25, Daniel Scherzer a =C3=A9crit : > On Mon, Sep 8, 2025 at 8:21=E2=80=AFPM Nicolas Grekas < > nicolas.grekas+php@gmail.com> 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 >> to 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 woul= d > be too late to *then* merge the hard deprecation. By our math, if the sof= t > 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 unt= il > 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 sens= e. > 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. Relea= se > 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, communit= y > developers waiting to test the release candidates until after the warning= s > were removed can have 3 release candidates to do so. > The interesting thing with that approach is that all libs that do test with php-src dev-master will see the deprecation, so at least some OSS maintainers will work on addressing this as we speak. This might give useful hints about the impact of the deprecation (like the feedback from Sebastian on phpunit, followed by one from Thomas stating this resulted in a perf issue). On Symfony, we have 3 branches maintained: the next major is already free from sleep/wakeup; the next minor has BC layers that look like the ones presented in the RFC; and the next patch-level is not free from the deprecation: we addressed throwing/internal/final cases and chose the option to silence in the CI instead for the complex cases. The CI is still not green: dependencies will have to be patched also. I've no idea how much time this will take. But I know it's a significant effort - way more than usual for a deprecation! As a corollary to your message, I'm wondering what would be the earliest we could open the vote? Our policy on the topic says: > There'd be a minimum of 2 weeks between when an RFC that touches the > language is brought up on this list and when it's voted on is required. > Other RFCs might use a smaller timeframe, but it should be at least a wee= k. Should it be one or two weeks? The earlier the better for everyone I think (I don=E2=80=99t expect to conv= ince Tim either way, so from my side that part of the discussion is done. ;) ) Cheers, Nicolas --0000000000008a47df063e895be4 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Daniel,

= Thanks for the update.

Le=C2=A0lun. 8 sept. 2025= =C3=A0=C2=A019:25, Daniel Scherzer <daniel.e.scherzer@gmail.com> a =C3=A9crit=C2=A0:
On Mon, Sep 8, 2025 at 8:21=E2=80=AFPM Nicolas Grekas <nicolas.greka= s+php@gmail.com> wrote:
Hello internals= ,

Following the discussion that started at https://e= xternals.io/message/128226#128456 I wrote this RFC to formalize our con= sensus=C2=A0on the topic.

TL;DR, this is about con= verting the deprecation of __sleep and __wakeup to a documentation-based so= ft deprecation:

Cheers,
Nicolas

The PHP 8.5 RM team has discussed this inter= nally, and arrived at the following. A full explanation of our reasoning fo= llows.

- Given the accepted RFC for deprecating `__sleep()` and `__w= akeup()` 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 s= witch the deprecation to a "soft deprecation" is accepted, the RM= team is comfortable with landing a revert of the deprecation as long as th= e revert can land before RC2.

Our reasoning is as follows ("har= d deprecation" means the warnings, "soft deprecation" is jus= t the documentation):

1. We cannot assume that the soft deprecation = RFC will be accepted. However, if we wait until we know for certain that th= e 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 depreca= tion 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 doin= g 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 d= eprecation 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 th= e hard deprecation warnings in PHP 8.5.

4. If the hard deprecation i= s 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 e= ventual release as closely as possible.

5. Given the minimum schedul= e outlined in note 1 above, there are a few days before the soft deprecatio= n RFC could finish voting and when RC2 is packaged. This should be enough t= ime to land a revert of the hard deprecation, given that a) the patch can b= e 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 w= arnings from RC2, community developers waiting to test the release candidat= es until after the warnings were removed can have 3 release candidates to d= o so.

The interesting thing= with that approach is that all libs that do test with=C2=A0php-src dev-mas= ter will see the deprecation, so at least some OSS maintainers will work on= addressing=C2=A0this as we speak.
This might give useful hints a= bout the impact of the deprecation (like the feedback from Sebastian on php= unit, followed by one from Thomas stating this resulted in a perf issue).
On Symfony, we have 3 branches maintained: the next major is alrea= dy free from sleep/wakeup; the next minor has BC layers that look like the = ones presented in the RFC; and the next patch-level is not free from the de= precation: we addressed throwing/internal/final cases and chose the option = to silence in the CI instead for the complex cases. The CI is still not gre= en: dependencies will have to be patched also. I've no idea how much ti= me this will take. But I know it's a significant effort - way more than= usual for a deprecation!

As a corollary=C2=A0to y= our message, I'm wondering what would be the earliest we could open the= vote?
Our policy=C2=A0on the topic says:
There'd be a minimum of 2 weeks betwee= n when an RFC that touches the language is brought up on this list and when= it's voted on is required. Other RFCs might use a smaller timeframe, b= ut it should be at least a week.

Should it = be one or two weeks?
The earlier the better for everyone I think = (I don=E2=80=99t expect to convince Tim either way, so from my side that pa= rt of the discussion is done.=C2=A0;) )

Cheers,
Nicolas
--0000000000008a47df063e895be4--