通过Phing,phpdocumentor.ini位置运行phpdoc

时间:2013-10-07 10:59:17

标签: xampp phpdoc phing

我正在从头开始重建我的xampp和CI环境(在win7上)但是在通过phing运行phpdoc时遇到了麻烦。特别是,Phing正在寻找phpdocumentor.ini在一个不存在的地方(而且从来没有)。

Phing和PhpDocumentor都是通过Pear安装的,路径设置似乎很好,并且有这些版本:

php version 5.4.7
pear version 1.9.4
phpdoc version 2.0.1
phing version 2.6.1     

系统上的相关路径是:

H:\xampp\php;
H:\xampp\php\pear;

在我的示例项目中:

我可以毫不费力地运行phpdoc,例如:phpdoc -d apps -t docs运行良好。

这是我的phpdoc任务,过去运作良好:

<phpdoc title=Docs" destdir="${docsdir}" sourcecode="false" output="HTML:frames:earthli">
    <fileset dir="./apps">
        <include name="**/*.php" />
    </fileset>
    <projdocfileset dir=".">
        <include name="README" />
        <include name="INSTALL" />
        <include name="CHANGELOG" />
    </projdocfileset>
</phpdoc>

当我运行Phing时,phpdoc失败并发出以下通知:

Parsing configuration file phpDocumentor.ini...
   (found in C:\php\pear\data/PhpDocumentor/)...
ERROR: cannot open phpDocumentor.ini in directory
-Is phpdoc in either the path or include_path in your php.ini file?

没有c:\ php ...目录,从来没有,所以我不知道它来自哪里。

如果我创建整个PHPDocumentor结构Phing预期在C上,我只能得到这个工作:但我理想的是希望改变ini文件的预期位置,所以我在一个驱动器上有所有内容。

有什么方法可以告诉Phing我的phpdocumentor.ini的真实位置?

我没有在SO上列出这个特定的问题,但我希望其他人已经看到并纠正了这个问题。 Phing网站docs / forum / trac没有列出这个问题的最近报道。

全部谢谢

2 个答案:

答案 0 :(得分:1)

看起来你正在尝试使用phpDocumentor 2.x并从看起来像phpDocumentor 1.x看到一些行为。也许XAMPP源代码中附带的一些1.x代码会延迟并影响您干净地运行2.x的能力。

在考虑Phing角度时,在浏览Phing手册时,看起来用于phpDocumentor 2.x的正确Phing任务是DocBlox任务[1]而不是旧的PhpDoc任务。

[1] - http://www.phing.info/docs/guide/stable/apcs52.html

答案 1 :(得分:0)

下载XAMPP for Windows的最新zip存档版本我看到该文件:

\xampp\php\pear\PhpDocumentor\phpDocumentor\Setup.inc.php

函数parseIni()直接引用上述路径:

enter code here phpDocumentor_out(&#34;(见于&#34;。&#39; C:\ php \ pear \ data / PhpDocumentor&#39; .PATH_DELIMITER。&#34;)... \ n&#34);

因此,它比我升级或强制重新安装的任何组件更容易成为XAMPP问题。