To me, that is a clear sign that you have too much in your interfaces and you should apply the interface segregation principle.
PHP 8 attributes vs ISP
Hey guys, From the php documentation about the newly introduced attributes: A simple example of attribute usage is to convert an interface that has optional methods to use attributes. Let's assume an ActionHandler interface representing an operation in an application, where some implementations of an action handler require setup and others do not. Instead of requiring all classes that implement ActionHandler to implement a method setUp(), an attribute can be used. One benefit of this approach is that we can use the attribute several times. https://www.php.net/manual/en/language.attributes.overview.php
Do you guys see any benefit of this approach over interface segregation?
Please or to participate in this conversation.