The trait is used mostly by classes where findByName() has been deprecated, so perhaps a simple solution would be to remove the trait from Devio\Pipedrive\Resources\Users and implement findByName() (maybe rename it "find()" to prevent confusion) as a method directly in the class.
Devio\Pipedrive\Resources\Traits::findByName()
has been marked as deprecated. It's a wrapper for Pipedrive's/find
endpoint, which has been deprecated in favor of/search
—but not for all resources. In particular,/users/find
has not been deprecated, and the/users/search
endpoint has not been implemented. See the Pipedrive API Changelog for the six endpoints that are affected: https://pipedrive.readme.io/docs/changelog#removal-of-the-/find-/searchresults-and-/searchresults/field-endpoints-replaced-by-6-new-endpointsThe trait is used mostly by classes where findByName() has been deprecated, so perhaps a simple solution would be to remove the trait from
Devio\Pipedrive\Resources\Users
and implement findByName() (maybe rename it "find()" to prevent confusion) as a method directly in the class.