public static function prepareMigrationTask(
        array $ext,
        ReportingChain $chain,
        $way = ExtensionsManager::MIGRATE_TYPE_UP,
        $group
    ) {

        if ($ext['composer_type'] == Extension::TYPE_DOTPLANT) {
            $extData = ComposerInstalledSet::get()->getInstalled($ext['composer_name']);
            $packageMigrations = ExtensionDataHelper::getInstalledExtraData($extData, 'migrationPath', true);
            $packagePath = '@vendor' . '/' . $ext['composer_name'] . '/';
            foreach ($packageMigrations as $migrationPath) {
                $migrateTask = self::buildTask(
                    [
                        realpath(Yii::getAlias('@app') . '/yii'),
                        'migrate/' . $way,
                        '--migrationPath=' . $packagePath . $migrationPath,
                        '--color=0',
                        '--interactive=0',
                        '--disableLookup=true',
                        (ExtensionsManager::MIGRATE_TYPE_DOWN == $way ? 68888 : ''),
                    ],
                    $group
                );
                $chain->addTask($migrateTask);
            }
        }
    }