How can i install yii/jui in yii2.0 using composer. I have tried
php composer.phar require --prefer-dist yiisoft/yii2-jui "*"
and added to composer.json
"yiisoft/yii2-jui": "*"
but it did not succeed. Can anyone help me how to use composer to install extension in yii 2.0 .
When i am running $ php composer.phar require yiisoft/yii2-jui "*"
in cmd it is just opening the composer.phar file, nothing else happening.
Thank you in advance.
Yii 2 Composer Installer This is the composer installer for Yii framework 2.0 extensions. It implements a new composer package type named yii2-extension , which should be used by all Yii 2 extensions if they are distributed as composer packages. For license information check the LICENSE-file.
Hopefully, you already installed Yii-2 with composer. I have been installed (basic application template) step by step.
Step 1. Before installation, Yii official website said that, we require to install this package before installation Yii 2. This step will follow after composer installation.
sudo composer global require "fxp/composer-asset-plugin:1.0.0-beta4"
Please take a look attach file.
This time is yii-2 installation with composer.
sudo composer create-project yiisoft/yii2-app-basic basic 2.0.1
Please take a second and third attach image.
After that, please go to your project folder. Then, open your_project_folder/composer.json. I have been used vi to open compser.json. You can use whatever your prefer. Please take a look again for attach image.
The next step is final step for complete install for your package. After adding this
"yiisoft/yii2-jui": "*"
under require keyword, please save your composer.json file. Then run this command.
sudo composer update
Please take a look attach image again.
Please check your folder on your_project_folder/vender/yiisoft/yii2-jui
That's all. Hope this help for your stack. Btw, if you want to use composer command, please used the following command. This will help to call composer from everywhere.
sudo mv composer.phar /usr/local/bin/composer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With