Skip to content
Snippets Groups Projects
README.md 2.86 KiB
Newer Older
  • Learn to ignore specific revisions
  • Sebastian Bergmann's avatar
    Sebastian Bergmann committed
    phpDox
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    *phpDox* is a documentation generator for PHP projects.
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    This includes, but is not limited to, API documentation. The main focus is on enriching
    the generated documentation with additional details like code coverage, complexity information
    and more.
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    [![Build Status](https://travis-ci.org/theseer/phpdox.svg?branch=master)](https://travis-ci.org/theseer/phpdox)
    
    [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/theseer/phpdox/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/theseer/phpdox/?branch=master)
    
    
    Requirements
    ------------
    
    
    - PHP Version 7.1+ (For PHP 5.5+, use phpDox 0.11.2)
    
    Deni's avatar
    Deni committed
      - ext/dom
      - ext/xsl
    
    Sebastian Bergmann's avatar
    Sebastian Bergmann committed
      - ext/iconv and [libiconv version >= 2.12](http://www.gnu.org/software/libiconv/documentation/libiconv/iconv.1.html)
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    - PHPParser [PHP Parser API](https://github.com/nikic/PHP-Parser)
    
    Sebastian Bergmann's avatar
    Sebastian Bergmann committed
    - [fDOMDocument](http://github.com/theseer/fDOMDocument)
    - [DirectoryScanner](http://github.com/theseer/DirectoryScanner)
    - [fXSL](http://github.com/theseer/fXSL)
    - [PHP_Timer](http://github.com/sebastianbergmann/php-timer)
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    Phar Installation
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    phpDox is shipping as a selfcontained executable phar archive. You can grab your copy from the
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    [releases](https://github.com/theseer/phpdox/releases/latest) section or install using [phive](https://phar.io):
    
    Arne Blankerts's avatar
    Arne Blankerts committed
        phive install phpdox
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    You can now execute phpdox on the command line:
    
    
    Arne Blankerts's avatar
    Arne Blankerts committed
        tools/phpdox --version
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    If everything worked out, you should get an output like this:
    
        phpDox 0.11.2 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    
    Sebastian Bergmann's avatar
    Sebastian Bergmann committed
    
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    _Note: Some Linux distributions ship PHP with ext/suhosin and disabled phar execution. To make use of phpDox in such an environment, you need to enable phar execution by adding phar to the executor white list: suhosin.executor.include.whitelist="phar"_
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    Composer Installation
    ---------------------
    
    Additionally, phpDox can be installed via composer:
    
        composer require --dev theseer/phpdox 
    
    You can now execute phpdox on the command line:
    
        vendor/bin/phpdox --version
    
    If everything worked out, you should get an output like this:
    
    
        phpDox 0.11.2 - Copyright (C) 2010 - 2018 by Arne Blankerts and Contributors
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    
    
    Arne Blankerts's avatar
    Arne Blankerts committed
    
    
    Developer Installation
    ----------------------
    
    
    Sebastian Bergmann's avatar
    Sebastian Bergmann committed
    In case you want to go bleeding edge or hack on the source, you will have to clone this repository.
    
    Arne Blankerts's avatar
    Arne Blankerts committed
        git clone git://github.com/theseer/phpdox.git
        composer install
    
    
    
    Usage Examples
    --------------
    
    Sebastian Bergmann's avatar
    Sebastian Bergmann committed
    You can run phpDox like this:
    
        phpdox --help
    
    Sebastian Bergmann's avatar
    Sebastian Bergmann committed
    
    
    As of version 0.4 phpDox requires an xml configuration file. In case a project you want to generate documentation for does not come with one, you can create it by calling
    
        phpdox --skel > phpdox.xml.dist
    
    Sample invocation to parse and generate output based on the default phpdox.xml configuration file
    
    or you can tell `phpdox` what configuration file to use by calling switch `--file` or in short
    
    
        phpdox -f path/to/phpdox.xml