yii2

Installing Extension Manually

Install Extension without Composer

Note: it’s strongly advised to use Composer. The instruction below is basically what Composer does for you.

  • Download archive extension file of needed version from Github
  • Open composer.json
  • Find PSR-4 autoload section and remember it for e.g. kmit/select2
  • Extract files to corresponding folder in vendor folder, like vendor/kmit/select2
  • Add following code to vendor/composer/autoload_psr4.php
'kmit\\select2\\' => array($vendorDir . '/kmit/select2'),
  • Add following code to vendor/yiisoft/extensions.php:
'kmit/select2'(name of extension from composer.json file of extension) =>
    array (
        'name' => 'kmit/select2',
        'version' => '1.0.0.0',
        'alias' => array (
            '@vendor/kmit/select2'(path of extension folder alias) => $vendorDir . '/kmit/select2' (path of extension folder),
        ),
    ),

Video Tutroial


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow