Newsgroups: php.internals
Path: news.php.net
Xref: news.php.net php.internals:116840
Return-Path: <rowan.collins@gmail.com>
Delivered-To: mailing list internals@lists.php.net
Received: (qmail 20349 invoked from network); 6 Jan 2022 21:57:18 -0000
Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5)
  by pb1.pair.com with SMTP; 6 Jan 2022 21:57:18 -0000
Received: from php-smtp4.php.net (localhost [127.0.0.1])
	by php-smtp4.php.net (Postfix) with ESMTP id 6F77A1804A7
	for <internals@lists.php.net>; Thu,  6 Jan 2022 15:05:06 -0800 (PST)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-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,FREEMAIL_FROM,
	RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS
	autolearn=no autolearn_force=no version=3.4.2
X-Spam-ASN: AS15169 209.85.128.0/17
X-Spam-Virus: No
X-Envelope-From: <rowan.collins@gmail.com>
Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256)
	(No client certificate requested)
	by php-smtp4.php.net (Postfix) with ESMTPS
	for <internals@lists.php.net>; Thu,  6 Jan 2022 15:05:06 -0800 (PST)
Received: by mail-wr1-f53.google.com with SMTP id i22so7639013wrb.13
        for <internals@lists.php.net>; Thu, 06 Jan 2022 15:05:05 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20210112;
        h=date:from:to:subject:user-agent:in-reply-to:references:message-id
         :mime-version:content-transfer-encoding;
        bh=Gs5EogqepLct4EDSqADQwjiJpG+AexeG69D1x8oQ2AE=;
        b=EIUioFKrmhsBPn/NPu6TQROA1BFjaeJWj1d2/AiExMDsEuagkFEO+OmQdGvuotR3NT
         aMZwfzC7l8ekxJ7VycPWqORQ2Gcd53jJVtnIxkgPMRMdEo9wvgCSybSbPsDtr3W05gef
         gCXfDKVCf8d2Z29FUKDqlUVByYteoD8CN0AuTrClSgkeWtiS2pkLnonM/rm2ra0Dh01y
         R0n3ZiPvJ66uNNECYfKeu9T7G0GkLb+KwKlBpK4PXOxxtkWKTcdCrd5/w1sNL8lcqfNr
         tgSFWkWujMy3YU/ZLuPwio5iTZUH7DUeRN6aaBTSCnUml/KiLsPHey/e9onLLsFidez7
         YPYQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20210112;
        h=x-gm-message-state:date:from:to:subject:user-agent:in-reply-to
         :references:message-id:mime-version:content-transfer-encoding;
        bh=Gs5EogqepLct4EDSqADQwjiJpG+AexeG69D1x8oQ2AE=;
        b=flOEHSCCKJ/hZV/Zg/1we/SeytfVzbyxxTUar6e/i9wwXor3aqmlSxwzakPicwZVr8
         IeFEwOimdHhC7+WGqqV8S1rtfEMR0iLTUhV5o054PSI0JdwfKZMRMDCFA7oOMSI+d5ZL
         4LN+nMt4z45voSbQ1hO7KKy2Xr8VfLGmYA0dvjax75CTj+iU0rI/GkWYYlwNLJn5oAxt
         done8R115KYH86q3aK9tkXOGTFpx0oNnqU1RTJz3Dyq8SEvn7kTYuO5YW42RAZG/y+YF
         3KPoKqRpwu2Znmy1A1Ez/g/eA++krTRqzvMnf1V0ZAM9+4MBOllqZPNX4z/ZSUUfz7ca
         gUPA==
X-Gm-Message-State: AOAM530cNzA51c7f2AUSyF3P86mggULQc8Kz8pugQI/wkxqpZnVxhb3D
	GbgsVt0RwmWNe73lJxZViDHP770sZPI=
X-Google-Smtp-Source: ABdhPJxNk3W2HtG4mXutWxElthu0my+Q2rtgV5pi4L4d9EVkyKGQBAknmuotM6Qae2pIpyI3dfxomQ==
X-Received: by 2002:a5d:55c5:: with SMTP id i5mr51017322wrw.445.1641510304685;
        Thu, 06 Jan 2022 15:05:04 -0800 (PST)
Received: from [127.0.0.1] (cpc104104-brig22-2-0-cust548.3-3.cable.virginm.net. [82.10.58.37])
        by smtp.gmail.com with ESMTPSA id d17sm760627wmq.42.2022.01.06.15.05.03
        for <internals@lists.php.net>
        (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
        Thu, 06 Jan 2022 15:05:04 -0800 (PST)
Date: Thu, 06 Jan 2022 23:05:00 +0000
To: internals@lists.php.net
User-Agent: K-9 Mail for Android
In-Reply-To: <bcae2744-8cd4-55c7-bbe9-97daa252a29b@korulczyk.pl>
References: <1641335738.195767637@f174.i.mail.ru> <CA+p1Faa_BAv-DdR7D4Jee2XwNNmVQmmkDf_T_Z_4nAYxWtQPqA@mail.gmail.com> <CAPKYkKy4AtAheYTyS9zn4Bz14x1Eq15amjCcPEBFtvML0cUxGQ@mail.gmail.com> <5a4aebf8-e592-4517-8930-d18b112ef1fd@www.fastmail.com> <5a99809d-afda-546c-5a11-a4f0f821aa37@korulczyk.pl> <A91D0AC0-D646-4C62-9FF3-EDE8279E43B7@gmail.com> <bcae2744-8cd4-55c7-bbe9-97daa252a29b@korulczyk.pl>
Message-ID: <6E50C348-9452-40E1-ACE8-06DED11C9136@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
Subject: Re: [PHP-DEV] RFC: Trait expects interface
From: rowan.collins@gmail.com (Rowan Tommins)

On 6 January 2022 19:51:46 GMT, Robert Korulczyk <robert@korulczyk=2Epl> wr=
ote:
>You're talking about classes that use traits, but I'm talking about trait=
s themselves=2E If I open a class in editor, there is a straightforward way=
 to=20
>check if specific method is implementation of an interface - check interf=
aces implemented by class and if one of them have this method, then this=20
>method is implementation of this interface, and editor can properly mark =
it and handle navigation between implementation in class and declaration in=
=20
>interface=2E

Ah, I see what you're getting at now=2E I've never particularly had the ne=
ed to jump between an interface and a trait, but then I very rarely use tra=
its at all=2E

In your use cases, are these traits generally *using* the interface method=
s, or *implementing* them? For instance, you might have a trait that *requi=
res* the LoggerInterface because it makes use of its methods, so you want t=
o jump to their documentation when viewing those uses; or you might have a =
trait that helps *implement* the LoggerInterface, and you want to link each=
 method to the definition in the interface that it implements=2E Is one of =
these situations more common than the other, in your experience?

Regards,

--=20
Rowan Tommins
[IMSoP]