Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:127309 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 0B0F11A00BC for ; Wed, 7 May 2025 19:37:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1746646513; bh=vNDBhcWOGG/YU+Wmnut4yw3UJXXEMcMrd/cuxHtRCsk=; h=Date:From:To:In-Reply-To:References:Subject:From; b=aaEVaV8lMkJGF0h4/uDnn0SHTI9OJpMPYHCTZzbcQzOHVBZZk64YjQPNIptn8RKDV mA74mW9KAvS3hHCOtwUxRLYxpKWBntBVe6wgEP68eEBPkpq69pZ1JolXX/tdYWFpeW hKTBjcuz+Km5Y+ap9P09jpu7nLFNZP7YjZkQ2YQAvhDv37RIt3nA9mOkiqX4Ra+gPY vW25uE1m17G6sG2kP65uc1aUvXxZZErfnJj77xtO6sGM7DH2CJ7vmUu3Pukp9x1aN8 SH+y+ktnKnrK4VswFR6735/y9ecwJVrQKxItZeMhCez8UHLdFXmNlFdgalakGPyTm4 Pd0fc0QlmISdQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 3632F180057 for ; Wed, 7 May 2025 19:35:12 +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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_NONE 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 fout-b3-smtp.messagingengine.com (fout-b3-smtp.messagingengine.com [202.12.124.146]) (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 ; Wed, 7 May 2025 19:35:11 +0000 (UTC) Received: from phl-compute-10.internal (phl-compute-10.phl.internal [10.202.2.50]) by mailfout.stl.internal (Postfix) with ESMTP id 3AF9D1140106 for ; Wed, 7 May 2025 15:37:25 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-10.internal (MEProxy); Wed, 07 May 2025 15:37:25 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= garfieldtech.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to; s=fm3; t=1746646645; x=1746733045; bh=wAmpYZHwiA5+3/IQJp9uk 7S7wbxj/rY1+EBQ1Q/qmnU=; b=TOCLmJSA06c0RXs0V2gQVPR43ZybpsPUdShcL bHC6kjZKQKczqMgotcH4JY8vzfEWH5AnjqNGxCypIEPuS718VMWfxdfFgncxpH6S TSyvezTUAmS2VbvlQvF1chpgnOae8WVn8K0sil3ezeHXKIXpdBU7O171V+tAbYdL XNOT2FuW/SoSUDH728lIDHPa286jKW7WBg80OVrdxfoFy6spkre9gGVGQpOL1XwR JkmGUkdcGXazHPxV5CV5S+KZZj0fymCti0Fz7f2ouL18hA8uRKLqdlswbwbfZ6yK jlbrz08ukrIE1Nnck+sEs8j6OMu6D8GYOsHzpEJv/RZB5ZLGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1746646645; x=1746733045; bh=w AmpYZHwiA5+3/IQJp9uk7S7wbxj/rY1+EBQ1Q/qmnU=; b=QI6pubxkNWOMfXJZE Ent8udcaLoYYKba1fq7rHNn/SEJkg0bqjYf42YrWU9Z7W5zFw1lq+iRW2WXXHCm2 5yxpWYrCM6S+En21Q6A8IdTvanNNacDfeK650xfD+2t8ukNA6kc9Ky+JnXPVmYZ7 9uylTFn1PYKDHtm6ayvLTG6B+rBk1PZ0pZBeiozF4P0Fbn92tHIjmWQAJESErSYL V4YFwVB8hFtTSvbtaWWrJPyvtW+4PiPvk9Z3NCM1YmTHFdL6RuWO0kzN0IitK0Sb Tr+YFFFm1QMBzdxOnUkFlxuLXd99aqiJPMrwqEePrhImVw9kOgiQupQaa+M0fmrO cJZzA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgddvkeejjedvucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggv pdfurfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpih gvnhhtshculddquddttddmnecujfgurhepofggfffhvffkjghfufgtgfesthejredtredt tdenucfhrhhomhepfdfnrghrrhihucfirghrfhhivghlugdfuceolhgrrhhrhiesghgrrh hfihgvlhguthgvtghhrdgtohhmqeenucggtffrrghtthgvrhhnpedtffdtfeetvdeuieeh vedtveektdegkeeujefgtddtjefftddtgeejgeefiedvjeenucffohhmrghinhepmhgvug hirgifihhkihdrohhrghenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgr ihhlfhhrohhmpehlrghrrhihsehgrghrfhhivghlughtvggthhdrtghomhdpnhgspghrtg hpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepihhnthgvrhhnrghl sheslhhishhtshdrphhhphdrnhgvth X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id C52A2B00069; Wed, 7 May 2025 15:37:24 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net x-ms-reactions: disallow MIME-Version: 1.0 X-ThreadId: T55aa9624a8f11e1b Date: Wed, 07 May 2025 14:37:04 -0500 To: "php internals" Message-ID: <006dd0fd-06ca-4339-a6a2-3897926512f4@app.fastmail.com> In-Reply-To: References: Subject: Re: [PHP-DEV] Initial discussion - more deprecation options Content-Type: text/plain Content-Transfer-Encoding: 7bit From: larry@garfieldtech.com ("Larry Garfield") On Wed, May 7, 2025, at 12:50 PM, Daniel Scherzer wrote: > Hi internals > > I'd like to start off some preliminary discussion about expanding the places > that `#[\Deprecated]` can be used, and more widely how userland code can have > the engine trigger deprecation warnings (rather than just manually calling > `trigger_error()`). This is intended to be a follow-up to the addition of > attributes on constants - it is now possible to use attributes so that the > engine emits warnings when > > * Calling a function or method > * Accessing a class constant > * Accessing a global constant > > My inspiration is MediaWiki's "Stable Interface Policy"[1] - there are some > things that MediaWiki (and other libraries) may want to deprecate, but that do > not trigger deprecation warnings, or require work-arounds to trigger them > manually with `trigger_error()`. Specifically, I want to get the community's > thoughts on adding ways to > > * Deprecate `use`ing traits > * Deprecate extending a class > * Deprecate overriding a method > * Deprecate implementing an interface > * Deprecate accessing a public/protected property > * Deprecate class aliases (maybe a new way to declare aliases with > `#[\ClassAlias]`?) > > Having learned my lesson from the never-parameters RFC, I want to get a sense > of support/opposition before spending time on the implementations. I also want > a sense of which parts would need individual RFCs, and if those RFCs would be > welcomed without first providing an implementation. > > - Daniel > > [1] https://www.mediawiki.org/wiki/Stable_interface_policy I am in favor of expanding the deprecation attribute to more places. I believe the ask previously (when the attribute was first introduced) was to keep it in sync with C-level deprecations. Viz, being able to deprecate an interface should be added for both C code and user-space code at the same time, so they're parallel. I think that is a reasonable requirement, and any RFCs on the topic should follow that recommendation. RFCs can be proposed regardless of implementation status. Technically the rules allow the to be voted on and even approved without a patch, but I believe that is generally regarded as uncooth, at best, as implementation details can often dictate design. (Absolutely true for much of the stuff Ilija and I work on.) I think the de facto rule is probably "you can talk about anything, but don't call a vote without at least a mostly-working patch that people have reviewed." --Larry Garfield