Can someone explain what the main benefit is by using PSR-4?
I was watching Jeffrey's Namespacing and Autoloading video and I don't really see the benefit, I'm pretty sure I'm missing something but so far I don't see that being faster or easier than manually importing the classes with require, in fact I feel like there is more steps when using Autoloading and at the end I see that you end up with the same import lines.
- Create Composer json file
- Namespace your classes namespace Acme;
- Pull projects in index.php
- Import classes in ex.php file
I don't know but I just don't see the advantage of using Autoloaders, PSR-4 on this case. If the main benefit is namespacing than I'm ok but I was under the impression that this should Autoload your classes without too much effort. Sorry if I just don't see the obvious but having a little experience with other languages such as C++, Objective-C, Swift etc. where I always imported my classes manually I don't see the benefit.
I'm pretty sure I'm just not seeing the big picture here.