Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130767 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 DCBA91A00BC for ; Mon, 4 May 2026 20:40:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1777927224; bh=81ItTw27YX54ajKkMuF0b2ZAT82k6SgeIPe/p1HA9zk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=TVN8FUJuwo8motEpqupkSMO+W6+JBGPQKPwFicK7n+tzJuiyjWplzX3LzBh3VHn6z cay7yo1d7a5cq8xcaxmXABgHnV7mY1ihuc5B6O4DT6T6SUtpM5Qak2yGqtamTSOj6p 6SU4SNjlXzaRf8hZkw0BKxKFuJcB+/26ebOTkYRvhyJQvxh4ltxfrSCFzXSfr0CaRV waFk99CLo7LFkiIX45qqPdMFRPkbUJxU/3di88L647MxUSWp9IlA+9WYcvN7CYf5MX IoqLkG+77RfFxSU772IbKmkjGTPNps0yqW9uOO6iuA+p+QT3vcyqIs+xHNtOzxlDzq eygjCDIh1KDlA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 04245180056 for ; Mon, 4 May 2026 20:40:24 +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.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,SPF_HELO_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail.xdebug.org (mail.xdebug.org [176.126.244.128]) (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, 4 May 2026 20:40:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1777927217; bh=81ItTw27YX54ajKkMuF0b2ZAT82k6SgeIPe/p1HA9zk=; h=Date:From:To:Subject:In-Reply-To:References:From; b=dlXsjtt0yI26iuv0/QYv4l7CVylplUv5GsWDhkAi3+BPCla2d3SnfVSq5N4Q7p56c u3w7wPwz/MYQ1gXfFvXIbIpkfh3tSqNfojmy3GZLql79m57dUlCpL1l/UPoKHT/w1m ukn93WY7CpIAqvV//2Qeszcinp5XLc+AQ9u1ISV4DwTJzi6rJaM1ITMIQ05ZbVUtpn eweIDXvCzM0Vk0VbGs63Kn0sHgrVGZKR9kifunwoNzDl5HGxA70cnEZ7VcESufY7Hc N9wDNsQBN2ATAdCYp2lWRcmpxF97sc3sEaA1tNKZETCqBs3tFVMk0frMlUGOH5fgQk WQKNUpLfJ0wcw== Received: from ehlo.thunderbird.net (host81-159-85-103.range81-159.btcentralplus.com [81.159.85.103]) by mail.xdebug.org (Postfix) with ESMTPSA id F336C200D1; Mon, 04 May 2026 20:40:16 +0000 (UTC) Date: Mon, 04 May 2026 21:40:15 +0100 To: internals@lists.php.net Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_=5BRFC=5D_=5BDiscussion=5D_Ad?= =?US-ASCII?Q?d_ReflectionAttribute=3A=3AgetCurrent=28=29?= User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: derick@php.net (Derick Rethans) On 4 May 2026 21:24:39 BST, Daniel Scherzer wrote: >Hi internals, > >I'd like to start the discussion for a new RFC about adding a new method, >ReflectionAttribute::getCurrent(), to access the current reflection targe= t >of an attribute=2E > >* RFC: https://wiki=2Ephp=2Enet/rfc/reflectionattribute-getcurrent "a new static method, ReflectionAttribute::getCurrent(), that, when called= from an attribute constructor, returns a reflection object corresponding t= o what the attribute was applied to=2E" This sounds like an arbitrary new rule for just this functionality=2E I do= n't think we should have special rules for a single static method call=2E I believe it's useful to have something like this, but I'm not in favour o= f this approach=2E Would it not be possible for this to be a normal (dynamic) method on the R= eflectionAttrbute object? cheers Derick