Yii Framework Forum

Why does Yii3 not support Yii autoloader no longer?


(shane) #1

I read this UPGRADE, and found that Yii3 removed Yii autoloader, why? I think Yii autoloader is a convenient tool.


(shane) #2

Is this a low efficiency tools in Yii2?


#3

Yii 3 now primarily relies on the composer autoloader and does not ship its own autoloader anymore.
However this also means one can not define autoloading namespaces via aliases anymore which I found very convenient.


(Alexander Makarov) #4

Because:

  1. Composer autoloader is there.
  2. Composer autoloader improved a lot since Yii 2.0 times and our autoloader doesn’t give any performance gain compared to it.
  3. It will definitely change how extension loads its classes but the change is minor and for the better: instead of defining aliases, package composer.json is now adjusted.