Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127936 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 E88A41A00BC for ; Mon, 7 Jul 2025 15:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751903234; bh=+9+qvT0ubM6+ygYAMrVUuX64/Aj8IQDAE+A6vnv8JC8=; h=Date:To:From:Cc:Subject:In-Reply-To:References:From; b=IaO0wXZfHg0QG23VJ81woJHHv/iOSUKuX6hjZ6Mds+fWwBz+n9VHewNzzn2NJJ3tv yKUVHSHdTmgwtjEd5QyKsR2lcPHaxp89RAU3lXHyBcShQDJUJzry6j4PcbP+k17xRY om0+fBTNtjQWU+8oirB6oTXGw3QzS25ivYb8IfpFQl2FhHxLTK39GPv2ixhHhicob9 GGkDRGZ/J9P13sXMUm0LqgTu04fnR98EPfTlI1qzS4mZeUdiLrg5nGvpSKSHFDE4sF uIAwlEwurRatpaaXIMY0fnD3MUks2hhW3hNpcb7+XTIMpmzO1QtKz5X/Yem+D9QIQU 7kceugBlkkE7w== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AEDE81808D4 for ; Mon, 7 Jul 2025 15:47:12 +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=-3.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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 mail-24422.protonmail.ch (mail-24422.protonmail.ch [109.224.244.22]) (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, 7 Jul 2025 15:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gpb.moe; s=protonmail; t=1751903339; x=1752162539; bh=+9+qvT0ubM6+ygYAMrVUuX64/Aj8IQDAE+A6vnv8JC8=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=TsoJmpY1nQWwuqsXyPq/1c6YGWeo7lPc23VgqBxIAl0vVTgEyW10CwhMr/MnhGhCM Z4/BcP7/IxdYUptXwfXAZkkn9nHthUju+igR5D0KB6YCMKyTDg0cEw4tp7XtyH90N/ dhnCGfKq8LcnRXCWtW9sArXk6k3S88PbiCeDfSRHar6FfhM60CYW/qv/h78ekpTclu ByZ3gRC4vrqIkc4dWTNP5Mh4VmowjKYCCfKmnl//cmXOpJU+D1h8ZtpJKuKbLKSVhR +JXtu8BHCFpKuZtLi9oKvuIZJZtx8DT9TkqjzcwuHcOUTNOESGgFqtMBW5FLzuKmkC P+0TowfQFlU6A== Date: Mon, 07 Jul 2025 15:48:55 +0000 To: Niels Dossche Cc: internals@lists.php.net Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 Message-ID: <1yx0GE3X9ysln_bTni-MXXWHDPtPXcmPKaO6bySOiGjkjyFCMCB_wKz67XuEt_sifpZC63kkzreaNt4Trlrpir4MKRCgfkBV0X00cvQq1dA=@gpb.moe> In-Reply-To: References: Feedback-ID: 96993444:user:proton X-Pm-Message-ID: c0bf92c97bc78f6bb6a29cbe3a147beb6462147b Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: internals@gpb.moe ("Gina P. Banyard") On Friday, 4 July 2025 at 08:04, Niels Dossche wr= ote: > Hi >=20 > First of all, that's a huge list of deprecations and I think we should to= ne down on that. > Especially if a feature still has a purpose and is not harmful or buggy, = then we should probably consider not deprecating it. The list of deprecation being "huge" is a consequence of more people workin= g on php-src. We previously also had "large" deprecation RFCs like the one for 8.1, with = some deprecations dropped. See: https://wiki.php.net/rfc/deprecations_php_8_1 Moreover, "harmful" is very much in the eyes of the beholder. > Secondly, I'm tired of having to deal with useless deprecation messages. > A lot of deprecation messages are completely useless for developers becau= se they do not point to a reason or a replacement. > That leaves you needing to look up the documentation, which is also incom= plete. > See https://github.com/php/php-src/issues/14320 > Therefore, any deprecation proposed in this RFC that does not explicitly = list the deprecation message, I will vote no for. I have added the deprecations messages for my own proposals, but I don't see this as a valid reason to vote against one. The deprecation message is very much an implementation detail, and we shoul= d be able to improve it at any point. This is also *much* easier now that we can use the #[Deprecated] attributes= on the majority of internals symbols, as that was one of the major limitat= ions. > There are some things in the list I don't care about or I don't have a lo= t of insight of its uses in, and I will abstain for voting on them. >=20 > There are a few things I will vote no for: >=20 > [...] >=20 > * Deprecate using values of type null and bool as array offsets and when = calling array_key_exists() > Deprecating this would make the language more inconsistent by allowing th= is on array offsets but not on the function. I am slightly confused by what you mean by "allowing this on array offsets = but not on the function". However, null is not accepted by functions that accept scalar types, and bo= ol would neither if my other RFC is approved. Moreover, a type declaration of int|string accepted Stringable objects, how= ever array offsets do not accept objects at all. > * Deprecate _debugInfo() returning null > Weird, especially as the docs say the return type is ": array", but not h= armful. Again, harmful here is very subjective. But as this is not my proposal, I will not comment further on it. > [...] >=20 > * Deprecate passing spl_autoload_call() to spl_autoload_unregister() > This is very ad hoc, and as Ilija pointed out, we can't prevent workaroun= ds for this. So what's the point really. > The behaviour may be weird, but notice that people won't do this by accid= ent. As replied to Ilija, and as Tim already mentioned, the workaround do NOT be= have the same way as passing the function directly. > * Deprecate passing null to readdir(), rewinddir(), and closedir() > Dubious but not really harmful I think. I disagree that relying on implicit global state is not harmful. > * Based on Derick's comments I will vote no on the ext/filter deprecation= s. I was already going to vote no on the filter* functions though. I have removed the functions anyway, however FILTER_DEFAULT is an incredibl= y problematic name, and not passing a filter is also problematic, so those = remain on the RFC. > * Deprecate driver specific PDO constants and methods > Too early. I disagree with too early as the migrations for the constants is extremely = easy and can be done by tools like Rector (or hell even sed if you feel adv= enturous) and the methods are effectively a hack on the PDO class which is already we= ird enough. Best regards, Gina P. Banyard