Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124174 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 qa.php.net (Postfix) with ESMTPS id 05D3E1A009C for ; Tue, 2 Jul 2024 09:52:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1719914057; bh=dvxRaRQKqJBYS8leV87jt0yYHtU+DLsqReH6uXIQObk=; h=Subject:To:References:From:Date:In-Reply-To:From; b=LcmfhwhoARo0n1fK8ihMSItKkX5VcKN1FqzXEzmOSI/6GN56rJsN3TXzNEhrKAArZ /6Z7kxfKwgKjuvMb/nPgTMC1hOSGRZXXP5YkM/EdWk5lYrl/JUVT3J/63/PQWq7yz0 P1+hS8TqCQU+pErtdC0IaWI/IYQXlvXXuMbG7fNglSwyZvWVHxVd+ro9IO89gSJPb8 wZhpYUsA87T/AMR1b0yc4a87usP0py4XxcDta0Ku+KEIIFwzpDvIqNk8Bk18/l5oBY +5lu6BTvQZNzWUmpSNHTo3BxUvXS/l1K+JBMdGxMcenFZsotyb0iny14bZA1AceY+W XoQ2nVb5dKL4g== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DF9BB1801E1 for ; Tue, 2 Jul 2024 09:54:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.0 (2022-12-13) on php-smtp4.php.net X-Spam-Level: ** X-Spam-Status: No, score=2.1 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_H2, SPF_HELO_NONE,SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) X-Envelope-From: Received: from seagreen.cherry.relay.mailchannels.net (seagreen.cherry.relay.mailchannels.net [23.83.223.160]) (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 ; Tue, 2 Jul 2024 09:54:12 +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 F28C6803854 for ; Tue, 2 Jul 2024 09:52:49 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id B2DD280310C for ; Tue, 2 Jul 2024 09:52:48 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1719913969; a=rsa-sha256; cv=none; b=uhe1RijeM6m9V2TgP0XP9sa42QvfQpC12e9SvjHpLlvvy43QLScwQo07ODkCU9mfVgQIGh +iR4zAeey//7vycYSHmjc2KCXABNJ3kKZPr+p1r/8A3vK5t255E8zKXkhIwDuOxaNSpeIW ft1v4Oc92fbwuOfANNsbxUl2943q45HTaH42xfuxuaQNYDaP1/4PGMUs0xeEXISDx43rih PDlezDd+5Qw2AbJ9ROQX2vIa5E9dQyO76pGJAsRUYU1KK7mdH4mgvU10QEcXVZshBkTcHW twvBrQnRVec5N7Ym4zRwdTEgAvjt1XVglQF+vCghgMeDZsaYCdGWDOI+sgn4vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1719913969; 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=PH/fbmYxa42V/UEDdF8SiV3UWe1iuUgEw1KK6LlEXs0=; b=Hosxej9ngVSUd2lcGaZn2KVTqH5HMlw/2IhrnPSlJf87zaz2uJ38d/HYcA9kh6PC7fnje7 R1ssfJ1QQ5Dhbmi0wRGs2I24qlT3DYDR3mt2k52IG05Z6a5iixGJu74O1nGfepsNc9DUbX PTJbZ9NnOju54uWvLXQ5B9rp9qm8NzlDYzluP5jbWPPvddaH5awmVb69URCMxc1xC+nGcn zj1wld8Dh7X8Ud/JC2MAmQeQJ5bEyY9Zpp8J8UUSgrXRY4pqC++LTmQo+p3ebHLFIfuvMX WMZgZTQZurBrTXpS9L7AAMrFEfpt2YTQQQ/nS3oIHPacUwe2OowPsSwVobOlbg== ARC-Authentication-Results: i=1; rspamd-7f76976655-rl7j7; 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-Quick-Trouble: 717e66d3738a419b_1719913969431_3382544747 X-MC-Loop-Signature: 1719913969431:93602465 X-MC-Ingress-Time: 1719913969431 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.118.105.142 (trex/6.9.2); Tue, 02 Jul 2024 09:52:49 +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=PH/fbmYxa42V/UEDdF8SiV3UWe1iuUgEw1KK6LlEXs0=; b=hKB2kVFF8zc6CTnxLUMdSYBsrM Xuj1xOaGw2N8CkOBgLfwBLdzLL5iIY6UEhwpVOYd49N1kLnwjmkbr9Kawr48j/JnfTNPEWVVqfPRm jUnUfBecjVZKKWJZMnGovLEf/jbPMhUzGC5FF/vSO7h5mAmn/iub+1LkPvuOpvgX3c6s=; Received: from [31.201.40.213] (port=52396 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.97.1) (envelope-from ) id 1sOaBr-00000002cTE-2NnK for internals@lists.php.net; Tue, 02 Jul 2024 11:52:46 +0200 Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 To: internals@lists.php.net References: Message-ID: <6683CDE4.7050607@adviesenzo.nl> Date: Tue, 2 Jul 2024 11:52:36 +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 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------000504050504090407000403" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------000504050504090407000403 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 25-6-2024 16:36, 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.4: > > https://wiki.php.net/rfc/deprecations_php_8_4 > > 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 > I've read through the complete set of proposals and have the following observations: * While a number of proposals include an impact analysis (thank you!), a significant number of the proposals don't. It would be appreciated if for those proposals which aren't removing unused/unusable functionality, some sort of impact analysis was added. * DomDocument and DomEntity properties section: the text seems to contradict itself - the proposal seems to suggest to soft-deprecate something which is already soft deprecated. Some clarification of what the actual proposal is, would be helpful. * `xml_set_object()` section: the mitigation path for this deprecation is unclear and more so, it is unclear as of which PHP version the mitigation path is available (if there are restrictions). It would be helpful if some example code was added to show the mitigation path more clearly. * CSV escaping section: please make it explicit which functions will be affected by this proposal. * `file_put_contents()` section: please make the mitigation path explicit (which I presume would be something along the lines of `file_put_contents( $filename, implode('', $data) )` ?) Other than that, I join the previously voiced objections to the deprecation of `uniqid()`, `md5()`, `sha1()`, `md5_file()`, `sha1_file()`. While I acknowledge that these functions _can_ be used inappropriately for security-sensitive code, which should use alternative methods, these functions have perfectly valid use-cases for non-security-sensitive code and the impact of the BC-break of deprecating and eventually removing these methods can, IMO, not be justified. Keep in mind that while "we" know and understand that deprecations are not errors, end-users often don't and particularly for open source projects, this means that in practice these deprecations will need to be addressed anyway to reduce the noise of users opening issues about them, which without a clear path to removal of the functions, will, in a lot of cases, mean adding the `@` operator to all uses. Regarding the deprecation of using `E_USER_ERROR` in `trigger_error()`: there are errors which should never be caught and using `trigger_error()` with `E_USER_ERROR` is appropriate for those. The fact that execution can be returned to the code via `set_error_handler()` returning `true` sounds to me like a bug which should be fixed, rather than disabling the functionality for userland code to hard exit with an error when deemed appropriate. As for deprecating the `E_USER_ERROR` constant, this will lead to a lot of guard code needing to be added for calls to `error_reporting()` as well as in custom error handler functions, when the (open source) code needs to be PHP cross version compatible. In my opinion, this deprecation proposal should be moved to a later major than a deprecation of using `E_USER_ERROR` in `trigger_error()`. Either way, these are two pennies. Smile, Juliette --------------000504050504090407000403 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 25-6-2024 16:36, 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.4:

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

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


I've read through the complete set of proposals and have the following observations:

* While a number of proposals include an impact analysis (thank you!), a significant number of the proposals don't.
    It would be appreciated if for those proposals which aren't removing unused/unusable functionality, some sort of impact analysis was added.

* DomDocument and DomEntity properties section: the text seems to contradict itself - the proposal seems to suggest to soft-deprecate something which is already soft deprecated. Some clarification of what the actual proposal is, would be helpful.

* `xml_set_object()` section: the mitigation path for this deprecation is unclear and more so, it is unclear as of which PHP version the mitigation path is available (if there are restrictions). It would be helpful if some example code was added to show the mitigation path more clearly.

* CSV escaping section: please make it explicit which functions will be affected by this proposal.

* `file_put_contents()` section: please make the mitigation path explicit (which I presume would be something along the lines of `file_put_contents( $filename, implode('', $data) )` ?)


Other than that, I join the previously voiced objections to the deprecation of `uniqid()`, `md5()`, `sha1()`, `md5_file()`, `sha1_file()`.
While I acknowledge that these functions _can_ be used inappropriately for security-sensitive code, which should use alternative methods, these functions have perfectly valid use-cases for non-security-sensitive code and the impact of the BC-break of deprecating and eventually removing these methods can, IMO, not be justified.
Keep in mind that while "we" know and understand that deprecations are not errors, end-users often don't and particularly for open source projects, this means that in practice these deprecations will need to be addressed anyway to reduce the noise of users opening issues about them, which without a clear path to removal of the functions, will, in a lot of cases, mean adding the `@` operator to all uses.

Regarding the deprecation of using `E_USER_ERROR` in `trigger_error()`: there are errors which should never be caught and using `trigger_error()` with `E_USER_ERROR` is appropriate for those.
The fact that execution can be returned to the code via `set_error_handler()` returning `true` sounds to me like a bug which should be fixed, rather than disabling the functionality for userland code to hard exit with an error when deemed appropriate.

As for deprecating the `E_USER_ERROR` constant, this will lead to a lot of guard code needing to be added for calls to `error_reporting()` as well as in custom error handler functions, when the (open source) code needs to be PHP cross version compatible.
In my opinion, this deprecation proposal should be moved to a later major than a deprecation of using `E_USER_ERROR` in `trigger_error()`.

Either way, these are two pennies.

Smile,
Juliette



--------------000504050504090407000403--