问题
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