Smart and Readable Documentation for PHP projects
ApiGen is easy to use and modern API doc generator supporting all PHP 8.1 features.
- PHP 8.1
- PHP 8.0
- PHP 7.4
Built on Shoulders of Giants
This will install ApiGen to
composer create-project apigen/apigen tools/apigen
Generate API docs by passing source directories and destination option:
tools/apigen/bin/apigen src --output docs
ApiGen can be configured with
apigen.neon configuration file.
parameters: # string, passed as arguments in CLI, e.g. ['src'] paths:  # string, --include in CLI, included files mask, e.g. ['*.php'] include: ['*.php'] # string, --exclude in CLI, excluded files mask, e.g. ['tests/**'] exclude:  # bool, should protected members be excluded? excludeProtected: false # bool, should private members be excluded? excludePrivate: true # string, list of tags used for excluding class-likes and members excludeTagged: ['internal'] # string, --output in CLI outputDir: '%workingDir%/api' # string | null, --theme in CLI themeDir: null # string, --title in CLI title: 'API Documentation' # string, --base-url in CLI baseUrl: '' # int, --workers in CLI, number of processes that will be forked for parallel rendering workerCount: 8 # string, --memory-limit in CLI memoryLimit: '512M'
To achieve the best performance you need
pcntlextension (required for parallel rendering) and
opcacheextension with enabled JIT