phpDocumentor

phpDocumentor enables you to generate documentation from your PHP source code.

YAML Configuration

phpdocumentor:

  • config-file:

    • Path to the phpDocumentor configuration file (phpdoc.dist.xml).
    • If this field is omitted, Docstand searches for phpdoc.dist.xml under the repository. If phpdoc.dist.xml is present, Docstand uses it to build documentation.
  • input-dirs:

    • Defaults to the repository root.
    • Docstand passes the input-dirs values to the phpDocumentor's -d option.
  • machine:

    • cpu:

      Amount of CPU. The default machine has 0.5 CPU with 1920 MiB RAM.

  • options:

    Below is the list of supported options:

    --encoding            encoding to be used to interpret source files with
    --extensions (-e)     Comma-separated list of extensions to parse, defaults to php, php3 and phtml (multiple values allowed)
    --ignore (-i)         Comma-separated list of file(s) and directories (relative to the source-code directory) that will be ignored. Wildcards * and ? are supported (multiple values allowed)
    --ignore-tags         Comma-separated list of tags that will be ignored, defaults to none. package, subpackage and ignore may not be ignored. (multiple values allowed)
    --hidden              Use this option to tell phpDocumentor to parse files and directories that begin with a period (.), by default these are ignored
    --ignore-symlinks     Ignore symlinks to other files or directories, default is on
    --markers (-m)        Comma-separated list of markers/tags to filter (multiple values allowed)
    --title               Sets the title for this project; default is the phpDocumentor logo
    --visibility          Specifies the parse visibility that should be displayed in the documentation (comma separated e.g. "public,protected") (multiple values allowed)
    --defaultpackagename  Name to use for the default package. (default: "Default")
    --sourcecode          Whether to include syntax highlighted source code
    --template            Name of the template to use (Allowed templates are clean, responsive and responsive-twig. Default is clean)
    --parseprivate        Whether to parse DocBlocks marked with @internal tag
    --ansi                Force ANSI output
    --no-ansi             Disable ANSI output
    

Examples

  • With phpdoc set to default

    docstand:
      phpdocumentor: default
    
  • With custom machine:

    docstand:
      phpdocumentor:
        machine:
          cpu: 1.5 # 1.5 CPU, 5760 MiB RAM
    
  • With config-file option

    docstand:
      phpdocumentor:
        config-file: ./phpdoc.xml
    
  • With customized phpdoc

    docstand:
      phpdocumentor:
        config-file: ./phpdoc.xml
        input-dirs: [src]
        options:
          --template: responsive-twig
          --ignore: "**/tests/**"
    

results matching ""

    No results matching ""