Be the first to like this
Most often WordPress developers uses manual file loading by just typing require_once all the time. But this approach is not good for all cases. There is few moments which you should to know:
— Load each file manually. But what if you have over 400 files or more?
— Your code contains the logic of loading files. And you probably doing more work by designing this logic of loading files.
— Some methods and classes may missed (loaded too later).
— One more node for testing. You need to make sure that your loaders work as intended.
The good news — you can use autoloaders and this is not required something special. And this keynote about autoloaders and Composer.