在PHP 5.5中使用Composer安裝PEAR包可以正常工作(當然)。我已經成立了一個PHP 7試驗箱看看我們的單元測試將通過在PHP 7和眼前的問題,我碰到的是,PEAR的依賴不起作用:使用Composer安裝PEAR包可以在PHP 7中工作嗎?
Loading composer repositories with package information
Initializing PEAR repository https://pear.php.net
Updating dependencies (including require-dev)
- Installing packagist/closurecompiler-bin (dev-master d52231c)
Cloning d52231c49813347010fa605d0f102ada68bb8b4b
- Installing pear-pear.php.net/structures_graph (1.1.1)
Loading from cache
[UnexpectedValueException]
Failed to extract PEAR package /opt/navigate/vendor/pear-pear.php.net/Structures_Graph/Structures_Graph-1.1.1.tgz to /opt/navigate/vendor/pear-pear.php.net/Structures_Graph. Reason: phar error: tar-base
d phar "Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered
[UnexpectedValueException]
phar error: tar-based phar "Structures_Graph-1.1.1/tests/BasicGraphTest.php" cannot be registered
我無法弄清楚這一點 - 它似乎是一個PHP 7的不兼容性,沒有人在網上寫作?
可能更適合在Github上發佈作曲家的問題:https://github.com/composer/composer – MECU
作曲家抱怨沒有名爲'pear-pear.php.net/ structures_graph'的軟件包。然而,有'pear/structures_graph'。您是否嘗試過運行'composer clearcache',然後運行'composer install'? – weirdan
啊,你直接使用pear版本庫,如下所述:https://getcomposer.org/doc/05-repositories.md#pear 然後忽略我以前的評論,有一個錯誤。 – weirdan