No description
Find a file
Vítězslav Dvořák be92114dee Backage built
2020-08-10 09:49:07 +02:00
bin Backage built 2020-08-10 09:49:07 +02:00
debian Backage built 2020-08-10 09:49:07 +02:00
docs README: add screen 2017-08-03 18:18:46 +02:00
packages Merge pull request #2 from siad007/patch-1 2020-08-09 14:19:12 +02:00
src configuration: resolve apigen.yml config case-insensitively 2017-11-20 15:39:03 +01:00
tests use newer symfony to fix bug in parsing apigen.yml 2017-11-20 15:44:05 +01:00
.coveralls.yml Use Coveralls for coverage (#918) 2017-06-30 23:30:18 +02:00
.editorconfig cleanup 2017-05-04 14:33:18 +02:00
.gitattributes cleanup 2017-06-09 19:29:01 +02:00
.gitignore Backage built 2020-08-10 09:49:07 +02:00
.travis.yml travis: disable global install test, due to better-reflection PR commit lock (for now) 2017-08-31 12:59:07 +02:00
apigen.yml use newer symfony to fix bug in parsing apigen.yml 2017-11-20 15:44:05 +01:00
CODE_OF_CONDUCT.md CODE_OF_CONDUCT added (#914) 2017-06-30 15:56:46 +02:00
composer.json Backage built 2020-08-10 09:49:07 +02:00
easy-coding-standard.neon composer: update BR + ECS 2017-10-01 09:36:31 +02:00
LICENSE LICENSE: break long line 2017-03-31 21:27:20 +02:00
phpstan.neon bump to PHPStan 0.8, add fixes 2017-08-02 13:07:42 +02:00
phpunit.xml return all tests to phpunit 2017-05-31 00:58:33 +02:00
README.md update of roave/better-reflection version 2018-10-26 16:10:46 +02:00

Smart and Readable Documentation for your PHP project

Build Status Coverage Status Downloads Latest stable

ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is all PHP 7.1 features ready easy to extend with own Finder, Annotation Subscriber or even Generator.

Just look at ApiGen API:

ApiGen Preview

Your Help is Needed to Finish 5.x Release

❤️ We need your help to test new version of ApiGen.

How to install it?

Add to your composer.json:

{
    "require": {
        "apigen/apigen": "dev-master",
        "roave/better-reflection": "dev-master#1efdfe5"
    }
}

then update:

composer update

Test it, report issues or send PRs.

💀 Version 4.x is not supported, since there was huge change of Reflection library and the code was almost completely rewritten.

Built on Shoulders of Giants

Install

composer require apigen/apigen --dev

Usage

Generate API docs by passing single source and destination options:

vendor/bin/apigen generate src --destination docs

Or generate API docs for multiple directories:

vendor/bin/apigen generate src tests --destination docs

Configuration

Below is a minimal example configuration. Save it as a apigen.yml file in the root of your project:

parameters:
    visibility_levels: [public, protected] # array
    annotation_groups: [todo, deprecated] # array
    title: "ApiGen Docs" # string
    base_url: "http://apigen.org/api" # string
    overwrite: false # bool

What Annotations Have Extra Care?

@see, @covers, @uses

Reference to Class, Function, Property, Method etc. element.

In Code

/**
 * @see SomeClass
 * @see SomeClass::$propety
 * @see SomeClass::someFunction()
 */

Generated

@see <a href="class-SomeClass.html">SomeClass</a>
@see <a href="class-SomeClass.html#$someProperty">SomeClass::$property</a>
@see <a href="class-SomeClass.html#_someFunction">SomeClass::someFunction()</a>

A website url.

In Code

/**
 * This is already mentioned on Wiki.
 * @link https://en.wikipedia.org/wiki/United_we_stand,_divided_we_fall Click to see a cool quote
 */

Generated

This is already mentioned on Wiki.
@link <a href="https://en.wikipedia.org/wiki/United_we_stand,_divided_we_fall">Click to see a cool quote</a>

@internal

Associated element is internal, so ApiGen hides it.

Themes

To enable a custom theme just provide theme_directory configuration option in your apigen.yml:

parameters:
    theme_directory: path/to/theme # path to theme's config file

Contributing

Rules are simple:

  • new feature needs tests
  • all tests must pass
    composer complete-check
    
  • 1 feature per PR

We would be happy to merge your feature then.