You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The downside to a class-map autoloader is that it's really unintelligent and needs to be regenerated when you add a new file or rename an existing file. In OO programming where you potentially are creating new classes all the time, that's a hassle and so PSR-4 and PSR-12 were adopted so that loading classes can be inferred by convention. https://www.php-fig.org/psr/psr-4/
The text was updated successfully, but these errors were encountered:
Reference #82
Composer has support for generating an autoloader for you so you can "just use" the class and it will load the file on demand.
We'd probably need a class-map autoloader. https://getcomposer.org/doc/04-schema.md#classmap
The downside to a class-map autoloader is that it's really unintelligent and needs to be regenerated when you add a new file or rename an existing file. In OO programming where you potentially are creating new classes all the time, that's a hassle and so PSR-4 and PSR-12 were adopted so that loading classes can be inferred by convention. https://www.php-fig.org/psr/psr-4/
The text was updated successfully, but these errors were encountered: