Installing phpDocumentor using PEAR

穿精又带淫゛_ 提交于 2019-12-05 20:52:20
amarjit singh

To install PEAR

sudo apt-get install php-pear 
sudo pear channel-update pear.php.net 
sudo pear upgrade-all 

To install php doc

sudo pear channel-discover pear.phpdoc.org 
sudo pear remote-list -c phpdoc 
sudo pear config-set data_dir /var/www 
sudo pear install --alldeps PhpDocumentor 
sudo pear install phpdoc/phpDocumentor 
sudo mkdir /var/www/PhpDocumentor-output 
sudo chown www-data /var/www/PhpDocumentor-output 

To Install phpmd

sudo pear channel-discover pear.phpmd.org 
sudo pear remote-list -c phpmd 
sudo pear install phpmd/PHP_PMD 

To install codesniffer

sudo pear install PHP_CodeSniffer 

To install phpdepend

sudo pear channel-discover pear.pdepend.org 
sudo pear remote-list -c pdepend 
sudo pear install pdepend/PHP_Depend

To check all pear packages

sudo pear list all 

other useful commands

sudo pear upgrade-all 

to install phpunit test

sudo apt-get install phpunit 

I think the actual reason for that "deprecated" message you got was that you ran --

pear install phpdocumentor

without including the server alias of "phpdoc/" -- pear install phpdoc/phpdocumentor

No alias means the default alias of pear/ got used, thus pear install pear/phpdocumentor

That's why it gave you the 1.x version, hosted from PEAR. Notice that in your output:

[root@desktop ~]# pear install PhpDocumentor
WARNING: "pear/PhpDocumentor" is deprecated in favor of "phpdoc/phpdocumentor"

To get the 2.x version hosted at phpdoc.org, you must use the phpdoc/ alias -- pear install phpdoc/phpdocumentor

The capital D doesn't matter, and the -beta doesn't matter.

I think regarding to the erro message the PhpDocumentor should be installed by:

pear install phpdoc/phpdocumentor

(mind the small d).

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!