Answer the question
In order to leave comments, you need to log in
Yii 2 not installing packages?
Win 7
Installed Yii 2-2.0.15.1
PHP 5.6
OpenServer
trying to install Select2
php composer.phar require kartik-v/yii2-widget-select2 "*"
gives error
Your requirements could not be resolved to an installable set of packages.
Problem 1
- phpunit/phpunit 6.5.7 requires php ^7.0 -> your PHP version (5.6.12) does not satisfy that requirement.
- phpunit/phpunit 6.5.7 requires php ^7.0 -> your PHP version (5.6.12) does not satisfy that requirement.
- phpunit/phpunit 6.5.7 requires php ^7.0 -> your PHP version (5.6.12) does not satisfy that requirement.
- Installation request for phpunit/phpunit (locked at 6.5.7) -> satisfiable by phpunit/phpunit[6.5.7].
Installation failed, reverting ./composer.json to its original content.
{
"name": "yiisoft/yii2-app-basic",
"description": "Yii 2 Basic Project Template",
"keywords": ["yii2", "framework", "basic", "project template"],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "~2.0.14",
"yiisoft/yii2-bootstrap": "~2.0.0",
"yiisoft/yii2-swiftmailer": "~2.0.0",
"kartik-v/yii2-widget-select2": "*"
},
"require-dev": {
"yiisoft/yii2-debug": "~2.0.0",
"yiisoft/yii2-gii": "~2.0.0",
"yiisoft/yii2-faker": "~2.0.0",
"codeception/base": "^2.2.3",
"codeception/verify": "~0.3.1",
"codeception/specify": "~0.4.3"
},
"config": {
"process-timeout": 1800,
"fxp-asset": {
"enabled": false
}
},
"scripts": {
"post-install-cmd": [
"yii\\composer\\Installer::postInstall"
],
"post-create-project-cmd": [
"yii\\composer\\Installer::postCreateProject",
"yii\\composer\\Installer::postInstall"
]
},
"extra": {
"yii\\composer\\Installer::postCreateProject": {
"setPermission": [
{
"runtime": "0777",
"web/assets": "0777",
"yii": "0755"
}
]
},
"yii\\composer\\Installer::postInstall": {
"generateCookieValidationKey": [
"config/web.php"
]
}
},
"repositories": [
{
"type": "composer",
"url": "https://asset-packagist.org"
}
]
}
Answer the question
In order to leave comments, you need to log in
1) Put the version below the plugins.
2) Run composer without requirements.
So read the error you indicated to the composer that you have 5 php and the module requires 7
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question