Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:122966 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 D8B791A009C for ; Fri, 5 Apr 2024 13:09:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1712322625; bh=h81aMMbwkj3zwlUO+MJahGZC/5bqq0SxCZ9GVzODUv4=; h=From:Date:Subject:To:From; b=mZtHDylDPD3rEjQeie782D++3HmmJK5sEUYXcVMInSzZPT038O10cASzCCsocDXhV mwWyouSbRl97If0vDkDNC/DHu1jGCHSbJKQ/ug/ioOktwwYnnK10brLOi8phya/+/y ABSYVSg+2D6HVROh7vl7/se0ed6+eGHMJcVD2L1eVAPJUDM1zvtyM+xtVFFK/YdRgM 8RaQIPEM4gsumqLFeBeA6i9lZEecF9qFn/LrE9Xv1XFYF/Kllg3hKn6WIHX3ImkauG ETMBi86Wy6tZgOanlSwTLqTAjGojzEfcB9tjwO2K+d/CuIDoshBqlWEDmZYYq3Xvi3 oyQNbPa0Lv4gA== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id D14781801DD for ; Fri, 5 Apr 2024 13:10:24 +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,HTML_MESSAGE, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=4.0.0 X-Spam-Virus: No X-Envelope-From: Received: from mail-ed1-f54.google.com (mail-ed1-f54.google.com [209.85.208.54]) (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:10:24 +0000 (UTC) Received: by mail-ed1-f54.google.com with SMTP id 4fb4d7f45d1cf-56e2393b073so2346976a12.0 for ; Fri, 05 Apr 2024 06:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jolicode.com; s=google; t=1712322593; x=1712927393; darn=lists.php.net; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=h81aMMbwkj3zwlUO+MJahGZC/5bqq0SxCZ9GVzODUv4=; b=F3I/y3QmX1NYwkJXdVAOtGz4N3QtASezX6lX7qkKl7NRUraCg9WI52INd5uqDc0zoL DfHqj9aVr1lu97GzauSNL2J5uXVebmBtPrlEOgVDfwPqsvWQqGLB5yPAj8J+XUGxpeRP YZ2WCi41SmH0XFcAZyIYnRwvE6ACQo19v9xRs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712322593; x=1712927393; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=h81aMMbwkj3zwlUO+MJahGZC/5bqq0SxCZ9GVzODUv4=; b=T7bVS6M8vbzHjOSij5Z3NDViiRsUwOabkVqzmGFD0Oa5ZJeh0jZir9wjQMFzb5sZjD zs52ATXeM64eKuaN9hRAIwpZrPN1J72SZksX9CEr0MH2IJ+MSLhLSS+kiDF1GP6gWwqX VfjaIXLErcfv97GlzJ5GspCOuiJKeyPgXg1rXJ8Ec3lj/0jqJ+sHZLbocJNl8R5Y1HzX UBv+cmAK99dorgVCSkUwb9rkwIq2eq/fZZMGvkVsC+ZoDkhIed9IqHji+Z4OBWAkGxOJ YYKoawjQFvb9mJ+EuexGnvTLswepc8Kx9WarYy1RdhHVrsWSlv0uA6cWBJn9s0GQGnYB yKJg== X-Gm-Message-State: AOJu0YzxufiKWz+JCA7e1X5LBl6EQT1kUIzJHaeG6AOBmu2JNftPkCOK mAQhHlEaky8Mt9uKVFux4wp77Tu67lkcV3dMuB/8nnkPuRRwKTaoQzhQ8W5dg9RlRK2tS6If41Z PVnNWwIqoV+hrNdQBsSOlu+DtGSHtnfkvwn3NQyeVl5kMeVPCFabUIA== X-Google-Smtp-Source: AGHT+IHF1KqtH7USzRIPCtN01aljTBQZYewVqnTRe7O4L+w4Tr6YrtLSqNcq3DZwazMmYMBOgYwpTxVJEnO2wNaPpJM= X-Received: by 2002:a17:906:35d9:b0:a51:9ccd:5d04 with SMTP id p25-20020a17090635d900b00a519ccd5d04mr1532534ejb.8.1712322593156; Fri, 05 Apr 2024 06:09:53 -0700 (PDT) Precedence: bulk list-help: list-post: List-Id: internals.lists.php.net MIME-Version: 1.0 Date: Fri, 5 Apr 2024 15:09:42 +0200 Message-ID: Subject: [PHP-DEV] Proposal: retrieve line, filename and if user defined for ReflectionAttribute To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000e80bf90615592bd6" From: jwurtz@jolicode.com (Joel Wurtz) --000000000000e80bf90615592bd6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello everyone, Like a lot of libraries, we offer the possibility to configure behaviors with Attributes. However in some cases it's wrongly configured by the user and this wrong configuration cannot be detected on the attribute constructor but afterwards. In this case we may want to pinpoint which attribute (in which file and at which line) cause this bad configuration. Since there was no method to retrieve those information in the ReflectionAttribute I proposed a 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 used, Regards, Jo=C3=ABl Wurtz --=20 Jo=C3=ABl Wurtz 06 23 64 03 55 Jolicode, Expertise et Architecture Web http://www.jolicode.com/ --000000000000e80bf90615592bd6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello everyone,
Like a=20 lot of libraries, we offer the possibility to configure behaviors with=20 Attributes. However in some cases it's wrongly configured by the user= =20 and this wrong configuration cannot be detected on the attribute=20 constructor but afterwards.

In this case we may want to=20 pinpoint which attribute (in which file and at which line) cause this=20 bad configuration. Since there was no method to retrieve those=20 information in the ReflectionAttribute I proposed a 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 used,

R= egards,

Jo=C3=ABl Wurtz


--
Jo=C3=ABl Wurtz
06 23 64 03 55

Jolicode, Expert= ise et Architecture Web
http://www.jolicode.com/
--000000000000e80bf90615592bd6--