0

When I generate API docs with phpDocumentor, the page Reports -> Markers always says No markers have been found in this project, despite I have several TODO markers in my PHP code.

I have phpDocumentor v3.0.0. I run it with: php phpDocumentor.phar --markers

My phpdoc.dist.xml file contains:

<?xml version="1.0" encoding="UTF-8" ?>
<phpdocumentor
  configVersion="3"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="https://www.phpdoc.org"
  xsi:noNamespaceSchemaLocation="https://docs.phpdoc.org/latest/phpdoc.xsd"> 
  <paths>
    <output>apidocs/docs</output>
    <cache>apidocs/cache</cache>
  </paths>
  <version number="3.0.0">
    <api>
      <source dsn=".">
        <path>src</path>
        <path>*.php</path>
      </source>
      <markers>
        <marker>TODO</marker>
      </markers>
    </api>
  </version>
</phpdocumentor>

And I use TODO markers in my PHP code like this:

/**
 * TODO marker 1
 */
function someFunction(...) {
  // ...
}


function anotherFunction(...) {
  // TODO marker 2
  // ...
}
Leszek Pachura
  • 403
  • 4
  • 18
  • Did you try to use @todo PHPDoc tag on method level? – greeflas Apr 06 '21 at 22:30
  • 1
    @greeflas Thanks, it seems that - unfortunately - this is the only supported way of using markers with PHPDoc, despite the documentation saying otherwise... – Leszek Pachura Apr 08 '21 at 00:11
  • That stinks, I thought it was going to find all my `// TODO` comments. Mine is not even finding the `@todo` in the php docblocks. – RcoderNY Apr 28 '21 at 17:11

0 Answers0