Я просто создал Slim Framework for PHP
, и мне сложно установить библиотеку slim/views через composer.json
Мой composer.json выглядит так:
{
"name": "slim/slim",
"type": "library",
"description": "Slim Framework, a PHP micro framework",
"keywords": ["microframework","rest","router"],
"homepage": "http://github.com/codeguy/Slim",
"license": "MIT",
"authors": [
{
"name": "Josh Lockhart",
"email": "[email protected]",
"homepage": "http://www.joshlockhart.com/"
}
],
"require": {
"php": ">=5.3.0",
"phing/phing": "2.*"
},
"suggest": {
"ext-mcrypt": "Required for HTTP cookie encryption"
},
"autoload": {
"psr-0": { "Slim": "." }
}
}
Когда я говорю, что composer require slim/views
, я получаю эту ошибку, и я не уверен, о чем она говорит:
Problem 1
- slim/views 0.1.0 requires slim/slim >=2.0.0 -> satisfiable by slim/slim[2.0.0, 2.1.0, 2.2.0, 2.3.0, 2.3.1, 2.3.2, 2.3.3, 2.3.4, 2.3.5, 2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- slim/views 0.1.1 requires slim/slim >=2.4.0 -> satisfiable by slim/slim[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- slim/views 0.1.2 requires slim/slim >=2.4.0 -> satisfiable by slim/slim[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- slim/views 0.1.3 requires slim/slim >=2.4.0 -> satisfiable by slim/slim[2.4.0, 2.4.1, 2.4.2, 2.4.3, 2.5.0, 2.6.0, 2.6.1].
- Can only install one of: slim/slim[2.0.0, 1.0.0].
- Can only install one of: slim/slim[2.1.0, 1.0.0].
- Can only install one of: slim/slim[2.2.0, 1.0.0].
- Can only install one of: slim/slim[2.3.0, 1.0.0].
- Can only install one of: slim/slim[2.3.1, 1.0.0].
- Can only install one of: slim/slim[2.3.2, 1.0.0].
- Can only install one of: slim/slim[2.3.3, 1.0.0].
- Can only install one of: slim/slim[2.3.4, 1.0.0].
- Can only install one of: slim/slim[2.3.5, 1.0.0].
- Can only install one of: slim/slim[2.4.0, 1.0.0].
- Can only install one of: slim/slim[2.4.1, 1.0.0].
- Can only install one of: slim/slim[2.4.2, 1.0.0].
- Can only install one of: slim/slim[2.4.3, 1.0.0].
- Can only install one of: slim/slim[2.5.0, 1.0.0].
- Can only install one of: slim/slim[2.6.0, 1.0.0].
- Can only install one of: slim/slim[2.6.1, 1.0.0].
- Installation request for slim/slim 1.0.0 -> satisfiable by slim/slim[1.0.0].
- Installation request for slim/views 0.1.* -> satisfiable by slim/views[0.1.0, 0.1.1, 0.1.2, 0.1.3].
Текущая версия Slim Framework у меня - 2.6.1
. Одна вещь, которую я обнаружил, заключается в том, что если я укажу "version":"2.6.1"
внутри моего composer.json, после того, как тег name
перед запуском composer require slim/views
, composer require
выполнялось нормально и пакет был установлен. Не уверен, что происходит; может кто-нибудь, пожалуйста, помогите мне с этим?
Благодарю!
Как упоминалось в ChrisForrence, ваше имя пакета slim/slim
сталкивается с библиотекой с тем же именем. Измените имя своего пакета на что-то другое, и slim будет установлен, как и ожидалось.
"name": "sasanka/my-app"