Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:126109 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 C73CF1A00BD for ; Thu, 5 Dec 2024 20:57:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1733432038; bh=l/NyvaYEjKW143GmLSpmg8tHEwEC4nwlpYJDxn974TQ=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=A79Q9Z6g7gcy8+hgQmwwIgUg1rYTSL4K2fHWfPOm7K871pHTEpJo8bGcysVhtAsor t7Unu20RwLmG5XyzVzqXnve5odaTugs8GK9NyyhVIY5wbylEqU160kwTldYrDTxloF AjYbaKIhpiJDnbRi8FpmpErSdRNEC7rZ+aFpWGqlzJlIRPNvflMOwVDcB/+7VLS8P1 hRndcb5eQCYEM90r5gEO0iOYY7jwXTc4++c5+AWajfShTiT2gb7T1NRIRJjc+SBsje 2/ZLRUwT4ROpidUutKQ7RFV2jhWgxbbhJ6y6vvXRHemvTwlL+xMhbgVZChGcv4P0la ZAWZEROsfEBwQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 0DDC5180056 for ; Thu, 5 Dec 2024 20:53:57 +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=BAYES_50,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.0 X-Spam-Virus: No 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 ; Thu, 5 Dec 2024 20:53:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bastelstu.be; s=mail20171119; t=1733432221; bh=cpfTGKgtPvOD/Gu7uNVpcdl1J5GoE18O+pH52jXPL0g=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type:from:to:cc:subject:message-id; b=oYAfl4/isJ/BNJR0BuLFiNXytIqgVJ0ZI7RTe1TH9gMxEChPuNJUz1mNj4MICSs75 ipoVVXdF0UZmOjKXMFD45XbMzIQbJUkJTSoMrKZXgop/hI/FRA/XcisDb0jZXcnP7i GApWoCk05b2Vl5VcFYfxbXwZWktP10zBGST1+uig4ZwNIPmGLALcvEDNyztQ84mCIt efNLwXwguGv1gvD+pgt5tYBGUah7brIu1bhbd3hANRVvTx6+T7VhKsvgbYLKa3OMY7 HlWXxPTpqBAASnG6YRpuSuQk/9IFdhaCLUXksKI+ewPUW7EZJJ+AUW8vx+dljeU2C+ VlmpC6iQz35kQ== Message-ID: <3504447f-009b-497b-a0f3-6fb1670ab410@bastelstu.be> Date: Thu, 5 Dec 2024 21:57:00 +0100 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] [Discussion] Attributes on compile-time constants To: Daniel Scherzer Cc: internals@lists.php.net References: <175e84d9-5568-413b-ab1c-57d8959adf06@bastelstu.be> 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 12/3/24 15:40, Daniel Scherzer wrote: >> This is not just extensions, but also userland code that did not >> anticipate any new attribute targets. >> > > Given that > 1. there isn't (as far as I know) a way to search for everything that has > an attribute > 2. there isn't a current way to identify if a constant has an attribute > > I didn't think there was anything to actually break for userland > attributes, but I've reworded the note to include userland attributes just > in case. Here's an example of a userland library that collects attributes as a “build time” step: https://github.com/olvlvl/composer-attribute-collector If that library is updated to understand attributes on constants and a user applies a TARGET_ALL attribute on a constant, then this case would apply. Even if it ultimately is “just in case”, it’s nevertheless helpful to spell out all possible caveats for the reader to make an informed decision about the RFC. So thank you for the update :-) ------------ With the updated version, I don't have any further comments about your RFC text. Best regards Tim Düsterhus