Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:130447 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 911EF1A00BC for ; Wed, 25 Mar 2026 11:13:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=php.net; s=mail; t=1774437205; bh=Li85lwnBo/PIpGa998HfPvAFGqYcbJIeC1oXcICCheY=; h=From:Subject:Date:In-Reply-To:Cc:To:References:From; b=eiXhy11lLi3CWIstyWSc705sq+SPpkek/Yz3PJdKdfiVw6ypR6+5atypwOI/N3oLJ Th/s9OMNlXBh9yhiIs7f/6wL7hTrbVljrRGzNK92/ZK3k95jJTmUeTi18lkmsN57qq X4uknW+Lng8idAPPQOyMdT1sO5PsHGFB5GvoMxnktMacChkkp6/cY3Aktd3xWoNMvJ L6SD1UX/oWTHYQ2lL6cU8743/NfNZoBOZs6m+FmFii4vS+baYMZvBkZtGC7UIrtPfS 6qmpX0RP6w+bOwns5q0iBFu2xVTfm7bNtDhCZA2glp5S8OMlw0dQvE1cQBiSoFGbrG hwCREeyTEvFlQ== Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 43C8D180068 for ; Wed, 25 Mar 2026 11:13: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=0.6 required=5.0 tests=BAYES_50,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=4.0.1 X-Spam-Virus: No X-Envelope-From: Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 ; Wed, 25 Mar 2026 11:13:21 +0000 (UTC) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-48540d21f7dso55287725e9.0 for ; Wed, 25 Mar 2026 04:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1774437195; x=1775041995; darn=lists.php.net; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:from:to:cc:subject:date:message-id:reply-to; bh=mfBn168KAK97BsBYbIQb6ZcHR9HFF+l0kXvng57soA0=; b=BG3x7xCHCPMLLaaF4yLhiT8GdSugRcQ4ERT38APVyZGoRj+DmFUO+/XqCTl1W3+9vz LEDGjEDXSye5EwEvbHE6u7fAXzX+7qa1CidFn6kqCKaBigakJg120gkPwK7KN3BIeaet Pi5rgLTRPGbmRaKE8HZIh9Jt4ZHqehNmiXPsSoRoGDX79ziXHzW+QtrnYWuVnVtH6lSa 0+WvB16nxSP70D66A+qw9pHRbSXZ6UkgHdGRj1h397PpK0cWZ10EVcZi0o/yogkQZp55 STUxAU8e6YYfORm3DedCcGbjDyw5nQqC0y0BXliSEwPT3A1cVZEY0sRulyqqxUo1KUrQ yK4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774437195; x=1775041995; h=references:to:cc:in-reply-to:date:subject:mime-version:message-id :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=mfBn168KAK97BsBYbIQb6ZcHR9HFF+l0kXvng57soA0=; b=UzxtRJJMh3X6s6f99BRLgKomUrN67Cf3fchEmtR0V7A3Ue7oVJYCysJT2D69e9a+5Q zpRBI0D6SYmcOFNFGBhDTTUZ5TkhdJDf2iZVKdJGSJpr6Z8yx8Urze6Z8k7MMzmNVgZ1 7h9vloGgMm5pFzWy/9JP3Ryq8OljlQDzO0yHjeNN1HSj/F6F1ub2mDVEoziU36WIhXi2 SeBAi5qEVVZlxwb8L8iUc0SURpj5bmzi5qK53LX1OYWa9LR4BMoGqBBsrQJgIGt39zg8 h2L4a3Bp7dgCNTU5KQn+PPsZvrjoGQ8q0I/rbDz2Syu1Il0EFj7h2Sl2Eoq4ylABzsnw K9Yg== X-Gm-Message-State: AOJu0Yy+4BrqLK0BZlam6x8PRJRQW/MIQKjCSioObM8ufzDh9MskJx3t yt2y3NCuzYYgN6hnmzkidWqvzCcOkWRhymk0WD5/DceV3CTD/U22ycwSkcoJeA== X-Gm-Gg: ATEYQzwBTp3j1thUHd/6tsdnPG1WMq5bkVWuVEPyTAFN8qX8Ohi1onVnOS88HXxFTlF b49gyVeKB8skE1O/Po4Fnhzs6RVIFNukId2171X8QfkML8cfLM/2ucb+nNNjyjdQuf/3IRCzSQM Y4uS5ILoTUZUiydp1d5xPN817fSAp6kZuy8AfROr9U2gHuGuMExRo+ezTuYISW0mhTVD/MKsZhI h7lZOyrXN4sQ2oE65DH6uZnyZhAOsDkFxoN/eHU0wC8ggpNzZ64Y9U1py5aYhqC33ZbPjcBwgJ9 Cy9WnEV2k7OHjVXqcDStJkDXcAe0TcBS4uuSrI8vcZxCJte9j/FQOTLKAJTTwtk0G6FD1Z2J4pT XP9a0SCM5os7FbgdRCwbW3naa/ZIJovtGBRRH4UuddKKWHg56s/xxbRMb+3LWkPImdlXEj2zCvh LzurmEUeagQwLS7kcV+wcSrJT/oaGlkcXW1Be1+CX9Mhr5Dw== X-Received: by 2002:a05:600c:a413:b0:487:288:119a with SMTP id 5b1f17b1804b1-4871608902bmr36085015e9.28.1774437194434; Wed, 25 Mar 2026 04:13:14 -0700 (PDT) Received: from smtpclient.apple ([89.249.45.14]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-48711709b48sm118058375e9.7.2026.03.25.04.13.13 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Mar 2026 04:13:14 -0700 (PDT) Message-ID: Content-Type: multipart/alternative; boundary="Apple-Mail=_56C07D05-D33C-4884-AC98-5F195A58165C" Precedence: list list-help: list-unsubscribe: list-post: List-Id: x-ms-reactions: disallow Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3864.400.21\)) Subject: Re: [PHP-DEV] [IDEA for RFC] class_uses and optionally returning traits for parent classes Date: Wed, 25 Mar 2026 12:13:03 +0100 In-Reply-To: Cc: internals@lists.php.net To: Robert Humphries References: X-Mailer: Apple Mail (2.3864.400.21) From: claude.pache@gmail.com (Claude Pache) --Apple-Mail=_56C07D05-D33C-4884-AC98-5F195A58165C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > Le 25 mars 2026 =C3=A0 08:37, Robert Humphries = a =C3=A9crit : >=20 > it isn't documented why it only returns traits on the current class The reason is given here: = https://bugs.php.net/bug.php?id=3D61554#1333085728 : Traits are outside the inheritance system: the=20 parent class is effectively defined by the composition of its own=20 methods/properties and any traits it uses, so trait usage is not = actually=20 inherited. Furthermore, it doesn't really make sense to reflect trait = usage down=20 the class hierarchy because the same trait may be used more than once = within a=20 class hierarchy. =E2=80=94Claude= --Apple-Mail=_56C07D05-D33C-4884-AC98-5F195A58165C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

Le 25 mars 2026 =C3=A0 08:37, Robert Humphries = <contact@developer-rob.co.uk> a =C3=A9crit :

it isn't documented why it only returns traits on the current = class



Traits are outside the inheritance system: = the 
parent class is effectively defined by the = composition of its own 
methods/properties and any traits = it uses, so trait usage is not actually 
inherited. = Furthermore, it doesn't really make sense to reflect trait usage = down 
the class hierarchy because the same trait may be = used more than once within a 
class = hierarchy.


=E2=80=94C= laude
= --Apple-Mail=_56C07D05-D33C-4884-AC98-5F195A58165C--