Question

phpdoc can be configured either using a .xml file or an .ini file. The documentation is ambiguous, but it seems that using an .xml file is currently the preferred approach. Agree?

Where should I place the .xml file?

According to http://www.phpdoc.org/docs/latest/for-users/configuration.html...

The easiest solution would be to place the configuration file in the root of your project with the name: phpdoc.dist.xml.

Which directory do they refer to as "the root of your project"? I've tried everything i.e.

/usr/share/pear/phpDocumentor, 
/var/www/phpDocumentor,
 /var/www,

and nothing seems to work.

Was it helpful?

Solution

the root of your project is where you put the code that you need to genereate the doc. example: you need to generate the doc for code inside /var/www/example directory, then the phpdoc.dist.xml. shoud be in it. It works just like composer and phpunit.

example again:

$ phpdoc -d ./src -t ./docs/api

phpdoc.dist.xml should bi in ./src

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top