e-Zest members share technology ideas to foster digital transformation.

phpDocumentor in Magento 2

Written by Darshan Khatri | Sep 18, 2018 11:43:00 AM
What is phpDocumentor?

PHPDoc is open source documentation generator written in PHP language. It automatically parses PHP source code and generates readable API and documents, which enables us to provide insights of source code.

Installing on linux

1. System requirements

  • PHP 5.3.3
  • intl extension for PHP
  • Graphviz
Click here to download Graphviz

2. Using PHAR

  • You can download PHAR file by clicking here.
  • After the download, move it to /usr/local/bin and rename it to “phpdoc”.
  • Now use command “phpdoc --version”. You will be able to see the result.
    phpDocumentor version v2.9.0
After successfully installing, you can generate phpDoc for any of your projects.

In order to generate phpDoc, you need to run this command in the terminal:

phpdoc -d “path/to/your/project/folder” -t “path/to/phpdoc/output” --template="responsive-twig" --title="Ezest Sample Project"

There are different types of templates available in phpDoc.

  • check style
  • clean
  • responsive-twig
Below is the output of above command.


Click on “Errors” to see all the errors related to individual class files.


Hope this helps you to implement phpDoc in your project.