编程语言
首页 > 编程语言> > 使用PEAR安装phpDocumentor

使用PEAR安装phpDocumentor

作者:互联网

http://www.phpdoc.org/,http://manual.phpdoc.org/HTMLSmartyConverter/HandS/phpDocumentor/tutorial_phpDocumentor.quickstart.pkg.htmlhttps://github.com/phpDocumentor/phpDocumentor2的主页上,安装phpDocumentor的说明如下:

pear channel-discover pear.phpdoc.org
pear install phpdoc/phpDocumentor

当我这样做时,我发现它已被弃用:

[root@desktop ~]# pear channel-discover pear.phpdoc.org
Adding Channel "pear.phpdoc.org" succeeded
Discovery of channel "pear.phpdoc.org" succeeded
[root@desktop ~]# pear install PhpDocumentor
WARNING: "pear/PhpDocumentor" is deprecated in favor of "phpdoc/phpdocumentor"
Did not download optional dependencies: pear/XML_Beautifier, use --alldeps to download automatically
pear/PhpDocumentor can optionally use package "pear/XML_Beautifier" (version >= 1.1)
downloading PhpDocumentor-1.4.4.tgz ...
Starting to download PhpDocumentor-1.4.4.tgz (1,534,088 bytes)
..............................................................................................................................................................................................................................................................................................................done: 1,534,088 bytes
install ok: channel://pear.php.net/PhpDocumentor-1.4.4
[root@desktop ~]# pear uninstall PhpDocumentor
uninstall ok: channel://pear.php.net/PhpDocumentor-1.4.4

根据http://www.phpdoc.org/docs/latest/for-users/installation/using-pear.html#requirements,说明如下:

$pear install phpdoc/phpDocumentor-beta

哪个是使用PEAR安装phpDocumentor的首选方法?

解决方法:

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 

标签:php,centos,phpdoc,pear,phpdocumentor2
来源: https://codeday.me/bug/20190722/1507952.html