psr4-autoloading
Installation
SKILL.md
PSR-4 Autoloading Standard
When to use
- The user reports a class that loads on macOS but fails to load on Linux, a classic PSR-4 case-sensitivity problem.
- The user is moving a library off the deprecated PSR-0 standard to PSR-4.
- The user is structuring a package's classes so any PSR-4 autoloader can resolve them.
- The user needs to know how a fully qualified class name is translated to a file path under PSR-4, or why a class fails to load.
When NOT to use
- Do not apply PSR-4 to legacy classes that have no namespace; use a classmap for that code instead.
- Do not use PSR-4 to load procedural scripts, templates, or files that declare no class.