ClassMapManager
class ClassMapManager
Manages class map overrides applied to Composer's autoloader.
Allows packages to replace classes at the autoloader level, so the replacement file is loaded instead of the original. Entries are applied immediately when added and fail hard if the target class is already loaded.
Properties
| static protected array<class-string, string> | $entries |
Methods
Add class map entries and apply them to the Composer autoloader.
Determine if any class map entries have been registered.
Get all registered class map entries.
Flush all static state.
Details
at line 36
static void
add(array $map)
Add class map entries and apply them to the Composer autoloader.
Each entry maps an original class name to the path of its replacement file. Fails immediately if any target class is already loaded.
Boot-only. Class-map overrides mutate the worker's Composer autoloader and must be registered before any target class is autoloaded.
at line 55
static bool
hasEntries()
Determine if any class map entries have been registered.
at line 65
static array
getEntries()
Get all registered class map entries.
at line 73
static void
flushState()
Flush all static state.