Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127922 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 44DC81A00BC for ; Sun, 6 Jul 2025 17:16:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1751822068; bh=kqZjemNRmMP0VuKyXs9PqBYmKV1lcI8V/6vvEsXb+W8=; h=Date:Subject:To:References:From:In-Reply-To:From; b=bWgZ3VibxTYsT8CIM5lfW1mMa353J7vRq5taPWIq/FlAoV3VgMAwZgi+cGzFag4LR A42EC2XPueU/wz69RbH/h3NC3FjxZ6eXZZ9zL9Wsnmya9BzCn3xYcfJXcqiTQbrRTM dOqSFvkho5eSbO7SMYv1Lp35Gy96uDo019UREo6sfcv9zlWIUfvBFpptbhw2ULrWRB Y26X5GQNvYwAXXf8qXTC/iazg20bynGCYLv2NaLamDM7ljctHFxQhGU8BHvMs7z1OB o/2KpVzQiYJldlXmB/7UbFFqrKcMjgKJzVcTDPBHiU16HjslIF4LMG19UBofEO2MMf XXwU4FQzUiZQg== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id DFF081801D7 for ; Sun, 6 Jul 2025 17:14:27 +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: Error (Cannot connect to unix socket '/var/run/clamav/clamd.ctl': connect: Connection refused) 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 ; Sun, 6 Jul 2025 17:14:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1751822176; bh=lVlj7KTXIQfi+wxhxr1Nh3KHWc/DZjtaG2fJQcphtAo=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=Kj+LjYPLsrdjAgklWBv9NsB6s7pJblwNbwv+cUWc3F2IN9yfsb+rzYCGbP6pE1IXn aP2Flvkmu7L0uuvMD1eBm6J0YQoo4s+Meh2XyFODIa0br2jQLzDENVfMAUrhQRNzE+ c2DVXoNW/Vl4A0oRUCXB62Eif+Bu/zUHf/beGE9548tBJ+jzMknja/cqxVvPOXwkP8 U3B+XGtbWdHB/Vgxku1mGWQnDklJ2K8RnGxxbefbMg7J3+bEU/alDDhvPIsoCToV0p PLvLjhSl32xGdkcJqXQsFWRRwNAGei1Ykij+Cp5Elmwn+c/95rhRk2CTFNPhPQKL6I oZzUPzXeWd7+w== Message-ID: <0b5a9e16-9b1e-400f-a092-eb5937a8c823@bastelstu.be> Date: Sun, 6 Jul 2025 19:16:16 +0200 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 Subject: Re: [PHP-DEV] [RFC] Deprecations for PHP 8.5 To: Bob Weinand , internals@lists.php.net 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 7/6/25 19:00, Bob Weinand wrote: > Let me disagree with this. Yes, a deprecation in *itself* doesn't break > running code. However it is both a) an annoyance (you want to get rid of > deprecations) and b) a promise that it will be eventually broken. Yes, I understand that a deprecation *usually* leads to a removal. Nevertheless I found it important to point out that the deprecation itself is not a breaking change, since it is a common theme that folks incorrectly claim that "PHP X.Y broke my code", when it's just some deprecation messages being emitted. The deprecation allows you to fix the issue at hand at a pace you are comfortable with. As an example, if the code in question is in the process of being replaced anyways, then you don't need to do anything. From my personal anecdata: I'm fixing deprecations right away and the only painful one I'm remembering in the recent years is https://wiki.php.net/rfc/deprecate_null_to_scalar_internal_arg. For this iteration, I'm likewise expecting most of them to be easily handled with the existing tooling (IDEs, Code formatters, …). Also, even for PHP 8.4, where the proposed deprecation of `uniqid()` (and others) specifically said that there are *no plans for removal* (https://wiki.php.net/rfc/deprecations_php_8_4#deprecate_uniqid), folks considered the deprecation warning alone to be an inacceptable breaking change. > And there's not always a point in breaking real code for the sake of > "this might be potentially confusing". Yes, the amount of possible confusion certainly needs to be weighted against the amount of usage. As a rule of thumb, I'd claim that the more commonly a specific syntax is used, the less confusing it becomes, since there are more references in the wild for folks to come across. Best regards Tim Düsterhus