Namespacing WordPress project according to FIG standards

You are overthinking this. The namespace structure applies at the level of individual package. There is no need or push to treat the whole site as such package.

Also one of the benefits of using autoload in first place is that it makes location of classes in file system largely irrelevant.

So the simple and practical approach is to:

  1. Handle namespaces at individual package (plugin/theme) level.
  2. Use PSR-4 support in Composer for simple directory structure inside packages, without excessive folder levels.

Leave a Comment