Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)

Related tags

Documentation phpdox
Overview

phpDox

phpDox is a documentation generator for PHP projects. 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.

Build Status Scrutinizer Code Quality

Requirements

Phar Installation

phpDox is shipping as a selfcontained executable phar archive. You can grab your copy from the releases section or install using phive:

phive install phpdox

You can now execute phpdox on the command line:

tools/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

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"

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

Developer Installation

In case you want to go bleeding edge or hack on the source, you will have to clone this repository.

git clone git://github.com/theseer/phpdox.git
composer install

Usage Examples

You can run phpDox like this:

phpdox --help

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

phpdox

or you can tell phpdox what configuration file to use by calling switch --file or in short

phpdox -f path/to/phpdox.xml
Comments
  • UTF-8 Problems

    UTF-8 Problems

    Hi there,

    the company I work in tries to use PHPDOX in Jenkins as stated here: Template for Jenkins Jobs for PHP Projects

    However, we get the followin error:

    [exec] [26.03.2015 - 21:35:50] - PATH_TO_FILE1.php (Encoding error - conversion to UTF-8 failed) [exec] [26.03.2015 - 21:35:50] - PATH_TO_FILE2.php (Encoding error - conversion to UTF-8 failed) [exec] [26.03.2015 - 21:35:50] Saving results to directory 'build/phpdox' [exec] [exec] [exec] Oups... phpDox encountered a problem and has terminated! [exec] [exec] It most likely means you've found a bug, so please file a report for this [exec] and paste the following details and the stacktrace (if given) along: [exec] [exec] PHP Version: 5.4.35 (WINNT) [exec] PHPDox Version: 0.7.0 [exec] Exception: TheSeer\fDOM\fDOMException (Code: 3) [exec] Location: phar://D:/phpdox.phar/fDOMDocument-1.5.0/TheSeer/fDOMDocument/fDOMDocument.php (Line 234) [exec] [exec] saving xml file failed [exec] [exec] [XML-STRING] [Line: 0 - Column: 0] Fatal Error 6003: output conversion failed due to conv error, bytes 0xFC 0x63 0x6B 0x74 [exec] [XML-STRING] [Line: 0 - Column: 0] Error 1544: encoder error [exec] [exec] [exec] #0 phar://D:/phpdox.phar/phpdox/Application.php(138): TheSeer\phpDox\Collector\Project->save() [exec] #1 phar://D:/phpdox.phar/phpdox/CLI.php(148): TheSeer\phpDox\Application->runCollector() [exec] #2 D:\PHPtools\phpdox.phar(460): TheSeer\phpDox\CLI->run() [exec] [exec] [exec] [exec] Result: 1

    I understand that this is because of the Umlauts we use in the code. But is this a problem with PHPDOX or is the problem our code?

    I have the same problem with another tool, so maybe the problem is with our code. https://github.com/pdepend/pdepend/issues/195

    opened by Eternal-Infinity 26
  • phpdox creates empty content

    phpdox creates empty content

    I have a bigger php project but running phpdox leaves only a few css files and an index.xhtml file.

    This is the phpdox output:

    phpdox:
         [exec] phpdox 0.4.0 - Copyright (C) 2010 - 2012 by Arne Blankerts
         [exec] 
         [exec] [29.03.2012 - 20:08:23] Using config file '/var/lib/jenkins/jobs/Textadventure/workspace/phpdox.xml'
         [exec] [29.03.2012 - 20:08:23] Registered output engine 'html'
         [exec] [29.03.2012 - 20:08:23] Registered output engine 'graph'
         [exec] [29.03.2012 - 20:08:23] Registered output engine 'todo'
         [exec] [29.03.2012 - 20:08:23] Registered output engine 'xslrunner'
         [exec] [29.03.2012 - 20:08:23] Starting to process project 'Textadventure-NextGen'
         [exec] [29.03.2012 - 20:08:23] Starting collector
         [exec] 
         [exec] ..................................................  [50]
         [exec] ...................................                 [85]
         [exec] 
         [exec] 
         [exec] [29.03.2012 - 20:08:27] Collector process completed
         [exec] [29.03.2012 - 20:08:27] Starting generator
         [exec] 
         [exec] ......                                              [6]
         [exec] 
         [exec] 
         [exec] [29.03.2012 - 20:08:27] Triggering raw engines
         [exec] 
         [exec] [29.03.2012 - 20:08:27] Generator process completed
         [exec] [29.03.2012 - 20:08:27] Processing project 'Textadventure-NextGen' completed.
         [exec] 
         [exec] 
         [exec] Time: 4 seconds, Memory: 9.50Mb
         [exec] 
    

    and this my xml file

    <?xml version="1.0" encoding="UTF-8"?>
    <phpdox xmlns="http://phpdox.de/config">
    
        <project name="Textadventure-NextGen" source="." workdir="build/phpdox">
    
            <collector publiconly="false">
                <include mask="*.php" />
                <exclude mask="**/protected/vendors/**" />
                <exclude mask="**/protected/tests/**" />
            </collector>
    
            <generator output="build">
    
                <build engine="html" enabled="true" output="api" />
    
                <build engine="todo" enabled="true" output="todo">
                    <file name="todolist.txt" encoding="utf-8" />
                </build>
    
            </generator>
    
        </project>
    
    </phpdox>
    
    Bug 
    opened by firegate666 24
  • No reports or PHPUnit coverage

    No reports or PHPUnit coverage

    When I run phpdox 0.6.6 I have two problems:

    1 - No information from the PHPUnit enricher

    Next to all of my classes it just says UNTESTED. I have PHPUnit 4.1, and its code coverage xml files are in build/coverage/xml and the relevant portion on my phpdox.xml is

    <enrich base="${basedir}/build">
        <source type="phpunit">
            <coverage path="coverage/xml" />
        </source>
    </enrich>
    

    I get no errors thrown when I run phpdox.

    2 - Broken Reports link

    The top navbar link for reports goes to an ungenerated file. I'm not sure what is supposed to be in that file, but neither a reports.html nor a reports/index.html are generated.

    opened by gubler 22
  • Token Exception missing file

    Token Exception missing file

    I was trying to run phpdox on windows server 2012 - but I am getting the error:

    PHP Version: 7.0.5 (WINNT) PHPDox Version: 0.8.1.1 Exception: TheSeer\phpDox\Generator\TokenFileException (Code: 1) Location: phar://D:/htdocs/AscPro/bin/phpdox-0.8.1.1.phar/phpdox/generator/pro ject/TokenFile.php (Line 19)

    File 'file:/D:/htdocs/AscPro/build/phpdox/tokens/AppBundle/AppBundle.php.xml' not found

    I've checked the location, the file is not missing. I'm running into this problem during continuous integration process with jenkins. It is very strange, because the same phpdox version did work for me on ubuntu. Maybe this is related to the fact, that all programs lay on "C:", including Jenkins - but the workspace lays on "D:"? Or is this a bug?

    Bug 
    opened by novacp 21
  • Added object return type support for PHP 7.2

    Added object return type support for PHP 7.2

    If a method has object as the return type, which was introduced in PHP 7.2, the file will be omitted from the documentation.

    This fix simply adds object to the array of valid return types.

    opened by benpitman 19
  • Many exceptions running phpdox

    Many exceptions running phpdox

    Running the latest version with a fairly simple config on a small codebase is failing rather hard... can't quite figure out what's up.

    EvilGenius:markii nate$ sudo pear install pear.netpirates.net/phpDox-0.5.0
    theseer/phpDox is already installed and is the same as the released version 0.5.0
    

    phpdox.xml:

    <?xml version="1.0" encoding="UTF-8" ?>
    <phpdox xmlns="http://phpdox.de/config">
        <project name="markii" source="src" workdir="build/phpdox">
            <collector publiconly="false" backend="parser">
                <include mask="*.php"/>
                <exclude mask="*Autoload.php"/>
            </collector>
            <generator output="build">
                <build engine="html" enabled="true" output="api"/>
            </generator>
        </project>
    </phpdox>
    

    output:

    EvilGenius:markii nate$ phpdox
    phpDox 0.5.0 - Copyright (C) 2010 - 2013 by Arne Blankerts
    
    [30.05.2013 - 20:43:14] Using config file '/Users/nate/Projects/Dishopinion/markii/phpdox.xml'
    [30.05.2013 - 20:43:14] Registered collector backend 'parser'
    [30.05.2013 - 20:43:14] Registered output engine 'html'
    [30.05.2013 - 20:43:14] Registered output engine 'graph'
    [30.05.2013 - 20:43:14] Registered output engine 'todo'
    [30.05.2013 - 20:43:14] Starting to process project 'markii'
    [30.05.2013 - 20:43:14] Starting collector
    
    
    Oups... phpDox encountered a problem and has terminated!
    It most likely means you've found a bug, so please file a report for this and paste the stacktrace (if given) along!
    
    Exception: TheSeer\fDOM\fDOMException
    Location: /usr/local/php5-5.3.25-20130520-141754/lib/php/TheSeer/fDOMDocument/fDOMDocument.php (Line 137)
    
    loading file 'build/phpdox/source.xml' failed.
    
    [/Users/nate/Projects/Dishopinion/markii/build/phpdox/source.xml] [Line: 2 - Column: 1] Fatal Error 4: Start tag expected, '<' not found
    
    
    #0 /usr/local/php5-5.3.25-20130520-141754/lib/php/TheSeer/phpDox/project/Project.php(78): TheSeer\phpDox\Project\Project->initCollections()
    #1 /usr/local/php5-5.3.25-20130520-141754/lib/php/TheSeer/phpDox/shared/Factory.php(235): TheSeer\phpDox\Project\Project->__construct()
    
    
    Oups... phpDox encountered a problem and has terminated!
    It most likely means you've found a bug, so please file a report for this and paste the stacktrace (if given) along!
    
    Exception: ErrorException
    Location: /usr/local/php5-5.3.25-20130520-141754/lib/php/TheSeer/phpDox/shared/ErrorHandler.php (Line 137)
    
    Undefined index: file
    
    #0 /usr/local/php5-5.3.25-20130520-141754/lib/php/TheSeer/phpDox/shared/ErrorHandler.php(117): TheSeer\phpDox\ErrorHandler->renderException()
    #1 /usr/local/php5-5.3.25-20130520-141754/lib/php/TheSeer/phpDox/CLI.php(165): TheSeer\phpDox\ErrorHandler->handleException()
    #2 /usr/local/php5-5.3.25-20130520-141754/bin/phpdox(60): TheSeer\phpDox\CLI->run()
    
    opened by NathanielMichael 18
  • encoder error

    encoder error

    Tried latest version - installed via composer "theseer/phpdox": "*"

     [exec] [26.08.2014 - 18:37:10] Saving results to directory '/vagrant/xxx/yyy/build/phpdox/xml'
     [exec] 
     [exec] 
     [exec] Oups... phpDox encountered a problem and has terminated!
     [exec] 
     [exec] It most likely means you've found a bug, so please file a report for this
     [exec] and paste the following details and the stacktrace (if given) along:
     [exec] 
     [exec] PHP Version: 5.4.30-2+deb.sury.org~precise+1 (Linux)
     [exec] PHPDox Version: REL-3400-33-gb72f211-dirty
     [exec] Exception: TheSeer\fDOM\fDOMException (Code: 3)
     [exec] Location: /vagrant/xxx/yyy/vendor/theseer/fdomdocument/src/fDOMDocument.php (Line 234)
     [exec] 
     [exec] saving xml file failed
     [exec] 
     [exec] [XML-STRING] [Line: 0 - Column: 0] Fatal Error 6003: output conversion failed due to conv error, bytes 0xA0 0x7B 0x40 0x69
     [exec] [XML-STRING] [Line: 0 - Column: 0] Error 1544: encoder error
     [exec] 
     [exec] 
     [exec] #0 /vagrant/xxx/yyy/vendor/theseer/phpdox/src/Application.php(138): TheSeer\phpDox\Collector\Project->save()
     [exec] #1 /vagrant/xxx/yyy/vendor/theseer/phpdox/src/CLI.php(148): TheSeer\phpDox\Application->runCollector()
     [exec] #2 /vagrant/xxx/yyy/vendor/theseer/phpdox/composer/bin/phpdox(30): TheSeer\phpDox\CLI->run()
    
    opened by guckykv 16
  • Class 'PhpParser\ErrorHandler\Throwing' not found

    Class 'PhpParser\ErrorHandler\Throwing' not found

    I install phpdox with composer

    PHP Version: 7.0.12-1+deb.sury.org~xenial+1 (Linux)
    PHPDox Version: 0.8.2-dev
    Exception: Error (Code: 0)
    Location: /var/www/website/vendor/nikic/php-parser/lib/PhpParser/Parser/Multiple.php (Line 28)
    
    Class 'PhpParser\ErrorHandler\Throwing' not found
    
    #0 /var/www/website/vendor/theseer/phpdox/src/collector/Collector.php(141): TheSeer\phpDox\Collector\Backend\PHPParser->parse()
    #1 /var/www/website/vendor/theseer/phpdox/src/collector/Collector.php(105): TheSeer\phpDox\Collector\Collector->processFile()
    #2 /var/www/website/vendor/theseer/phpdox/src/Application.php(122): TheSeer\phpDox\Collector\Collector->run()
    #3 /var/www/website/vendor/theseer/phpdox/src/CLI.php(161): TheSeer\phpDox\Application->runCollector()
    #4 /var/www/website/vendor/theseer/phpdox/phpdox(67): TheSeer\phpDox\CLI->run()
    
    $ composer info | grep phpdox
    theseer/phpdox                       0.9.0              A fast Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT) with event based processing
    
    composer info | grep php-parser
    nikic/php-parser                     dev-master c0f0edf A PHP parser written in PHP
    
    opened by torbenbr 15
  • Failed to load external entity components.xsl

    Failed to load external entity components.xsl

    Just a dump of my output... Not that much information from what I can see.

    [26.11.2015 - 21:00:28] Collector process completed

    [26.11.2015 - 21:00:28] Starting generator [26.11.2015 - 21:00:28] Loading enrichers [26.11.2015 - 21:00:28] Enricher Build Information initialized successfully [26.11.2015 - 21:00:28] Starting event loop.

    ....I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/components.xsl" I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/functions.xsl" I/O warning : failed to load external entity "phar://phpdox.phar/templates/html/synopsis.xsl"

    Oups... phpDox encountered a problem and has terminated!

    It most likely means you've found a bug, so please file a report for this and paste the following details and the stacktrace (if given) along:

    PHP Version: 5.4.45 (Darwin) PHPDox Version: 0.8.1.1 ErrorException: E_WARNING Location: phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php (Line 192)

    XSLTProcessor::transformToDoc(): No stylesheet associated to this object #0 phar:///usr/local/bin/phpdox/vendor/theseer/fxsl/src/fxsltprocessor.php(192): XSLTProcessor->transformToDoc() #1 phar:///usr/local/bin/phpdox/phpdox/generator/engine/html/Html.php(208): TheSeer\fXSL\fXSLTProcessor->transformToDoc() #2 unknown(0): TheSeer\phpDox\Generator\Engine\Html->buildClass() #3 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(203): call_user_func() #4 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(277): TheSeer\phpDox\Generator\Generator->handleEvent() #5 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(249): TheSeer\phpDox\Generator\Generator->processClass() #6 phar:///usr/local/bin/phpdox/phpdox/generator/Generator.php(142): TheSeer\phpDox\Generator\Generator->processWithNamespace() #7 phar:///usr/local/bin/phpdox/phpdox/Application.php(241): TheSeer\phpDox\Generator\Generator->run() #8 phar:///usr/local/bin/phpdox/phpdox/CLI.php(165): TheSeer\phpDox\Application->runGenerator() #9 /usr/local/bin/phpdox(451): TheSeer\phpDox\CLI->run()

    Pending 
    opened by jrobens 15
  • Configuration Improvments

    Configuration Improvments

    Streamlined the configuration and added an XSD for it. Fixed Windows problems along the way. Added the possibility to define a resource path (for the static files) to the html engine. So it is possible to use the templates with own styles and images.

    opened by ThomasWeinert 15
  • AbstractUnitObject.php (Line 542): Call to a member function getAttribute() on null

    AbstractUnitObject.php (Line 542): Call to a member function getAttribute() on null

    Getting the following error when trying to generate documentation after clearing the cache.

    phpDox 0.7.0-64-gd70cae2 - Copyright (C) 2010 - 2015 by Arne Blankerts
    
    [07.01.2015 - 16:17:36] Using config file 'build/phpdox.xml'
    [07.01.2015 - 16:17:36] Registered collector backend 'parser'
    [07.01.2015 - 16:17:36] Registered enricher 'build'
    [07.01.2015 - 16:17:36] Registered enricher 'git'
    [07.01.2015 - 16:17:36] Registered enricher 'checkstyle'
    [07.01.2015 - 16:17:36] Registered enricher 'phpcs'
    [07.01.2015 - 16:17:36] Registered enricher 'pmd'
    [07.01.2015 - 16:17:36] Registered enricher 'phpunit'
    [07.01.2015 - 16:17:36] Registered enricher 'phploc'
    [07.01.2015 - 16:17:36] Registered output engine 'xml'
    [07.01.2015 - 16:17:36] Registered output engine 'html'
    [07.01.2015 - 16:17:36] Starting to process project 'project'
    [07.01.2015 - 16:17:36] Starting collector
    [07.01.2015 - 16:17:36] Scanning directory '/var/lib/jenkins/workspace/project/build/..' for files to process
    
    ..................................................  [50]
    ..................................................  [100]
    ...............................                     [131]
    
    [07.01.2015 - 16:17:46] Saving results to directory '/var/lib/jenkins/workspace/project/build/logs/phpdox/xml'
    [07.01.2015 - 16:17:50] Resolving inheritance
    
    ............................................
    
    Oups... phpDox encountered a problem and has terminated!
    
    It most likely means you've found a bug, so please file a report for this
    and paste the following details and the stacktrace (if given) along:
    
    PHP Version: 5.6.4 (Linux)
    PHPDox Version: 0.7.0-64-gd70cae2
    ErrorException: E_ERROR 
    Location: /var/lib/jenkins/workspace/project/vendor/theseer/phpdox/src/collector/project/AbstractUnitObject.php (Line 542)
    
    Call to a member function getAttribute() on null
    
    No stacktrace available
    

    If I run phpdox again (now some caches exist) it compiles the documentation:

    phpDox 0.7.0-64-gd70cae2 - Copyright (C) 2010 - 2015 by Arne Blankerts
    
    [07.01.2015 - 16:23:05] Using config file 'build/phpdox.xml'
    [07.01.2015 - 16:23:05] Registered collector backend 'parser'
    [07.01.2015 - 16:23:05] Registered enricher 'build'
    [07.01.2015 - 16:23:05] Registered enricher 'git'
    [07.01.2015 - 16:23:05] Registered enricher 'checkstyle'
    [07.01.2015 - 16:23:05] Registered enricher 'phpcs'
    [07.01.2015 - 16:23:05] Registered enricher 'pmd'
    [07.01.2015 - 16:23:05] Registered enricher 'phpunit'
    [07.01.2015 - 16:23:05] Registered enricher 'phploc'
    [07.01.2015 - 16:23:05] Registered output engine 'xml'
    [07.01.2015 - 16:23:05] Registered output engine 'html'
    [07.01.2015 - 16:23:05] Starting to process project 'project'
    [07.01.2015 - 16:23:05] Starting collector
    [07.01.2015 - 16:23:05] Scanning directory '/var/lib/jenkins/workspace/project/build/..' for files to process
    
    cccccccccccccccccccccccccccccccccccccccccccccccccc  [50]
    cccccccccccccccccccccccccccccccccccccccccccccccccc  [100]
    ccccccccccccccccccccccccccccccc                     [131]
    
    [07.01.2015 - 16:23:05] Saving results to directory '/var/lib/jenkins/workspace/project/build/logs/phpdox/xml'
    [07.01.2015 - 16:23:05] Collector process completed
    
    [07.01.2015 - 16:23:05] Starting generator
    [07.01.2015 - 16:23:05] Loading enrichers
    [07.01.2015 - 16:23:05] Enricher Build Information initialized successfully
    [07.01.2015 - 16:23:05] Starting event loop.
    
    ..................................................  [50]
    ..................................................  [100]
    ..................................................  [150]
    ..................................................  [200]
    ..................................................  [250]
    ..................................................  [300]
    ..................................................  [350]
    ..................................................  [400]
    ..................................................  [450]
    ..................................................  [500]
    ..................................................  [550]
    ..................................................  [600]
    ..................................................  [650]
    ..................................................  [700]
    ..................................................  [750]
    ..................................................  [800]
    ..................................................  [850]
    ..................................................  [900]
    ..................................................  [950]
    ..................................................  [1000]
    ..................................................  [1050]
    ..................................................  [1100]
    ..................................................  [1150]
    ..................................................  [1200]
    ..................................................  [1250]
    ..................................................  [1300]
    ..................................................  [1350]
    ..................................................  [1400]
    ..................................................  [1450]
    ..................................................  [1500]
    ..................................................  [1550]
    ..................................................  [1600]
    ..................................................  [1650]
    ..................................................  [1700]
    ..................................................  [1750]
    ..................................................  [1800]
    ..................................................  [1850]
    ..................................................  [1900]
    ..................................................  [1950]
    ..................................................  [2000]
    ..................................................  [2050]
    ..................                                  [2068]
    
    [07.01.2015 - 16:23:28] Generator process completed
    [07.01.2015 - 16:23:28] Processing project 'project' completed.
    
    
    Time: 23.49 seconds, Memory: 3.00Mb
    

    However, the finished documentation does not include any content from the enrichers.

    In case it is relevant, my config file:

    <?xml version="1.0" encoding="utf-8" ?>
    <phpdox xmlns="http://xml.phpdox.net/config" silent="false">
        <project name="project" source="${basedir}/.." workdir="${basedir}/logs/phpdox/xml">
            <collector publiconly="false" backend="parser">
                <include mask="*/application/**.php" />
                <include mask="*/library/**.php" />
                <exclude mask="*/tests/**" />
                <exclude mask="*/vendor/**" />
                <inheritance resolve="true"/>
            </collector>
            <generator output="${basedir}/docs">
                <enrich base="${basedir}/logs">
                    <source type="build" />
                    <source type="phploc" />
                    <source type="git">
                        <git binary="/usr/bin/git" />
                        <history enabled="true" limit="15" cache="${phpDox.project.workdir}/gitlog.xml" />
                    </source>
                    <source type="phpcs">
                        <file name="phpcs.xml" />
                    </source>
                    <source type="pmd">
                        <file name="pmd.xml" />
                    </source>
                    <source type="phpunit">
                        <coverage path="phpunit/coverage" />
                        <filter directory="${phpDox.project.source}" />
                    </source>
                </enrich>
                <build engine="html" enabled="true" output="phpdox">
                    <template dir="${phpDox.home}/templates/html" />
                    <file extension="xhtml" />
                </build>
            </generator>
        </project>
    </phpdox>
    
    opened by throup 14
  • php 8.1 E_DEPRECATED

    php 8.1 E_DEPRECATED

    heads up i am gitting this error (it generates docs, just want to point it out as E_DEPRECATED )

    Oups... phpDox encountered a problem and has terminated!
    
    It most likely means you've found a bug, so please file a report for this
    and paste the following details and the stacktrace (if given) along:
    
    PHP Version: 8.1.2-1ubuntu2.6 (Linux)
    PHPDox Version: 0.12.0-dev
    ErrorException: E_DEPRECATED 
    Location: /usr/share/php/TheSeer/phpDox/shared/FileInfo.php (Line 82)
    
    Return type of TheSeer\phpDox\FileInfo::getPathInfo($class_name = null): void should either be compatible with SplFileInfo::getPathInfo(?string $class = null): ?SplFileInfo, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
    
    No stacktrace available
    
    opened by absentdream 1
  • Error with PHP 8.1.0

    Error with PHP 8.1.0

    Hi, I was looking to generate documenation for a project, but it seems like it doesn't work with PHP 8.1.0. error:

    PS C:\wamp64\www\framework> php vendor/bin/phpdox
    
    Warning: PHP Startup: Unable to load dynamic library 'php_apcu.dll' (tried: c:/wamp64/bin/php/php8.1.0/ext/php_apcu.dll (Le module sp├®cifi├® est introuvable), c:/wamp64/bin/php/php8.1.0/ext/php_php_apcu.dll.dll (Le module sp├®cifi├® est introuvable)) in Unknown on line 0
    
    Deprecated: Return type of TheSeer\phpDox\FileInfo::getPath() should either be compatible with SplFileInfo::getPath(): string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\wamp64\www\framework\vendor\theseer\phpdox\src\shared\FileInfo.php on line 41
    
    Deprecated: Return type of TheSeer\phpDox\FileInfo::getRealPath() should either be compatible with SplFileInfo::getRealPath(): string|false, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\wamp64\www\framework\vendor\theseer\phpdox\src\shared\FileInfo.php on line 12    
    
    Deprecated: Return type of TheSeer\phpDox\FileInfo::getFileInfo($class_name = null): void should either be compatible with SplFileInfo::getFileInfo(?string $class = null): SplFileInfo, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\wamp64\www\framework\vendor\theseer\phpdox\src\shared\FileInfo.php on line 73
    
    Deprecated: Return type of TheSeer\phpDox\FileInfo::getPathInfo($class_name = null): void should either be compatible with SplFileInfo::getPathInfo(?string $class = null): ?SplFileInfo, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\wamp64\www\framework\vendor\theseer\phpdox\src\shared\FileInfo.php on line 82
    phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors
    
    [28.10.2022 - 08:43:58] Using config file './phpdox.xml'        
    [28.10.2022 - 08:43:58] Registered collector backend 'parser'
    [28.10.2022 - 08:43:58] Registered enricher 'build'
    [28.10.2022 - 08:43:58] Registered enricher 'git'
    [28.10.2022 - 08:43:58] Registered enricher 'checkstyle'        
    [28.10.2022 - 08:43:58] Registered enricher 'phpcs'
    [28.10.2022 - 08:43:58] Registered enricher 'pmd'
    [28.10.2022 - 08:43:58] Registered enricher 'phpunit'
    [28.10.2022 - 08:43:58] Registered enricher 'phploc'
    [28.10.2022 - 08:43:58] Registered output engine 'xml'
    [28.10.2022 - 08:43:58] Registered output engine 'html'
    [28.10.2022 - 08:43:58] Starting to process project 'Framework' 
    [28.10.2022 - 08:43:58] Starting collector
    [28.10.2022 - 08:43:58] Scanning directory 'C:/wamp64/www/framework/Smoq' for files to process
    
    ccccccccc                                               [9]
    
    [28.10.2022 - 08:43:58] Saving results to directory 'C:/wamp64/www/framework/var/docs'
    [28.10.2022 - 08:43:58] Collector process completed
    
    [28.10.2022 - 08:43:58] Starting generator
    [28.10.2022 - 08:43:58] Loading enrichers
    [28.10.2022 - 08:43:58] Enricher Build Information initialized successfully
    [28.10.2022 - 08:43:58] Starting event loop.
    
    
    
    Oups... phpDox encountered a problem and has terminated!        
    
    It most likely means you've found a bug, so please file a report for this
    and paste the following details and the stacktrace (if given) along:
    
    PHP Version: 8.1.0 (WINNT)
    PHPDox Version: 0.12.0-dev
    ErrorException: E_COMPILE_ERROR
    Location: C:\wamp64\www\framework\vendor\theseer\fxsl\src\fxsltprocessor.php (Line 187)
    
    Declaration of TheSeer\fXSL\fXSLTProcessor::transformToDoc($node) must be compatible with XSLTProcessor::transformToDoc(object $document, ?string $returnClass = null): DOMDocument|false       
    
    No stacktrace available
    

    The XML is generated, though no HTML is generated. image

    Hopefully this ain't a duplicate, thanks for your time.

    opened by Smoqqqq 1
  • Type hints not showing up in documentation

    Type hints not showing up in documentation

    In the example documentation (https://phpdox.net/demo/phpDox/classes/TheSeer_phpDox_Application.xhtml), I can see type hints like:

    private ProgressLogger $logger;
    private Factory $factory;
    

    But, in my own generated documentation instead of seeing the type hint, there's just an extra space between 'private' and '$logger'.

    I'm using phpdox from git master on Debian 12 with PHP 8.1.7.

    My phpdox.xml:

    <?xml version="1.0" encoding="utf-8" ?>
    <phpdox xmlns="http://xml.phpdox.net/config" silent="false">
        <bootstrap/>
        <project name="phpdox" source="${basedir}/src" workdir="${basedir}/build/phpdox/xml">
            <collector publiconly="false" backend="parser" encoding="auto">
                <include mask="*.php"/>
                <exclude mask=""/>
                <inheritance resolve="true">
                </inheritance>
            </collector>
            <generator output="${basedir}/docs">
                <enrich base="${basedir}/">
                    <source type="phploc">
                        <file name="phploc.xml" />
                    </source>
                </enrich>
                <build engine="html" enabled="true" output=".">
                    <template dir="${phpDox.home}/templates/html"/>
                    <file extension="xhtml"/>
                </build>
            </generator>
        </project>
    </phpdox>
    
    opened by timschwartz 2
  • Error: addMethod() on null - PHP 7.4 | PHPDox 0.12.0-dev

    Error: addMethod() on null - PHP 7.4 | PHPDox 0.12.0-dev

    Hello,

    i want to generate the documentation for my phalcon PHP code. It worked for several years but now i'm getting this error:

    phpDox 0.12.0-dev - Copyright (C) 2010 - 2022 by Arne Blankerts and Contributors
    
    [26.09.2022 - 13:00:00] Using config file 'tests/build/phpdox.xml'
    [26.09.2022 - 13:00:00] Registered collector backend 'parser'
    [26.09.2022 - 13:00:00] Registered enricher 'build'
    [26.09.2022 - 13:00:00] Registered enricher 'git'
    [26.09.2022 - 13:00:00] Registered enricher 'checkstyle'
    [26.09.2022 - 13:00:00] Registered enricher 'phpcs'
    [26.09.2022 - 13:00:00] Registered enricher 'pmd'
    [26.09.2022 - 13:00:00] Registered enricher 'phpunit'
    [26.09.2022 - 13:00:00] Registered enricher 'phploc'
    [26.09.2022 - 13:00:00] Registered output engine 'xml'
    [26.09.2022 - 13:00:00] Registered output engine 'html'
    [26.09.2022 - 13:00:00] Starting to process project 'platform'
    [26.09.2022 - 13:00:00] Starting collector
    [26.09.2022 - 13:00:00] Scanning directory '.' for files to process
    
    ..................................................      [50]
    ..................................................      [100]
    ..................................................      [150]
    ................................................f.      [200]
    ...............................................f.f      [250]
    ..................................................      [300]
    ..................................................      [350]
    ..................................................      [400]
    ..................................................      [450]
    ..................................................      [500]
    ..................................................      [550]
    .........................f........................      [600]
    ..................................................      [650]
    ..................................................      [700]
    ..................................................      [750]
    ..................................................      [800]
    ..................................................      [850]
    ..................................................      [900]
    ............
    
    Oups... phpDox encountered a problem and has terminated!
    
    It most likely means you've found a bug, so please file a report for this
    and paste the following details and the stacktrace (if given) along:
    
    PHP Version: 7.4.28 (Linux)
    PHPDox Version: 0.12.0-dev
    Exception: Error (Code: 0)
    Location: /var/www/vendor/theseer/phpdox/src/collector/backend/parser/UnitCollectingVisitor.php (Line 228)
    
    Call to a member function addMethod() on null
    
    #0 /var/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(200): TheSeer\phpDox\Collector\Backend\UnitCollectingVisitor->enterNode()
    #1 /var/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(114): PhpParser\NodeTraverser->traverseArray()
    #2 /var/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(223): PhpParser\NodeTraverser->traverseNode()
    #3 /var/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(114): PhpParser\NodeTraverser->traverseArray()
    #4 /var/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(223): PhpParser\NodeTraverser->traverseNode()
    #5 /var/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(91): PhpParser\NodeTraverser->traverseArray()
    #6 /var/www/vendor/theseer/phpdox/src/collector/backend/parser/PHPParser.php(44): PhpParser\NodeTraverser->traverse()
    #7 /var/www/vendor/theseer/phpdox/src/collector/Collector.php(101): TheSeer\phpDox\Collector\Backend\PHPParser->parse()
    #8 /var/www/vendor/theseer/phpdox/src/collector/Collector.php(71): TheSeer\phpDox\Collector\Collector->processFile()
    #9 /var/www/vendor/theseer/phpdox/src/Application.php(88): TheSeer\phpDox\Collector\Collector->run()
    #10 /var/www/vendor/theseer/phpdox/src/CLI.php(120): TheSeer\phpDox\Application->runCollector()
    #11 /var/www/vendor/bin/phpdox(21) : eval()'d code(67): TheSeer\phpDox\CLI->run()
    #12 /var/www/vendor/bin/phpdox(21): eval()
    

    My XML:

    <?xml version="1.0" encoding="utf-8" ?>
    <phpdox xmlns="http://xml.phpdox.net/config">
        <project name="platform" source="./" workdir="${basedir}/xml">
            <collector backend="parser">
                <exclude mask="**/vendor/**"/>
            </collector>
            <generator output="${basedir}">
                <build engine="html" output="html"/>
                <enrich base="${basedir}/logs">
                    <source type="phploc">
                        <file name="phploc.xml"/>
                    </source>
    
                    <source type="phpcs">
                        <file name="checkstyle.xml"/>
                    </source>
    
                    <source type="pmd">
                        <file name="pmd.xml"/>
                    </source>
                </enrich>
            </generator>
        </project>
    </phpdox>
    

    PHPDox is installed via composer and xdebug is installed in version 2.9.8

    Does someone know how to fix this issue?

    opened by Tanktiger 3
  • xsl template phpunit namespace xmlns:pu fixed but unrealeased in latest tagged version (0.12.0)

    xsl template phpunit namespace xmlns:pu fixed but unrealeased in latest tagged version (0.12.0)

    For instance all xsl files should now contain xmlns:pu="https://schema.phpunit.de/coverage/1.0" instead of xmlns:pu="http://schema.phpunit.de/coverage/1.0" But latest tag release 0.12.0 does not have thoses fixes. When installing from Packagist with composer, coverage and tests are still EMPTY ! Manualy replacing namespace url does the trick. Initial issue was https://github.com/theseer/phpdox/issues/392

    opened by pierre-fromager 0
  • Count() bug

    Count() bug

    running locally on mac os 12.0.1 return this bug

    phpDox 0.8.0 - Copyright (C) 2010 - 2021 by Arne Blankerts

    [28.12.2021 - 20:10:40] Using config file './phpdox.xml' [28.12.2021 - 20:10:40] Registered collector backend 'parser' [28.12.2021 - 20:10:40] Registered enricher 'build' [28.12.2021 - 20:10:40] Registered enricher 'git' [28.12.2021 - 20:10:40] Registered enricher 'checkstyle' [28.12.2021 - 20:10:40] Registered enricher 'phpcs' [28.12.2021 - 20:10:40] Registered enricher 'pmd' [28.12.2021 - 20:10:40] Registered enricher 'phpunit' [28.12.2021 - 20:10:40] Registered enricher 'phploc' [28.12.2021 - 20:10:40] Registered output engine 'xml' [28.12.2021 - 20:10:40] Registered output engine 'html'

    Oups... phpDox encountered a problem and has terminated!

    It most likely means you've found a bug, so please file a report for this and paste the following details and the stacktrace (if given) along:

    PHP Version: 7.3.29 (Darwin) PHPDox Version: 0.8.0 ErrorException: E_WARNING Location: phar:///Users/matti/Dropbox/Programming/subtitler2.1/git/phpdox-0.8.0.phar/phpdox/shared/FileInfoCollection.php (Line 67)

    count(): Parameter must be an array or an object that implements Countable

    #0 phar:///Users/matti/Dropbox/Programming/subtitler2.1/git/phpdox-0.8.0.phar/phpdox/shared/FileInfoCollection.php(67): count() #1 phar:///Users/matti/Dropbox/Programming/subtitler2.1/git/phpdox-0.8.0.phar/phpdox/shared/FileInfoCollection.php(53): TheSeer\phpDox\FileInfoCollection->count() #2 phar:///Users/matti/Dropbox/Programming/subtitler2.1/git/phpdox-0.8.0.phar/phpdox/bootstrap/Bootstrap.php(56): TheSeer\phpDox\FileInfoCollection->valid() #3 phar:///Users/matti/Dropbox/Programming/subtitler2.1/git/phpdox-0.8.0.phar/phpdox/CLI.php(129): TheSeer\phpDox\Bootstrap->load() #4 /Users/matti/Dropbox/Programming/subtitler2.1/git/phpdox-0.8.0.phar(449): TheSeer\phpDox\CLI->run()

    opened by bellenuit 0
Releases(0.12.0)
  • 0.12.0(Mar 13, 2019)

  • 0.11.2(May 22, 2018)

  • 0.11.1(May 6, 2018)

  • 0.11.0(Jan 10, 2018)

    Note: This is going to be the last version that supports running under PHP 5.x

    Changed

    • Upgraded dependencies: Now using PHP-Parser 3.1+
    • The publicOnly mode now actually works

    Merged

    • #310: Make the build reproducible
    • #319:Fixed: #315 count(): Parameter must be an array or an object that implements Countable

    Fixed

    • #320: Multiline annotation for class constants fails to add subsequent lines
    • #315: count(): Parameter must be an array or an object that implements Countable (Thanks to @cristicotet, @swmarc)
    • #313: Parsing of concatenated constants in classes fails
    • #312: Alias for trait causes error
    • #299: Run phpdox with a cloned repository on Windows
    • #284: Error in Generator
    • #242: Call to undefined method TheSeer\phpDox\Collector\ClassObject::addImplementor()
    Source code(tar.gz)
    Source code(zip)
    phpdox-0.11.0.phar(862.45 KB)
    phpdox-0.11.0.phar.asc(801 bytes)
  • 0.10.1(Jul 2, 2017)

  • 0.10.0(Jun 15, 2017)

    Added

    • #300: Support for PHP 7.1 nullable type
    • Added support for PHP 7 style return types

    Changed

    • Bump minimum PHP version to 5.5
    • Use project source directory setting for relation lookup in PHPUnit logs
    • Add additional check to ensure correct file formats
    • Changed autoload handling for vendor directory
    • Updated PHPParser to latest
    • Updated other dependencies
    • Use phive for tool dependencies
    • Updated php core classes and interfaces data

    Fixed

    • #273: Overview "Average Class Length" and "Average Method Length" Display NaN
    • #304: Fix phpcs not actually enriching
    • #255: Failed to load external entity components.xsl
    • #288: Generate Error
    Source code(tar.gz)
    Source code(zip)
    phpdox-0.10.0.phar(858.51 KB)
    phpdox-0.10.0.phar.asc(801 bytes)
  • 0.9.0(Aug 26, 2016)

    0.9.0

    • Added check if disable_functions forbids use of exec
    • Updated to PHPParser 3.0.0
    • Raised minimum PHP version to 5.5 due to PHPParser 3
    • Removed PHP 5.3 support
    • Update Error handling to support PHP7's \Throwable
    • Fix: Issue #244 (Error : Unterminated comment starting line 1)
    • Fix: Issue #243 (Trait in Trait causes UnitObjectException if the nested trait is missing)
    • Fix: Issue #266 (Page Title "phpdox - Test Method")
    Source code(tar.gz)
    Source code(zip)
    phpdox-0.9.0.phar(761.93 KB)
    phpdox-0.9.0.phar.asc(543 bytes)
  • 0.8.1(Jun 30, 2015)

    • Updated Dependency (PHPParser 1.3.0, PHP-Timer 1.0.6)
    • Added new exit codes for issues with environment and config
    • Explicitly handle (crasher) exceptions with a dedicated exit code
    • Fix: Issue #230 (collector does not detect "static" modifier)
    • Fix: Issue #232 (native "null" return type is parsed as "object")
    • Fix: Issue #235 (paths for php-timer changed)
    • Fix: Issue #225 (Error in GlobalConfig with hhvm)
    • Fix: Issue #226 (vendor include at binary file)
    Source code(tar.gz)
    Source code(zip)
    phpdox-0.8.1.phar(736.29 KB)
    phpdox-0.8.1.phar.asc(819 bytes)
  • 0.8.0(May 6, 2015)

    • Updated Dependency (PHPParser 1.2.2, fDOMDocument 1.6.0)
    • PHP 7 Compatiblity changes
    • Added support for @var self and @return self
    • Preserve original name when alias is used
    • Trait usage now rendered and resolved
    • Added Token XML output
    • Added Source HTML output
    • Updated XSL Templates
    • Fix: Issue #214 (Oups... phpDox encountered a problem... with DirectoryCleaner)
    • Fix: Issue #211 (Compilation failed: support for \P, \p, and \X has not been compiled at offset 31)
    • Fix: Issue #208 (class constants of type boolean are not fetched)
    • Fix: Issue #190 (AbstractUnitObject.php (Line 542): Call to a member function getAttribute() on null)
    • Fix: Issue #178 (makedir() problem if not root user / AbstractEngine)
    • Fix: Issue #164, #165, #166 (TokenFileException - file not found)
    • Fix: Issue #218: Ensure git cache directory exists before trying to write to it
    • Merge PR #199: Fix the "Source" links extensions
    • Merge PR #198: Change build state logic
    • Merge PR #196: fix array to string conversion notices
    • Merge PR #194: Update phpdox
    • Merge PR #183: Vendor directory location change for phpdox as dependency
    • Merge PR #180: add PHPDOX_HOME, instead of PHPDOX_PHAR
    • Merge PR #163: Drop now useless requirement on ZetaComponents
    • Merge PR #219: Make GlobalConfig::resolveValue() recursive again
    Source code(tar.gz)
    Source code(zip)
    Pear-phpdox-0.8.0.tgz(631.64 KB)
    phpdox-0.8.0.phar(734.48 KB)
    phpdox-0.8.0.phar.asc(819 bytes)
Owner
Arne Blankerts
Arne Blankerts
Daux.io is an documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It helps you create great looking documentation in a developer friendly way.

Daux.io Daux.io is a documentation generator that uses a simple folder structure and Markdown files to create custom documentation on the fly. It help

Daux.io 719 Jan 1, 2023
phpDocumentor is an application that is capable of analyzing your PHP source code and DocBlock comments to generate a complete set of API Documentation

phpDocumentor What is phpDocumentor? phpDocumentor is an application that is capable of analyzing your PHP source code and DocBlock comments to genera

phpDocumentor 3.7k Jan 3, 2023
Documentation Generator for PHP

phpDocumentor What is phpDocumentor? phpDocumentor is an application that is capable of analyzing your PHP source code and DocBlock comments to genera

phpDocumentor 3.7k Dec 28, 2022
A php API documentation generator, fork of Sami

Doctum, a PHP API documentation generator. Fork of Sami Curious about what Doctum generates? Have a look at the MariaDB MySQL Kbs or Laravel documenta

Code LTS 203 Dec 21, 2022
An API documentation generator

Sami: an API documentation generator WARNING: Sami is not supported nor maintained anymore. Feel free to fork. Curious about what Sami generates? Have

null 2k Dec 17, 2022
Documentation Generator for WordPress.

Pronamic WordPress Documentor is a tool to automatically extract data about the actions and filters of your WordPress theme or plugin.

Pronamic 36 Dec 8, 2022
Sami: an API documentation generator

Sami: an API documentation generator WARNING: Sami is not supported nor maintained anymore. Feel free to fork. Curious about what Sami generates? Have

null 2k Dec 17, 2022
Generate interactive OpenAPI documentation for your RESTful API using doctrine annotations

Generate interactive OpenAPI documentation for your RESTful API using doctrine annotations

Robert Allen 4.6k Jan 6, 2023
PHP 7.1 ready Smart and Simple Documentation for your PHP project

Smart and Readable Documentation for your PHP project ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is all PHP

ApiGen 2.1k Dec 22, 2022
PHP 7.1 ready Smart and Simple Documentation for your PHP project

Smart and Readable Documentation for your PHP project ApiGen is the simplest, the easiest to use and the most modern api doc generator. It is all PHP

ApiGen 2.1k Apr 20, 2021
Generates documentation for your REST API from annotations

NelmioApiDocBundle The NelmioApiDocBundle bundle allows you to generate a decent documentation for your APIs. Migrate from 3.x to 4.0 To migrate from

Nelmio 2.1k Jan 6, 2023
Generate Sphinx/ReStructured documentation from PHPDoc

PHP-phpdoc-to-rst Forked from Francesco "Abbadon1334" Danti by AeonDigital. In this fork the changes has only visual and superficial effects [ just be

Rianna Cantarelli 0 Nov 16, 2021
30 seconds of code Short PHP code snippets for all your development needs

30 seconds of code Short PHP code snippets for all your development needs Visit our website to view our snippet collection. Use the Search page to fin

30 seconds of code 2.5k Jan 1, 2023
Source Code for 'PHP 8 Solutions' by David Powers

Apress Source Code This repository accompanies PHP 8 Solutions by David Powers (Apress, 2022). Download the files as a zip using the green button, or

Apress 8 Oct 27, 2022
A personal repo where I'll upload code that I write while learning laravel

Learning Laravel All of the knowledge has been gained from this Tutorial -> The best tutorial ever! Preparation Choose an IDE to code in, I personally

Lanoow 0 Oct 8, 2022
Simple and effective multi-format Web API Server to host your PHP API as Pragmatic REST and / or RESTful API

Luracast Restler ![Gitter](https://badges.gitter.im/Join Chat.svg) Version 3.0 Release Candidate 5 Restler is a simple and effective multi-format Web

Luracast 1.4k Jan 2, 2023
PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report.

PhpMetrics provides metrics about PHP project and classes, with beautiful and readable HTML report.

PhpMetrics 2.3k Jan 5, 2023
allourideas allows groups to collect and priorize information in an open, democratic, and efficient process.

All Our Ideas All Our Ideas 2.0. This codebase runs two sites photocracy.org and allourideas.org. The allourideas.org project provides the user-facing

All Our Ideas 154 Dec 3, 2022
Learn how to implement the most important Design Patterns into your PHP application, uses PHP 8.1

Learn how to implement the most important Design Patterns into your PHP application. This project uses PHP 8.1. it has examples for each Pattern and an Article explaining how to use them step by step, their advantages, and disadvantages.

Gabriel Anhaia 203 Dec 15, 2022