Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:128222 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 0A3151A00BC for ; Fri, 25 Jul 2025 04:47:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1753418736; bh=uz9A9PD4+UR6DgQqOJDddNWktXxxLBAm9QJewBvjLL0=; h=Subject:To:References:From:Date:In-Reply-To:From; b=PtR9jUYlvefu2gjUdaRE25fps4C9tQonTs9og27uFT9M9xndC5JqAtiePYG2+i9ZY JEkJlst/pFv/5lvV3EvvM9M6THT5Jy5auJALcFYbc151XGvOdsJnQ9IdTiN0jmCyqH 29mVH4F0Ld36Zkuc0RTvNZ3dw9ScNlltm5WMytKR9snzKOcbvWLeZC0rmv2sH7+HFe jMdWOm70YXPkzmU/izIGHHPYJb1iXsAUNlEn4EG6H3+OYnFlhL4a0B/oaT7wKELBW+ iwKyzW8wJ1fWeWnjGWdyaJ4q9UaBTmULk3EjQjCPwjEwMIY5zaXaoD7B9tL0SYLd7y +b4cEDbaxBnjw== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DCF42180069 for ; Fri, 25 Jul 2025 04:45:34 +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=1.5 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_50, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING, HTML_MESSAGE,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from crab.ash.relay.mailchannels.net (crab.ash.relay.mailchannels.net [23.83.222.42]) (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 ; Fri, 25 Jul 2025 04:45:34 +0000 (UTC) X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 23697164424 for ; Fri, 25 Jul 2025 04:47:17 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (100-120-55-91.trex-nlb.outbound.svc.cluster.local [100.120.55.91]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 0ABBC1644D2 for ; Fri, 25 Jul 2025 04:47:15 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1753418836; a=rsa-sha256; cv=none; b=UBn5sitDRCUqE4gS/2qJpK5EiKZwx7PpTi28zeKCzTO+MFakfFRjsA6n/pHWCYb4mBhBHM ImWQGnHE30WZjRK0gONOBxlogYNIfNQm0snC5TjwErs8oJIK66kcBcdyPjpuIjgKY5xmFi WcDkLUoRHWKszFAEgxp8Y4E0sDKJkrEPZJM+FKQ8jT+KBaFKy6h1Qxd93+A1134Ol1pxpR KyiwQwAS60iJ9a1SBMJxrqWtVsvuRipqOVe1qufQt/pnz+RBCQXBO+GQpoFuEc1yQlbMtW eDPomFWpgNMzQ/XXC0F6S51JlQ5qD1PQa14ZZq2m01ptoUoliyI0dAin2hCfIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1753418836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:dkim-signature; bh=LNXAoZyZ3l+FJfCnOJqqNbKDb5EwHSkIawf/uu+FG+o=; b=2jnlS0+COw0sTTw1UY+/xI84sTYnYyGZiEOpDFScCiS+hr//vrQ1ZHW+USx47NAXYGIKvB kWrb2+9S5P3BBFiTNDkQcmiY+CgjWASzWWgP/a02StynH9LzeIHURC4CF42/6S9Mo/YSZp zXVBCpuHCqPL5MwQAVIgpdyTsaW7wGGPbiAEsKns3Y97+WbI6gm/x9ROG6ff4FuRaJySW3 BQJ3FuuLdl27t12SFeiSqJG+3kzVmp5UJplXFizSbTqsdVWNLuBGS/RooBti7F4zWlfHRh Dy1YAX9MPHuv+t7T9L80F/oJk3UvLJtLdMeDHkOV1jhv+Ge0RzVTU5mNfbMeiA== ARC-Authentication-Results: i=1; rspamd-696f8998d-k8chh; auth=pass smtp.auth=a2hosting smtp.mailfrom=php-internals_nospam@adviesenzo.nl X-Sender-Id: a2hosting|x-authuser|juliette@adviesenzo.nl X-MC-Relay: Neutral X-MailChannels-SenderId: a2hosting|x-authuser|juliette@adviesenzo.nl X-MailChannels-Auth-Id: a2hosting X-Spicy-Slimy: 5bdb4b657e3b1f3d_1753418836556_4134775476 X-MC-Loop-Signature: 1753418836556:1577153840 X-MC-Ingress-Time: 1753418836556 Received: from nl1-ss105.a2hosting.com (nl1-ss105.a2hosting.com [85.187.142.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384) by 100.120.55.91 (trex/7.1.3); Fri, 25 Jul 2025 04:47:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=adviesenzo.nl; s=default; h=Content-Type:In-Reply-To:MIME-Version:Date: Message-ID:From:References:To:Subject:Sender:Reply-To:Cc: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=LNXAoZyZ3l+FJfCnOJqqNbKDb5EwHSkIawf/uu+FG+o=; b=ZhUA3d8l3D6EJPGsEpbhWeGasp UaO8dAWMxWJgXxwRyOFkPPw/h9yQZIpokorEaO8/ZG0QiYcTo0L+Uvp6rjXnu0ilmZ9zidd1Lkivt JAfEMxeFa6SWYObsfdV4MKtsyGc/WxbcdQ8JpvdbRo/f08iT0i3q21+hLYPXWi+1n1yw=; Received: from mailnull by nl1-ss105.a2hosting.com with spam-scanner (Exim 4.98.2) (envelope-from ) id 1ufAKv-000000024hx-433O for internals@lists.php.net; Fri, 25 Jul 2025 06:47:13 +0200 X-ImunifyEmail-Filter-Action: no action X-ImunifyEmail-Filter-Info: TUlNRV9UUkFDRSBWRVJJTE9DS19DQiBUT19NQVRDSF9FTlZS Q1BUX0F MTCBSQ1ZEX1RMU19BTEwgRlJPTV9FUV9FTlZGUk9NIEFTTiBSQ1ZEX1 ZJQV9TTVRQX0FVVEggTUlEX1JIU19NQVRDSF9GUk9NIFJDVkRfQ09VT lRfT05FIElFX1ZMX1BCTF9BQ0NPVU5UXzAxIFJDUFRfQ09VTlRfT05F IEFSQ19OQSBNSU1FX1VOS05PV04gQkFZRVNfSEFNIEZST01fSEFTX0R OIFRPX0ROX05PTkU= X-ImunifyEmail-Filter-Score: 0.92 X-ImunifyEmail-Filter-Version: 3.8.16/202507210723 Received: from [31.201.40.213] (port=59112 helo=[192.168.1.16]) by nl1-ss105.a2hosting.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.98.2) (envelope-from ) id 1ufAKy-000000024gy-0jkT for internals@lists.php.net; Fri, 25 Jul 2025 06:47:13 +0200 Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 To: internals@lists.php.net References: Message-ID: <68830C4F.5020107@adviesenzo.nl> Date: Fri, 25 Jul 2025 06:47:11 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.7.0 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------010300080509060900090203" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------010300080509060900090203 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 2-7-2025 21:56, Gina P. Banyard wrote: > Hello internals, > > It is this time of year again where we proposed a list of deprecations to add in PHP 8.5: > > https://wiki.php.net/rfc/deprecations_php_8_5 > > As a reminder, this list has been compiled over the course of the past year by various different people. > > And as usual, each deprecation will be voted in isolation. > > We still have a bit of time buffer, so if anyone else has any suggestions, they are free to add them to the RFC. > > Some should be non-controversial, others a bit more. > If such, they might warrant their own dedicated RFC, or be dropped from the proposal altogether. > > Best regards, > > Gina P. Banyard > Just leaving a note here that I find it inconceivable that the fast majority of proposed deprecation (again) do NOT have an impact analysis. I've spoken up about this before and will continue to do this as it basically means a "blind vote", where voters can only rely on their own experience to gauge the impact and I expect the majority of voters to predominantly work on code which already follows a lot of best practices, which skews the vote towards deprecation, disregarding the real world impact on less clean codebases. As for the proposed deprecations themselves (aside from the fact that the sheer number of proposed deprecations is quite staggering, but that's been mentioned before), I'm just leaving some opinion here for voters to chew on: == Deprecate semicolon after case in switch statement == Opinion: Feels like an unnecessary deprecation. Side-note: The deprecation is also already flagged by PHPCS and will be auto-fixable as of PHP_CodeSniffer 3.13.3 (via the PSR2.ControlStructures.SwitchDeclaration sniff). == Deprecate attributes applying to multiple class properties/constants == Opinion: while multi-constant and multi-property declarations are not all that common (as PSR-2 forbids them), they are supported in PHP, so I don't see why it would be necessary to make them second-class citizens with this deprecation. Next you won't be able to type multi-constant and multi-property declarations.... this feels like a wrong turn. == Deprecate backticks as an alias for shell_exec == Opinion: Feels like an unnecessary deprecation unless another purpose for the backtick operator is already planned, in which case, please mention it. == Deprecate the __sleep() and __wakeup() magic methods == Opinion: I foresee this deprecation being problematic for code which needs to support a wider range of PHP versions than just the latest and greatest. These are often used to block (un)serialization for security reasons. == Deprecate using values null as an array offset and when calling array_key_exists() == Opinion: I fear this will just lead to people blindly adding type casts instead of the code being properly fixed. == Deprecate Reflection*::setAccessible() == Opinion: will probably cause quite a lot of busy-work/code churn, but I also see the point of adding the deprecation notice. == Deprecate ReflectionProperty::getDefaultValue() for properties without default values == Opinion: I expect this will cause busy-work again, for little real world gain. == Deprecate passing spl_autoload_call() to spl_autoload_unregister() == Opinion: I'm willing to bet there is at least one codebase doing this deliberately to remove all autoloading callbacks. Having said, the alternative seems reasonable enough. == Deprecate non-canonical type names for settype() == I seem to remember seeing mention of this deprecation proposal being withdrawn, but it's still in the RFC ? Opinion: I foresee problems with this deprecation as the `gettype()` method returns the long values, so it would break any code which uses some combination of `settype()` and `gettype()`. == Deprecate FILTER_DEFAULT constant == Opinion: I expect this may have a higher impact than anticipated. I also wonder if the deprecation notice shouldn't mention/suggest using a proper filter instead ? == Make $filter parameter mandatory for filter_*() functions == Opinion: makes sense, but I expect this will yield quite some busy work again. == Deprecate no-op functions from the resource to object conversion == Opinion: makes sense as a follow-up, but will cause yet more busy work to add the `@` operator everywhere these functions are used in PHP code supporting a wide range of PHP versions. --- The other deprecations either make sense to me or I have no opinion on them. Smile, Juliette --------------010300080509060900090203 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit
On 2-7-2025 21:56, Gina P. Banyard wrote:
Hello internals,

It is this time of year again where we proposed a list of deprecations to add in PHP 8.5:

https://wiki.php.net/rfc/deprecations_php_8_5

As a reminder, this list has been compiled over the course of the past year by various different people.

And as usual, each deprecation will be voted in isolation.

We still have a bit of time buffer, so if anyone else has any suggestions, they are free to add them to the RFC.

Some should be non-controversial, others a bit more.
If such, they might warrant their own dedicated RFC, or be dropped from the proposal altogether.

Best regards,

Gina P. Banyard


Just leaving a note here that I find it inconceivable that the fast majority of proposed deprecation (again) do NOT have an impact analysis.

I've spoken up about this before and will continue to do this as it basically means a "blind vote", where voters can only rely on their own experience to gauge the impact and I expect the majority of voters to predominantly work on code which already follows a lot of best practices, which skews the vote towards deprecation, disregarding the real world impact on less clean codebases.

As for the proposed deprecations themselves (aside from the fact that the sheer number of proposed deprecations is quite staggering, but that's been mentioned before), I'm just leaving some opinion here for voters to chew on:

== Deprecate semicolon after case in switch statement ==

Opinion: Feels like an unnecessary deprecation.

Side-note: The deprecation is also already flagged by PHPCS and will be auto-fixable as of PHP_CodeSniffer 3.13.3 (via the PSR2.ControlStructures.SwitchDeclaration sniff).

== Deprecate attributes applying to multiple class properties/constants ==

Opinion: while multi-constant and multi-property declarations are not all that common (as PSR-2 forbids them), they are supported in PHP, so I don't see why it would be necessary to make them second-class citizens with this deprecation.

Next you won't be able to type multi-constant and multi-property declarations.... this feels like a wrong turn.

== Deprecate backticks as an alias for shell_exec ==

Opinion: Feels like an unnecessary deprecation unless another purpose for the backtick operator is already planned, in which case, please mention it.

== Deprecate the __sleep() and __wakeup() magic methods ==

Opinion: I foresee this deprecation being problematic for code which needs to support a wider range of PHP versions than just the latest and greatest. These are often used to block (un)serialization for security reasons.

== Deprecate using values null as an array offset and when calling array_key_exists() ==

Opinion: I fear this will just lead to people blindly adding type casts instead of the code being properly fixed.

== Deprecate Reflection*::setAccessible() ==

Opinion: will probably cause quite a lot of busy-work/code churn, but I also see the point of adding the deprecation notice.

== Deprecate ReflectionProperty::getDefaultValue() for properties without default values ==

Opinion: I expect this will cause busy-work again, for little real world gain.

== Deprecate passing spl_autoload_call() to spl_autoload_unregister() ==

Opinion: I'm willing to bet there is at least one codebase doing this deliberately to remove all autoloading callbacks. Having said, the alternative seems reasonable enough.

== Deprecate non-canonical type names for settype() ==

I seem to remember seeing mention of this deprecation proposal being withdrawn, but it's still in the RFC ?

Opinion: I foresee problems with this deprecation as the `gettype()` method returns the long values, so it would break any code which uses some combination of `settype()` and `gettype()`.

== Deprecate FILTER_DEFAULT constant ==

Opinion: I expect this may have a higher impact than anticipated. I also wonder if the deprecation notice shouldn't mention/suggest using a proper filter instead ?

== Make $filter parameter mandatory for filter_*() functions ==

Opinion: makes sense, but I expect this will yield quite some busy work again.

== Deprecate no-op functions from the resource to object conversion ==

Opinion: makes sense as a follow-up, but will cause yet more busy work to add the `@` operator everywhere these functions are used in PHP code supporting a wide range of PHP versions.

---

The other deprecations either make sense to me or I have no opinion on them.

Smile,
Juliette







--------------010300080509060900090203--