Search code examples
phpphpdocphpdocumentor2

PHPDocumentor `-d` results in empty documentation, but `-f` is working as expected


  • I have my PHP codes in folder called src.
  • That src folder is in folder called lib.
  • My documentation will be in lib/docs.
  • So, both src and lib are located in the same folder.

Now when I am generating the documentation:

  • I tried: php phpDocumentor.phar -f ../pdk/Something.php and it works fine!
  • I tried: php phpDocumentor.phar -d ../pdk but it does not work, the documentation is generated but it is empty. Not even Something.php got its documentations generated.

Solution

  • It's a bug -- https://github.com/phpDocumentor/phpDocumentor2/issues/1930

    Should be solved in next release.

    Workaround is to execute phpdoc in a directory so that the -d arg is -d .