Search code examples
phpcomposer-phpautoloadautoloader

Is composer's autoload_psr4.php needed after optimization?


After optimizing composer's autoloader (with composer dumpautoload -o), isn't it better to delete autoload_psr4.php to speed up autoloader as this file seems to be just something duplicate when all classes are in autoload_classmap.php too?


Solution

  • this file is generated by composer, why you need consider it? and autoload_psr4.php only contains psr defined files, autoload_classmap have other rules files like file and psr2.