I am using yii2 framework since last few weeks. But now I am getting some issues with composer itself.
Just for info, I am using ubuntu 14.04
When I require some new package / extensions, I do the composer add by using composer require command. But I noticed that sometimes it's removing few of the existing packages from my vendor and project.
I tried with following commands.
composer require dmstr/yii2-adminlte-asset "*"
composer require 2amigos/yii2-file-upload-widget:~1.0
And also tried with some googling.
But it's not working.
Is there a way to add a new package / extension into your existing yii 2 project without removing existing packages or without any composer update command?
Composer.json
{
"name": "sganz/yii2-advanced-api-template",
"description": "Improved Yii 2 Advanced Application Template By Sandy Ganz, Original by Nenad Zivkovic",
"keywords": ["yii2", "framework", "advanced", "improved", "application template", "nenad", "sganz"],
"type": "project",
"license": "BSD-3-Clause",
"support": {
"tutorial": "http://www.freetuts.org/tutorial/view?id=6",
"source": "https://github.com/sganz/yii2-advanced-api-template.git"
},
"minimum-stability": "dev",
"prefer-stable":true,
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"nenad/yii2-password-strength": "*",
"mihaildev/yii2-ckeditor": "*",
"dmstr/yii2-adminlte-asset": "*"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*",
"codeception/specify": "*",
"codeception/verify": "*"
},
"config": {
"vendor-dir": "protected/vendor",
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "protected/vendor/npm",
"bower-asset-library": "protected/vendor/bower"
}
}
}
Any help on this would be greatly appreciated.
composer.json
(before you runcomposer require
). It also can be that the removed packages are sub requirements of another package which was updated (composer require
automatically runs acomposer update
) and are no longer needed by this package. – Pᴇʜcomposer.json
and a list of the packages which are removed? – Pᴇʜcomposer.json
? – Pᴇʜ