Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122967 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 254D01A009C for ; Fri, 5 Apr 2024 13:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712323513; bh=hAXqmHKlzTmB0VMp3yYjO7ioPHRXNMzq9OYW8s2+iX8=; h=Date:From:To:Subject:In-Reply-To:References:From; b=fx7ET8TPAH3Uk5Dv0uZXWUARiMeURAHY+UAgcTRxousKHTRP1Qwy3avElnYmBdnVN +2j2RsKfPJCgagx6/uPDmopAjgU3z3PiZIX9OhPZXy47g2HKDEp/QOtglQLcN1eyoB JY0TS8ChlYr04S89R1Z4TBkDX8aVLxt3tu8YNhmhF2bcMKX57RzNNTkOixsLOWiTKu O/dt3hwIKNrhxG32AqV3xysDYb1jEkrM6F50OcNSbFj3mhEs4sMRWjPVszPdE/j1vB vxjUCJb0Be9Hz3TRGvCAksP0CUjeM+FRtt+QaGHFXD7XzbGtL9G3PUWogZsIza5Jdr OvDhw0vn2tqHA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id AFD62180061 for ; Fri, 5 Apr 2024 13:25:09 +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=3.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_MISSING,SPF_HELO_PASS, SPF_SOFTFAIL,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from xdebug.org (xdebug.org [82.113.146.227]) by php-smtp4.php.net (Postfix) with ESMTP for ; Fri, 5 Apr 2024 13:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712323478; bh=hAXqmHKlzTmB0VMp3yYjO7ioPHRXNMzq9OYW8s2+iX8=; h=Date:From:To:Subject:In-Reply-To:References:From; b=FbXWNwCl5Jiw9EG9fiPrMcqiH8P8hB3Zu77eGQTITWTou8WWbSCN3LLw9bQWhVBm8 MEUTsL9yJ+fgqELvRArvMoLbDHjwtryRtgcui5boVjwG1UOGPQ0ICziZeTuTeEbslQ qxkfH3loOBiGeGjzGvvlsuOS1Mv0SsoXI3LjrjOn3F8ZLcPP8AmjOwqmSpSIdEdfaR dIzNe2dC6U+r3TmGlVCqr66AD6Nf5Nx6mN/x8Uzpuu5hQ33htfBZeQcm0cWVvl1LFb 2FMwvh05T3W8REBFopEejPDP5DARzL/BQX5iXs9acOq0c+aVxBhPerZF1f4RTmR0bj sd9vFaoP3t+qg== Received: from [127.0.0.1] (88-159-147-192.fixed.kpn.net [88.159.147.192]) by xdebug.org (Postfix) with ESMTPSA id 4DF2410C3F5; Fri, 05 Apr 2024 14:24:38 +0100 (BST) Date: Fri, 05 Apr 2024 15:24:37 +0200 To: internals@lists.php.net Subject: =?US-ASCII?Q?Re=3A_=5BPHP-DEV=5D_Proposal=3A_retrieve_line=2C_filena?= =?US-ASCII?Q?me_and_if_user_defined_for_ReflectionAttribute?= User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable From: derick@php.net (Derick Rethans) On 5 April 2024 15:09:42 CEST, Joel Wurtz wrote: >Hello everyone, > >Like a lot of libraries, we offer the possibility to configure behaviors >with Attributes=2E However in some cases it's wrongly configured by the u= ser >and this wrong configuration cannot be detected on the attribute >constructor but afterwards=2E > >In this case we may want to pinpoint which attribute (in which file and a= t >which line) cause this bad configuration=2E Since there was no method to >retrieve those information in the ReflectionAttribute I proposed a PR >https://github=2Ecom/php/php-src/pull/13889 to add those informations=2E > >I do believe this will allow better DX for end user when correctly used, Would it make sense to not only add this for ReflectionAttribute, but also= Function and/or others? Functions have a range of lines associate with them=2E Could Attributes ha= ve that too? cheers Derick