Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:124277 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 A82861A009C for ; Mon, 8 Jul 2024 05:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1720415257; bh=vRXuw52EHB6UmU8Z+OmOXgwDve+tMf7DO/kcAZ5GPTg=; h=Subject:To:References:From:Date:In-Reply-To:From; b=Ue3PVbjXOd+lGbGiNpFWFUI7TmkPtQd9xlHowN4xBSdxx86VkDXJ8MoI+bwAnE1gC oBNuVbW9WroQr5n9IzWuXs6VNBSrDzBJMzRR2ykb0hBq/yPJq+oe2ShMhRE7PkWcfH nWF6P2SnNpgpe+2fE14NKJ5QBm3M1YhK1aOdHyFK9WGAMKdnMi4eeoUqSaxLvL/sC4 gAATFdjsMXhV7avcMEPPkBr6+r4tcwdzT6UoNpzRrXTbnoJ79qIwWMZzMfvBxIxPDP 5ACZw7ji9mmqKrU6xrvtJ6JbX6YX8U7e4OvZpJOWzHqCj3T1KZfpOLjOTo4Ha6BfNb HV40Tox3fWYKg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 186C7180545 for ; Mon, 8 Jul 2024 05:07:36 +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=-0.6 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, 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 aye.elm.relay.mailchannels.net (aye.elm.relay.mailchannels.net [23.83.212.6]) (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 Jul 2024 05:07:35 +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 F31969454F4 for ; Mon, 8 Jul 2024 05:06:09 +0000 (UTC) Received: from nl1-ss105.a2hosting.com (unknown [127.0.0.6]) (Authenticated sender: a2hosting) by relay.mailchannels.net (Postfix) with ESMTPA id 51FEF9454CB for ; Mon, 8 Jul 2024 05:06:09 +0000 (UTC) ARC-Seal: i=1; s=arc-2022; d=mailchannels.net; t=1720415169; a=rsa-sha256; cv=none; b=U8LdTyntj0Ccko3F3nMCjthBbqUXeo2V481Pf01ztM4IG310Gd4H1/DiAa2Uv5buRPv47g eqi2e7A2KXkMsneaApx32TgwzQv1c5LXorpI6gobczKHYiayBIEcTEsm6qeYm6YZziGFyc 29fNVk2Qa+AFAH6ic4484nedb6AK1dqEt67iG6H4CiBodjEbEnNrglz6632CVfcOmBrcT9 gOF68hujZ0lNPdQyQWM+zBE+Dm0TSDw6U/2sDoVZJlMW4CbcfG1j+LH7s3ZZmZOM20DXUA n6ReVaZgEdNYA+uaGQhwnRKFqlBiqKsk5xnNVGFonYJ0k6oen7i1xojasRJtiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=mailchannels.net; s=arc-2022; t=1720415169; 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=j4aOUSsGubu0Yl01i8MpUPzWj6yopMtkf+wHmr4Lvls=; b=XLzyTt4ods1Sdyd5D0dEvImwvkin8YphDJjbLIeBVjrS3jkuJn2mzrWoy/l/b5Zqe4Wh2c 73y+GO+Z+pheBUgzEoNRuGtjlyhU0D4QqmZsbTgASFz/6P0wJBnVodqY4KBNFxybOhCUZ0 TZPYkQdwQ7jaqP86/GAPS5bB+l8/+UdNaJOBn9Lq2qq0KO0cF/Wx0XHf6BNJrs3IU4Wy+w CtyotNrDeBGEmTOkP/VyYo3S0UbZ6uGujT7Mr3kzGzMSV3tm8PCZCjCjtR6AOeA4fUHxhl ZrYXTgnEpfqWIKKm2h2q0rNV2xUTxAf2Z2q/kWTzYeEXVRCE+mRrVNyQxSZ0mg== ARC-Authentication-Results: i=1; rspamd-7c4f8cbcf8-4xt6l; 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-Hysterical-Snatch: 50fc3b456e0fa72f_1720415169877_3438711262 X-MC-Loop-Signature: 1720415169877:231273240 X-MC-Ingress-Time: 1720415169876 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.109.88.224 (trex/6.9.2); Mon, 08 Jul 2024 05:06:09 +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=j4aOUSsGubu0Yl01i8MpUPzWj6yopMtkf+wHmr4Lvls=; b=V7eoxSWYKnNi/8tetGFwRbX3p3 St7ReR2t6sLtk2WlifSOasOhmLb3OYd5Qjvy3RVA9P06xEP4k2tqjACxB6sS0B906vBQPwnZcmWPZ fcRvJ2eLBdBVCHIS3LDi2yApn4dXz/lx3wn7XAsqW2PryExgdSfyi8tO+IDo1TPtOYsI=; Received: from mailnull by nl1-ss105.a2hosting.com with spam-scanner (Exim 4.97.1) (envelope-from ) id 1sQgZj-00000000yEw-2C8R for internals@lists.php.net; Mon, 08 Jul 2024 07:06:07 +0200 X-ImunifyEmail-Filter-Info: UkNWRF9WSUFfU01UUF9BVVRIIFJDVkRfVExTX0FMTCBWRVJJ TE9DS19 DQiBSQ1ZEX0NPVU5UX09ORSBCQVlFU19IQU0gQVJDX05BIE1JTUVfVU 5LTk9XTiBNSURfUkhTX01BVENIX0ZST00gRlJPTV9FUV9FTlZGUk9NI E1JTUVfVFJBQ0UgRlJPTV9IQVNfRE4gVE9fRE5fTk9ORSBSQ1BUX0NP VU5UX09ORSBJRV9WTF9QQkxfQUNDT1VOVF8wMSBUT19NQVRDSF9FTlZ SQ1BUX0FMTCBfRFJVR1NfTU1fRElTQ09VTlQgQVNO X-ImunifyEmail-Filter-Action: no action X-ImunifyEmail-Filter-Score: 2.05 X-ImunifyEmail-Filter-Version: 3.5.16/202406140020 Received: from [31.201.40.213] (port=51897 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 1sQgZk-00000000yEk-1lsP for internals@lists.php.net; Mon, 08 Jul 2024 07:06:07 +0200 Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.4 To: internals@lists.php.net References: <6683CDE4.7050607@adviesenzo.nl> <668B5728.40300@adviesenzo.nl> <4cf169f4-e222-4140-aef7-20eb5b871d32@heigl.org> Message-ID: <668B73B6.7070509@adviesenzo.nl> Date: Mon, 8 Jul 2024 07:05:58 +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: <4cf169f4-e222-4140-aef7-20eb5b871d32@heigl.org> Content-Type: multipart/alternative; boundary="------------020008000405050606010805" X-AuthUser: juliette@adviesenzo.nl From: php-internals_nospam@adviesenzo.nl (Juliette Reinders Folmer) This is a multi-part message in MIME format. --------------020008000405050606010805 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 8-7-2024 6:57, Andreas Heigl wrote: > > > Am 08.07.24 um 05:04 schrieb Juliette Reinders Folmer: > [...] >> >> I also don't agree that there are "more appropriate replacements >> available". >> The suggested `hash()` replacements for the md5/sha1* functions have >> the exact same functionality, which the RFC considers "incorrect >> use", so what are we actually solving by this deprecation ? Devs not >> having enough to do already ? >> The problem (for open source) with "force-replacing" the uses of >> `md5/sha1*` functions with the `hash` function calls, is that the >> hash extension was not part of PHP core until PHP 7.4, which means >> that for a significant number of open source projects, the >> replacement is not a one-on-one function call replacement, but needs >> guard code for PHP < 7.4 in case the hash extension is not available. > > From the docs it looks like the hash function was part of the core > since php 5.1.2 but perhaps I read that wrongly from the docs. > > Anyhow, a replacement could possibly be to declare a userland function > that then does the version check and either calls the respective > function directly or delegates to the hash-function. > Agreed, but the fact that it is solvable, is not a justification for adding "busy-work" when the replacement for the deprecated function is, by all accounts, just as bad/incorrect as the original.... I don't mind putting the work in when there is a good justification, but I don't see one for this deprecation. Smile, Juliette --------------020008000405050606010805 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 8-7-2024 6:57, Andreas Heigl wrote:


Am 08.07.24 um 05:04 schrieb Juliette Reinders Folmer:
[...]

I also don't agree that there are "more appropriate replacements available".
TheĀ  suggested `hash()` replacements for the md5/sha1* functions have the exact same functionality, which the RFC considers "incorrect use", so what are we actually solving by this deprecation ? Devs not having enough to do already ?
The problem (for open source) with "force-replacing" the uses of `md5/sha1*` functions with the `hash` function calls, is that the hash extension was not part of PHP core until PHP 7.4, which means that for a significant number of open source projects, the replacement is not a one-on-one function call replacement, but needs guard code for PHP < 7.4 in case the hash extension is not available.

From the docs it looks like the hash function was part of the core since php 5.1.2 but perhaps I read that wrongly from the docs.

Anyhow, a replacement could possibly be to declare a userland function that then does the version check and either calls the respective function directly or delegates to the hash-function.


Agreed, but the fact that it is solvable, is not a justification for adding "busy-work" when the replacement for the deprecated function is, by all accounts, just as bad/incorrect as the original....

I don't mind putting the work in when there is a good justification, but I don't see one for this deprecation.

Smile,
Juliette

--------------020008000405050606010805--