2

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.

Phill Pafford
  • 83,471
  • 91
  • 263
  • 383
qdelettre
  • 1,873
  • 5
  • 25
  • 36

1 Answers1

5

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
Jakub Zalas
  • 35,761
  • 9
  • 93
  • 125
  • I got a lot of error following your answer, see [composer.json](http://pastebin.com/DbQTQvZe) and [errors](http://pastebin.com/rys6BhdR) – qdelettre Sep 26 '12 at 09:52
  • 3
    Looks like you got some outdated composer.json from 2.1.0, it had some issues that were resolved in 2.1.1+, update the requirements of the [standard edition](https://github.com/symfony/symfony-standard/blob/2.1/composer.json) into your composer.json and run `composer update --dev` – Seldaek Sep 26 '12 at 17:53
  • Before reading your comment, i deleted my vendor dir, copy pasted the composer.json from the Symfony2 archive, added the require-dev part for phpdocumentor and run php composer.phar install then update --dev. It works :) – qdelettre Sep 27 '12 at 07:12