Skip to content

Commit

Permalink
added require Yii in Plugin::initAutoload
Browse files Browse the repository at this point in the history
  • Loading branch information
hiqsol committed Sep 27, 2017
1 parent f64aa6c commit 32105a5
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,12 @@ public function onPostAutoloadDump(Event $event)

protected function initAutoload()
{
require_once dirname(dirname(dirname(__DIR__))) . '/autoload.php';
$dir = dirname(dirname(dirname(__DIR__)));
$yii = "$dir/yiisoft/yii2/Yii.php";
require_once "$dir/autoload.php";
if (file_exists($yii)) {
require_once $yii;
}
}

protected function scanPackages()
Expand Down

0 comments on commit 32105a5

Please sign in to comment.