WP Core Handbook > PHP Coding Standards > Naming Conventions suggests the following for naming files with classes:
Class file names should be based on the class name with
class-prepended and the underscores in the class name replaced with hyphens, for example
While from the wording of the section it's primarily intended for core use, the coding style overall commonly does (and should in my opinion) apply to third party WP code.
However since core doesn't support namespaces (PHP 5.2, ugh) this doesn't account for such case.
What is the practical way to go for it from the perspectives of developer convenience? Support of autoloaders?
I could see multiple alternative ways:
- ignoring namespace altogether
- including namespace in file name
- using namespaces as folder levels
- using alternate naming scheme altogether, such as PSR