YiiClassMap 和 YiiRewriteMap config load 未写进index.php 导致重写失效
例子:
// yii class rewrite map 'yiiClassMap' => [ // 'fecshop\app\appfront\helper\test\My' => '@appfront/helper/My.php', ], // 重写model和block 'fecRewriteMap' => [ '\fecshop\app\appfront\modules\Catalog\block\category\Index' => '\fecyo\app\appfront\modules\Catalog\block\category\Index', // '\fecshop\app\appfront\modules\Customer\block\address\Edit' => '\fectb\app\appfront\modules\Customer\block\address\Edit', ],
仔细看一下格式。
理解了, 那 YiiClassMap.php 文件是多余的
不是的,本地开发重写,是需要写到那个文件的