use phpDocumentor on symfony2

点点圈 提交于 2019-12-11 01:29:39

问题


I installed a new symfony 2.4 project and I installed also phpDocumentor using composer.phar folowing these steps:

1- Adding: "require-dev": { "phpdocumentor/phpdocumentor": "2.*" } to My composer.json

2- Executing : php composer.phar update

After installation terminated I can see phpdocumentor Folder in /vendor so I guess installation is terminated with success.

Now I want to know how to use phpDocumentor on symfony (generate a documentation for my code source).

I work on Ubuntu web server.

Thank you and sorry for my bad english.


回答1:


STEP 1. Add a dependency to phpdocumentor/phpdocumentor to the require-dev section of your project's composer.json configuration file, and update your application.

{
    "require-dev": {
        "phpdocumentor/phpdocumentor": "2.*"
    }
}

STEP 2. Run composer update command inside your project

STEP 3. Go to vendor\phpdocumentor\phpdocumentor\bin directory of your project from CMD and then run following command to generate document of AppBundle/Controller folder code. This will generate document of your AppBundle/Controller folder at \phpdocumentor\phpdocumentor\bin\doc destination.

Command:- php phpdoc run -d ../../../../src/AppBundle/Controller/ -t doc/



来源:https://stackoverflow.com/questions/21302257/use-phpdocumentor-on-symfony2

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