我安装了pear / archive_tar以与Phing一起使用,我使用Composer安装了Phing。但是,我收到了这个错误:
BUILD FAILED
exception 'BuildException' with message 'Error reading project file [wrapped: You must have installed the PEAR Archive_Tar class in order to use TarTask.]' in vendor/phing/phing/classes/phing/parser/ProjectConfigurator.php:197
我将PEAR repository添加到Composer并进行了更新,但仍然无效。
这个问题的后半部分分为here。
答案 0 :(得分:0)
我将我的composer.json设置为此,并修复了它:
{
"repositories": [
{
"type": "pear",
"url": "http://pear.php.net"
}
],
"require": {
"phing/phing" : "2.6.1",
"pear-pear.php.net/pear": "*"
}
}
像这样的Native Composer库不起作用,因为Composer不会将pear / archive_tar包添加到自动加载器中:
{
"require": {
"phing/phing" : "2.6.1",
"rsky/pear-core-min" : "dev-master",
"pear/archive_tar" : "1.3.11"
}
}