Search code examples
phpsymfonydocumentationcomposer-phppackagist

How to install phpdoc in Symfony2 with composer


I would like to install phpdoc to build documentation for my symfony2 project. Is there a way to install it like a bundle with composer and in vendor dir ?

I don't need Pear for any other tool, so using composer would be nice.


Solution

  • There's an official package for phpDocumentor on packagist. Simply add it to your require-dev section (since you'll only need it for development):

    {
        "require-dev": {
            "phpdocumentor/phpdocumentor": "~2.2"
        },
        "config": {
            "bin-dir": "bin"
        }
    }
    

    Install your dependencies:

    php composer.phar install