Naming interfaces

Yii 1.1 interface naming convention was IName. Yii 2 was NameInterface. With Yii 3 I have experimented with interface naming by removing Interface suffix getting names such as ErrorRenderer.

What do you think about the experiment?

Do you prefer everything to have Interface suffix or not?

  • I prefer NameInterface names with suffix
  • I prefer names without suffix

0 voters

Isn’t it written in PSR Naming Conventions that interface class must be suffixed by Interface?


This is only internal documentation, it only affects PHP-FIG packages.


I confirm that PSR naming conventions is internal document to agree on styling on how PSR documents themselves are written. That is not a coding starndard that is meant to be applied to projects.

1 Like

Here’s an article describing rationale behind the experiment:

1 Like

OK. Based on voting here and at the Russian community forums

Note that it could be adjusted before release.