Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122968 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 D5DFB1A009C for ; Fri, 5 Apr 2024 13:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712324845; bh=k1m+0wo2ZOQqbqFerX883oVA/v7i4jf6fNW2+6OmZ5g=; h=In-Reply-To:References:Date:From:To:Subject:From; b=avAgp/asfCbZxaiwxfvN/UA3JRZoKbujf40/dMWOMJLGFb97Jw9/bpnSZl0OeA68Y TbWNBAThM0Ney8TyyX/yaygueoDR2PgOpBOYAF9YQ4cRBFaraIVEjnCH2zcQSXCR9P mCPq1AjlQF+jVlWCXlLYWHoBzXYicARjGBqv+evMSJV5crHV2po4OSnBK3wgvyaqjS OC0MvtZ8aKz4O0MKieai0FmZ1KNMgbJf25TSV0NTZucbAN2d1pFBKtz3NgaLpJiYsH wq9/+0KVF4vZddsoGV87ec67gI5p+nppxlRGHibbZzZREbFUHaAs/yTkUXMYxwESjs baLxxpgkKjJ/A== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id A2ADF18006D for ; Fri, 5 Apr 2024 13:47:23 +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.1 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) (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 ; Fri, 5 Apr 2024 13:47:23 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 243E05C008D for ; Fri, 5 Apr 2024 09:46:52 -0400 (EDT) Received: from imap50 ([10.202.2.100]) by compute1.internal (MEProxy); Fri, 05 Apr 2024 09:46:52 -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=fm2; t=1712324812; x=1712411212; bh=s8gTNozCH/UZgY9jPvJUM 6rjNHLIuTHOMqqr/cQ5EgM=; b=P79ws9mWj6jGkzaqnah6CqSQtHXgsP2G5Z8YE QRFU1fbLPvFQ3Y6aex3Mtm+9R5KRwHVk4VQVBXpfK0JSnxsTFYaCaged6Abz/xPE /AmdP5URxvcGhsDjvEEpte/MXu07ZYgDhaD4qGzXpltA6fPpZgqxJ7D46CqGU8UN wMPTEhKqxujA30niGxpU4mWWTMX8+I+2WKin3PLDTBLYt3XdXrsZV3uBdzN/z6Tc zYdUkllGtnQMMFN11kHnKZTpE4nLL3rP0r0eoA3wvimUwIbvx6yoW4byJLzFeJRX JNz39o0/3ijduBYQKQ+UgHUqe7jreQqdZ8RzARC7feD+5+I7Q== 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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1712324812; x= 1712411212; bh=s8gTNozCH/UZgY9jPvJUM6rjNHLIuTHOMqqr/cQ5EgM=; b=j wac0h+7qrCyUBLYEuaGCJnuqzstJTPf2As1yhlKo7alPUo5JfX1hjYHUWFlKwDmw RacyvtdrZM56WIWKVHvWngzT9/k3ltO++hUP+Goud41jTzcQJAEGSe65WYSjDsd3 lcWPuyI6I4eZjiUFC+ElNrGyx+MBSj74GF+B3kZdDToO3MxW6/poVnrhCJcfn1e5 W6HUF/oFobYIgp6/oqH5/jgvtXGZuH/0yOZ/LH5JAbwLaRPhLvoszyO7Z74/2NdR uIZDhN5rmNsr+GIpn9xKeJxU1WB9zkafZ3UDkDpKRIMThqVnM+U8azxMpmcV/x2q LSMou0YNZIG+uIYWh9I+g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudegtddgieelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkjghffffhvffutgfgsehtqhertderreejnecuhfhrohhmpedfnfgr rhhrhicuifgrrhhfihgvlhgufdcuoehlrghrrhihsehgrghrfhhivghlughtvggthhdrtg homheqnecuggftrfgrthhtvghrnhephfektdffgffhkeeiudehvdehfefgfeehuefgvdel teetkeetgfetjeeiledtleeknecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlh hushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehlrghrrhihsehg rghrfhhivghlughtvggthhdrtghomh X-ME-Proxy: Feedback-ID: i8414410d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id A98A11700096; Fri, 5 Apr 2024 09:46:51 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.11.0-alpha0-333-gbfea15422e-fm-20240327.001-gbfea1542 Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Message-ID: <2acec312-74a4-4deb-bfe5-26a848388216@app.fastmail.com> In-Reply-To: References: Date: Fri, 05 Apr 2024 13:46:31 +0000 To: "php internals" Subject: Re: [PHP-DEV] Proposal: retrieve line, filename and if user defined for ReflectionAttribute Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable From: larry@garfieldtech.com ("Larry Garfield") On Fri, Apr 5, 2024, at 1:09 PM, Joel Wurtz wrote: > Hello everyone, > > Like a lot of libraries, we offer the possibility to configure=20 > behaviors with Attributes. However in some cases it's wrongly=20 > configured by the user and this wrong configuration cannot be detected=20 > on the attribute constructor but afterwards. > > In this case we may want to pinpoint which attribute (in which file an= d=20 > at which line) cause this bad configuration. Since there was no method=20 > to retrieve those information in the ReflectionAttribute I proposed a=20 > PR https://github.com/php/php-src/pull/13889 to add those informations. > > I do believe this will allow better DX for end user when correctly use= d, > > Regards, > > Jo=C3=ABl Wurtz Do you have an example of how you expect this to be used? I'm having a = hard time understanding how I'd leverage this. (I maintain an attribute= enhancement library, Crell/AttributeUtils, so I've hit a lot of edge ca= ses in attribute design.) --Larry Garfield