Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128461 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 1D7551A00BC for ; Wed, 13 Aug 2025 12:33:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1755088328; bh=W3l7vHE1LMPgAzLjs85tkyfzGJYNKh9TL7uelJJCYcc=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=WkDYEtbMYTMG0yjKMA3y3XQk5pm+4VC2RgdTuDeyG69O6cRyckwxTGIJ4LleLSp6q XwIUK/KiOJEH7tndg9t5cqW253duSbaO9Jy0MST/5QY+Ntl6DXRsL+GFVh4//uq1wJ jlU68Ad+5eYVIJ/WKIQp8PPyW4tFyM0KHyI8WKcFudbndZLaZpvup/H9JrLbVggInO w9ktodt5pYDpQwxRcTltS1XZH8KfuZfey7LNcx5LHNXUsEh4TqCTHHQaX7pHebkJPg GyzdNxInwVdeEPPnaF3b5W/AkL+c2lXCBZW1+c3x+QGlvvRG4DMt0aSl+Aq6EUfwHH b9zcK3O03KLoA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 87B1C180040 for ; Wed, 13 Aug 2025 12:32:07 +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=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from chrono.xqk7.com (chrono.xqk7.com [176.9.45.72]) (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 12:32:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1755088422; bh=mqmiwJ/pat18gGSqqyzn4oSH4reonj3SP9uN/XNVFE8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=m2m6Kmc9wDF909O0Iwh60BY+F91n68V2blS6osaQY61LNyEnObpCFxC4ZH5Yf3tvf HxdyptMcYS8Bv+mnh0AlnPO//EkO1cLUmdwgt46/i7tiflUY2pbVWcn0rqhwcaGBXd NF5MkvXr7BeuzXmTJAlaw91IbDuWnXUHBoTzM7FQw1ZtFOEWPXXLr5M+IYH/iV9DN0 S9jHqlmtZnjw2mhNR2ObaL09y1d5mGpTYu2Kbys86EK5h0aCDfC/V9coHsP/LqNsyF 9JhZUM6QmM2saKjauAQXKeQ+Zzb+6t85MGL1L5933gEGjns7+QzfN7z9Vy6mVsxcM2 v69Klo/DUOrPA== Message-ID: Date: Wed, 13 Aug 2025 14:33:39 +0200 Precedence: list list-help: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] [VOTE] Deprecations for PHP 8.5 To: Nicolas Grekas , Kamil Tekiela Cc: "Christoph M. Becker" , "Gina P. Banyard" , PHP internals References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit From: tim@bastelstu.be (=?UTF-8?Q?Tim_D=C3=BCsterhus?=) Hi On 8/13/25 13:58, Nicolas Grekas wrote: > I wish we had some process to revert that decision. Now is the less costly > time to do it, even if it's already late. There is always the option of ”not implementing” the decision. Reverting would mean another RFC that would also require a 2/3 majority. > The discussion period failed to raise the points made by Jakub in the PR ( > https://github.com/php/php-src/pull/19435) and failed a serious impact > analysis IMHO. > This should be enough to raise a flag and allow us to reconsider. > I wonder if people that voted in favor of deprecating __sleep/wakeup would > still vote the same now? I already participated in the PR discussion and having slept over it, I think it would be helpful to consider both __sleep() and __wakeup() separately in this discussion of whether or not to actually follow through with doing the deprecation. As I've mentioned in the PR, `__sleep()` is actually broken when inheritance is involved and there's also a trivial way to implement `__serialize()` while preserving compatibility: public function __serialize() { return get_mangled_object_vars($this); } So while this one might result in some amount of migration work, it's reasonably easy to do. `__wakeup()` on the other hand is not broken and migrating to `__unserialize()` is non-trivial. So deprecating `__sleep()` with PHP 8.5 still makes sense to me. For `__wakeup()` I don't have a strong opinion either way and I've also intentionally abstained from voting on this deprecation. Best regards Tim Düsterhus