DEV Community

loading...

Discussion on: Make sense of PHP interfaces

Collapse
vlasales profile image
Vlastimil Pospichal

I don't like the suffix "Interface" in its name. Instead, I use the adjective property that the related object must have. This is good for understanding the role of the interface.

Collapse
jmau111 profile image
Julien Maury Author

It depends. Symfony has a lot of Interfaces with that suffix, I guess the most important thing is to keep the same naming convention for consistency.

Collapse
vlasales profile image
Vlastimil Pospichal

I don't use Symfony, I am not limited by this choice.

For the consistency you may use proxies.

Collapse
bam92 profile image
Abel Lifaefi Mbula

Using "Interface" is just a tautology. It's not important at all although many devs/compagnies use it. I find useful arguments for not using that suffix in this post

Collapse
jmau111 profile image
Julien Maury Author

well, it might be a tautology, but the "creative" naming is rarely a good thing. Here, just with the name, you know what is. I'm not saying it's the perfect name, but it's usable.