【发布时间】:2015-06-04 20:21:52
【问题描述】:
我正在转换一个旧项目(具有旧依赖项)以使用 composer 管理它的依赖项。该站点使用 PEAR 的 Text_Password。我读到可以使用 composer 安装依赖项,在 composer.json 中添加(类似)以下内容:
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
"require": {
...
"pear-pear/Text_Password": "*"
},
..但我得到了错误:
$ composer update
Loading composer repositories with package information
Initializing PEAR repository http://pear.php.net
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested package pear-pear/text_password could not be found in any version, there may be a typo in the package name.
Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
see <https://groups.google.com/d/topic/composer-dev/_g3ASeIFlrc/discussion> for more details.
是否可以使用 Composer 安装 PEAR 库?我注意到在 packagist 上有一组 PEAR 库,但我看不到 Text_Password - https://packagist.org/packages/pear/
Text_Password 也有一个 github 存储库,但我认为直接从 PEAR 安装可能会更好? - https://github.com/pear/Text_Password
无论如何,我怎样才能用 composer 安装这个包?
【问题讨论】:
标签: composer-php pear