Giter Club home page Giter Club logo

phpdocumentor's Introduction

License: MIT Qa workflow Packagist Version Packagist Pre Release Version Downloads

phpDocumentor

What is phpDocumentor?

phpDocumentor stands as the de-facto documentation tool for PHP projects, offering a robust solution for generating comprehensive documentation effortlessly. By analyzing your PHP source code and DocBlock comments, phpDocumentor generates a complete set of API documentation, making it an indispensable tool for developers striving for clear and well-documented codebases.

Beyond its prowess in API documentation, phpDocumentor goes further by providing additional features. It is equipped with the ability to create UML diagrams, making it a versatile tool for visualizing code structure. Additionally, phpDocumentor offers a full-featured markup language parser, supporting both RestructuredText and Markdown syntax. This flexibility allows you to document your project using the markup language that best suits your preferences.

A notable feature of phpDocumentor is its capability to include parts of your API documentation directly into your RestructuredText documentation. This integration ensures that your documentation and code remain in sync, saving you time and effort in maintaining accurate and up-to-date project documentation.

Inspired by its predecessors, phpDocumentor 1 and JavaDoc, phpDocumentor continues to innovate, staying up-to-date with the latest technologies and PHP language features. This commitment ensures that developers have access to the best possible documentation experience, aligning with modern development practices.

In this guide, we will explore the various features of phpDocumentor, from its core functionality in generating API documentation to its advanced capabilities in parsing markup languages. Whether you're a beginner or an experienced developer, phpDocumentor is your ally in creating well-documented, maintainable, and understandable PHP projects.

phpDocumentor v3 (Stable)

v3 is the latest stable release.

Documentation

For more detailed information, you can check our online documentation at https://docs.phpdoc.org/.

Features

phpDocumentor supports the following:

  • PHP 7.0+ compatible, full support for Namespaces, Closures and more are provided.
  • Docblock over types, docblocks can be more explicit about types not all formats are supported by native php.
  • Shows any tag, some tags add additional functionality to phpDocumentor (such as @link).
  • Low memory usage, peak memory usage for small projects is less than 20MB, medium projects 40MB, and large frameworks 100MB.
  • Incremental parsing, if you kept the Structure file from a previous run, you get an additional performance boost of up to 80% on top of the mentioned processing speed increase above.
  • Easy template building, if you want to make a branding you only have to call 1 task and edit 3 files.
  • Two-step process, phpDocumentor first generates a cache with your application structure before creating the output. If you'd like you can use that to power your own tools or formatters!
  • Generics support, with more static analysis in php types have become more complex. phpDocumentor understand these types. And will render them as first class types.

Installation

PhpDocumentor requires PHP 8.1 or higher to run. However, code of earlier PHP versions can be analyzed.

All templates provided with phpDocumentor have support for Class diagrams based on the read code base. This will require the application [PlantUml] to be installed on the machine running phpDocumentor. Rendering the class diagrams using [PlantUml] is optional, and warnings about missing [PlantUml] can be ignored. However, your documentation will contain some dead links in this case. Class diagram will be created with option --setting=graphs.enabled=true.

There are 4 ways to install phpDocumentor:

  1. Using phive (recommended)
  2. Using the PHAR (manual install)
  3. Via Docker
  4. Via Composer

Using Phive

$ phive install phpDocumentor

For more information about phive have a look at their website. Now you have phpDocumentor installed, it can be executed like this:

php tools/phpDocumentor

Using the PHAR

  1. Download the phar file from https://github.com/phpDocumentor/phpDocumentor/releases
  2. You can execute the phar like this: php phpDocumentor.phar

Via Docker

  1. $ docker pull phpdoc/phpdoc
  2. $ docker run --rm -v $(pwd):/data phpdoc/phpdoc

Via Composer (not recommended)

But wait? What about composer?

Ah, you discovered our secret. There is a phpdocumentor composer package that you can use to install phpDocumentor.

However: phpDocumentor is a complex application, and its libraries are used in countless other libraries and applications (2 of our libraries have more than 150 million downloads each); and this means that the chances for a conflict between one of our dependencies and yours is high. And when I say high, it is really high.

So, because of the above: we do not endorse nor actively support installing phpDocumentor using Composer.

How to use phpDocumentor?

The easiest way to run phpDocumentor is by running the following command:

$ phpdoc run -d <SOURCE_DIRECTORY> -t <TARGET_DIRECTORY>

This command will parse the source code provided using the -d argument and output it to the folder indicated by the -t argument.

phpDocumentor supports a whole range of options to configure the output of your documentation. You can execute the following command, or check our website, for a more detailed listing of available command-line options.

$ phpdoc run -h

Configuration file(s)

phpDocumentor also supports the use of configuration files (named phpdoc.xml or phpdoc.dist.xml by default). Please consult the documentation to see the format and supported options.

Nightly builds

PhpDocumentor doesn't have nightly releases. However, during each pipeline a phar artifact is built. If you want to test the bleeding edge version of phpDocumentor, have a look in the actions section of this repository. Each successful QA workflow has an Artifacts section at the bottom with the phar artifact built.

Contact

Reaching out to us is easy, and can be done with:

phpdocumentor's People

Contributors

ashnazg avatar benmatselby avatar boenrobot avatar bshaffer avatar ceeram avatar clockwerx avatar david0 avatar dependabot-preview[bot] avatar dependabot[bot] avatar fvdb avatar gammamatrix avatar gimler avatar github-actions[bot] avatar grahamcampbell avatar honkinggoose avatar jaapio avatar jeremyquinton avatar joncave avatar jrfnl avatar leovie avatar mbed67 avatar minkbear avatar mvriel avatar orklah avatar rgeraads avatar robocoder avatar sebastian-meyer avatar siad007 avatar simivar avatar tommygnr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

phpdocumentor's Issues

Docblox can't find Image_GraphViz

Even though I installed the latest GraphViz through PEAR Docblox keeps saying this:

Fatal error: Class 'Image_GraphViz' not found in C:\docblox\src\DocBlox\Transformer\Writer\Graph.php on line 137

C:\wamp\bin\php\php5.3.1>php pyrus.phar list-packages
Pyrus version 2.0.0a3 SHA-1: BE7EA9D171AE3873F1BBAF692EEE9165BB14BD5D
Using PEAR installation found at C:\wamp\bin\php\php5.3.1
Listing installed packages [C:\wamp\bin\php\php5.3.1]:
[channel pear.php.net]:
 Image_GraphViz

Add configuration option to disable logging for a specific error message per directory

Some projects do not use File level DocBlocks; we would want to disable the error that a parsing error has occurred in this situation. Sometimes a vendor library is included in the documentation generation but should all errors related to invalid DocBlock be ignored because the developer does not want to maintain this library himself and the error pollute his own working stack.

Note: there is currently no 'centralized' system to track these kind of errors; they are now thrown by logging a WARN, ERR or CRIT. A more intelligent analysis result handling system should be added which is finetunable.


During research we have come to the conclusion to use the same configuration format as is used by PHP_CodeSniffer and be able to (re)define entire rulesets. The following tasks need to be completed

  • Write technical specification for this feature
  • Create Ruleset and Rule objects
  • Create a pre-defined 'Default' Ruleset
  • Create a pre-defined Ruleset without File DocBlock validation (often requested feature)
  • Load a Ruleset from the Configuration file
  • Load a Ruleset directly from a 'ruleset.xml' file
  • A Ruleset may refer/include another ruleset
  • When including another ruleset specific Rules may be excluded from being enabled
  • Only load/enable validators that have a violation that matches one of the Rules in a Ruleset
  • When executing validators, only register violations that matches one of the Rules in a Ruleset
  • When executing validators, override loglevel with severity in rule
  • Add support for silencing validators for specific folders
  • Re-enable support for the Deprecated and Required validator
  • Add support for validating only specific folders
  • Allow 'properties' to be passed to validators to change their behavior

This story is also a prerequisite for #1421

Parsing tests against version but transforming doesn't

If the parser detects that the version number differs a minor from the previous it requires you to do a full re-parse; the transformer should do a similar check and not transform at all if the minor version number differs

rename phpunit.xml to phpunit.xml.dist

the current best practice is that you store your phpunit default config as phpunit.xml.dist and if you need to override your settings in the build environment, you can use phpunit.xml for that, because it has higher precedence.
so please rename the phpunit.xml to phpunit.xml.dist

Tyrael

Create an XML Schema from the structure.xml and config

The structure.xml file currently does not have an XML schema, nor does the config. This means that it is less predictable for people how to use the xml files.
See kore-nordmann.de/blog/0104_generating_xml_schemas_from_xml.html for generating schemas.

Add a Twig Writer

XSL has a steep learning curve and it might be easier for people to implement additional pages using Twig; this would probably be slower to process but easier to make for those interested in ease over speed.

Not compatible with PHP 5.2.1 as claimed in README

Tested with PHP 5.2.6-1+lenny9

DocBlox parser version 0.7.1-DEV
./bin/parse.php -d somedir

Fatal error: Undefined class constant 'SKIP_DOTS' in DocBlox/Arguments.php on line 166

( RecursiveDirectoryIterator::SKIP_DOTS )

Fatal error: Class 'finfo' not found in /ajut/sites/hosting/lp/www/Docblox/Docblox/DocBlox/Reflection/File.php on line 40

etc.

Relative log dir

Let's assume the folllowing architecture:

DocbloxDir/
ProjectsDir/
ProjectsDir/ProjectA/
ProjectsDir/ProjectA/src/
ProjectsDir/ProjectA/doc/

If you stand in ProjectA and give the following command
<path_to>/DocbloxDir/bin/prarse.php -d src -t doc

The log directory is searched relative to the directory you're at. In this situation, the ProjectA directory.

PEAR package conflicts with Zend PEAR package

First, thanks very much for creating a PEAR package for Docblox. Unfortunately, the files overlap with Zend's PEAR package, which I use. It would be nice if dependencies were split up - you could rely on Zend's pear package, and perhaps even break out the markdown dependency.

Cheers,

Bill

Add support for Reference documentation

We want phpDocumentor to show Reference Documentation as well as API Documentation.

Goal

The goal for this item is to provide a, simple but robust, implementation to generate reference documentation.

Background

phpDocumentor 1 provided the user with the ability to generate tutorials; which were in essence DocBook documents following a rigid directory structure.

For phpDocumentor 2 we wanted to reintroduce and expand upon that concept by offering to generate Reference Documentation. Inspiration has been drawn from Sphinx but the intention is to differ from that tool on specific points and to provide a pure PHP framework for generating reference documentation.

User stories

  1. As a developer I want to use my input markup language of choice so that I do not have to learn a new markup language to write my documentation
  2. As a user I want to have access to the documentation in the format that I desire so that I can ready it the way that suits my specific need
  3. As a developer I want to generate multiple (types of) documents for each project so that I can create documents tailored to a specific user group
  4. As a user I want to access the (pieces of) HTML generated documentation from the main menu of phpDocumentor so that I can easily access the docs
  5. As a user I want to have a table of contents per document to navigate more easily
  6. As a developer I want to link between documents so that I can refer to topics in other documents
  7. As a developer I want to be able to insert customized content so that I can include contents that fall out of scope of this specification such as generated UML diagrams using PlantUML
  8. As a developer I want to apply my own custom look and feel so that the reference documentation matches my house style or the style of the phpDocumentor template

Technical user stories

  1. As a developer I want this functionality to be contained in a plugin so that I can enable it when desired
  2. As a developer I want to be able to pass configuration options so that I can alter the behaviour of the plugin
  3. As a user I want to generate reference documentation without API documentation so that I can use this tool for other languages as well.

Bonus stories

  1. As a developer I want to continue using the old tutorial style of PHPDoc1 in my projects so that I do not have to convert my existing documentation.

Story 1: As a developer I want to use my input markup language of choice so that I do not have to learn a new markup language to write my documentation

Developers work best with the tools they know, and that includes writing documentation with the markup that suits your team best. As such we want phpDocumentor to be flexible with the number of input types that can be offered.

During this stage we will focus on the following input types:

  • Markdown, this is the default language as it requires no installable dependencies; only the Markdown library provided by @michelf
  • ReST, the Pandoc utility (a haskell tool) offers support for converting ReST
  • Textile, the Pandoc utility (a haskell tool) offers support for converting Textile
  • LateX, the Pandoc utility (a haskell tool) offers support for converting LateX
  • DocBook, we want to be able to parse the DocBook format (using the PhD PHP extension) to provide compatibility with the original tutorials

All input types may only be applicable with specific output formats as not all tools are able to convert between eachother. Another option is to use Pandoc to convert from the HTML output of another conversion process to the intended output.

Example: suppose I want to convert from DocBook to latex, neither of the tools are capable of such a conversion but by combining PhD and pandoc you can do this by converting in between.

Story 2: As a user I want to have access to the documentation in the format that I desire so that I can ready it the way that suits my specific need

Story 3: As a developer I want to generate multiple (types of) documents for each project so that I can create documents tailored to a specific user group

Story 7: As a developer I want to be able to insert customized content so that I can include contents that fall out of scope of this specification such as generated UML diagrams using PlantUML

Consider using Twig to pre-render the documentation files?

Research: Disqus support

It would be nice to be able to add commenting to the API and/or Reference docs; the best way to do this might be to implement Disqus support?

The following needs to be taken into account:

  • Documentation must be able to be used offline but the comments may be disabled in that mode

--ignore / -i doesn't work

Using the ignore option does nothing at all, no directory specified is ignored, and no error is thrown either. Is this functionality implemented?

C:\wamp\bin\php\php5.3.1>php.exe "C:\docblox\bin\docblox.php" project:run -d "C:\test" -t "C:\docbloxoutput2" --force -v --ignore "c:\test\test"

2011-04-19T13:32:14+00:00 INFO (6): [2.26mb]: Starting to process 2 files
2011-04-19T13:32:14+00:00 INFO (6): [2.26mb]: Starting to parse file: C:\test\test\newtest.php
2011-04-19T13:32:14+00:00 INFO (6): [2.81mb]: Starting to parse file: C:\test\test.php
*snip*
2011-04-19T13:32:14+00:00 INFO (6): [3.29mb]: Processing the file: \test\newtest.php as C:\docbloxoutput2\test_newtest.html
2011-04-19T13:32:14+00:00 INFO (6): [3.29mb]: Processing the file: \test.php as C:\docbloxoutput2\test.html

bad path for sfTimer.class.php in bin/docblox

I don't know symfony in details, but with the latest version(downloaded through pear), they have the sfTimer.class.php under symfony/debug directory, hence your require_once in bin/docblox won't find that under 'symfony/sfTimer.class.php'
if you don't have some specific reason for this, then I would like to get that changed to
symfony/debug/sfTimer.class.php

Tyrael

E_STRICT warnings

The PEAR dependency throws a lot of E_STRICT warnings. I recommend disabling them in bin/docblox.php by adding this near the top:

error_reporting(E_ALL & ~E_STRICT);

full vs. relative path in filenames and titles

Hi.

In the output of Docblox, the full path to a file is used in the title of the HTML file, as well as the name of the HTML file. This means that if you have a long path, the filenames will be long, as well as the title, while adding little to no extra usable information. I'd suggest replacing the full path with a path relative to the directory that is parsed.

More descriptive error message?

Hi.

While generating API documentation, I encountered the following error:

sphoof@web01:/www/sphoof/sphoof.nl/lib/Docblox$ ./bin/transform.php -t /www/sphoof/sphoof.nl/www/api-docs/ -s /www/sphoof/sphoof.nl/lib/Docblox/
Warning: DOMDocument::load(): Document is empty in /var/www/sphoof/sphoof.nl/lib/Docblox, line: 1 in /var/www/sphoof/sphoof.nl/lib/Docblox/DocBlox/Writer/Xslt.php on line 102

The error is my own fault (as I should have passed the filename itself, instead of only the path), but it wouldn't hurt to have a more descriptive error message.

fileinfo extension failes on PHP 5.2.x

When fileinfo support is added to PHP 5.2.x via pecl repositories, the constant FILEINFO_MIME_ENCODING is not available.

See the following from PHP documentation

FILEINFO_MIME_ENCODING  (integer)
Return the mime encoding of the file. Available since PHP 5.3.0. 

As minimum version is 5.2.9 iirc, this should be changed to be php 5.2.x compliant
I fixed the problem on my local side by checking the PHP version. Seems like in older versions, fileinfo cannot be used to check the encoding. This is, what I added:
version_compare(PHP_VERSION, '5.3.0') >= 0

symfony and Zend Framework dependencies

I've noticed that Docblox has some dependencies to these projects, it should be documented somewhere.
now that we have pear package we could suggest to the users to do:
pear channel-discover pear.symfony-project.com
pear install symfony/symfony
pear channel-discover pear.zfcampus.org
pear install zfcampus/zf

Tyrael

rename config.xml

I'm planning to use Docblox for replacing phpdocumentor in my jenkins build.
my problem is, that jenkins also uses a file config.xml, so I would either put the docblox config xml to another directory, or rename it and pass that with -c
it think it would be a good idea, to rename the default config.xml to for example docblox.xml, this way I could put that with my other configs (config.xml for jenkins, phpunit.xml.dist for phpunit) to the same directory

create docblox.bat

it would be a good thing, if we could have a batch script for windows, so it could be used just like the bin/docblox on linux.
if you need help, you can check the phpunit.bat for example, or maybe I could put together it for you also.

Tyrael

Add additional error conditions

  • Multiple @Package tags provide ambiguity and the system shows and empty package in the template; a CRIT log should be thrown when a DocBlock contains more than 1 @Package or @subpackage
  • No @subpackage without @Package; an error should be thrown whenever a @subpackage is encountered without an @Package
  • if an @param's type differs from the actual argument's typehint; when no typehint is present the @param may be of type scalar, null or resource. When the @param has multiple types the typehinting check is skipped.
  • if a @param has multiple types, the argument has a typehint but there is no default found means an invalid situation has arised.

spaces in target path seems to break project:run

We've setup Jenkins to generate Docblox for us. The first step of creating the structure.xml file seems to work fine, but the XSLT parsing fails because stylesheets cannot be loaded.

The workspace looks something like this:

/var/lib/jenkins/Project Name With - Spaces/workspace/build/docblox <-- docblox project root, with bin/doctrine.php
/var/lib/jenkins/Project Name With - Spaces/workspace/target/phpdocs <-- output path
/var/lib/jenkins/Project Name With - Spaces/workspace/library <-- path being parsed

With this as the workspace, when running project:run we get errors like:

 [exec] Starting transformation of files (this could take a while depending upon the size of your project)
 [exec] PHP Warning:  XSLTProcessor::importStylesheet(): I/O warning : failed to load external entity "chrome.xsl" in /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer/Writer/Xsl.php on line 51
 [exec] PHP Stack trace:
 [exec] PHP   1. {main}() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/bin/docblox.php:0
 [exec] PHP   2. DocBlox_Task_Project_Run->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/bin/docblox.php:30
 [exec] PHP   3. DocBlox_Task_Project_Transform->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Task/Project/Run.php:98
 [exec] PHP   4. DocBlox_Transformer->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Task/Project/Transform.php:154
 [exec] PHP   5. DocBlox_Transformer_Transformation->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer.php:307
 [exec] PHP   6. DocBlox_Transformer_Writer_Xsl->transform() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer/Transformation.php:212
 [exec] PHP   7. XSLTProcessor->importStylesheet() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer/Writer/Xsl.php:51

 [exec] Warning: XSLTProcessor::importStylesheet(): I/O warning : failed to load external entity "chrome.xsl" in /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer/Writer/Xsl.php on line 51

 [exec] Call Stack:
 [exec]     0.0003     634360   1. {main}() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/bin/docblox.php:0
 [exec]     0.0111    3071352   2. DocBlox_Task_Project_Run->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/bin/docblox.php:30
 [exec]     0.1634    4741200   3. DocBlox_Task_Project_Transform->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Task/Project/Run.php:98
 [exec]     0.1897    5236456   4. DocBlox_Transformer->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Task/Project/Transform.php:154
 [exec]     0.2131    5288856   5. DocBlox_Transformer_Transformation->execute() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer.php:307
 [exec]     0.2131    5288856   6. DocBlox_Transformer_Writer_Xsl->transform() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer/Transformation.php:212
 [exec]     0.2133    5290352   7. XSLTProcessor->importStylesheet() /var/lib/jenkins/jobs/Flymuch Application - Generate Docs/workspace/build/docblox/src/DocBlox/Transformer/Writer/Xsl.php:51

The structure.xml and other meta files are generated Ok, but the HTML output is not.

if we move the workspace to:

/tmp/no_more_spaces

All is well.

Fatal error when only 1 extension given

When there is only one extension:

php

you get error:
Fatal error: Call to a member function toArray() on a non-object in DocBlox\Arguments.php on line 252

Call Stack:
0.0016 356112 1. {main}() bin\parse.php:0
0.0494 1237248 2. DocBlox_Arguments->getFiles() bin\parse.php:41
0.0494 1237248 3. DocBlox_Arguments->parseFiles() lib\DocBlox\Arguments.php:231
0.0512 1242968 4. DocBlox_Arguments->getExtensions() lib\DocBlox\Arguments.php:210

Error in v0.8.3 DocBlox/Writer/Abstract.php

In version 0.8.3 an error ocurres if there isn't a structure.xml file in the /output/ dir that comes with DocBlox (i.e. if you use --target to tell parse.php put it elsewhere), because Abstract.php tries to set it as a source in it's constructor (line 28). To clarify, this occurs despite using --source pointing to the right file.

I'm guessing that either the class property needs to be set directly (circumventing the setter method) or, if it is essential that the setter is used, it needs to be set just before it is needed, instead of on class construction.

erroneous <br /> in class descriptions and floating issue with

Hi.

When generation of the documentation is complete, the output looks excellent apart from two minor nuisances: first of all, I can see
tags where the code actually contains a line-end, so there seems to be one too many nl2br conversion.

Second, I write many classes in one file. This results in some odd floating issue: the description of properties on the right will float to the absolute right. The second box of properties however floats to the left side of the previous box. This is in Firefox and Opera, haven't tested other browsers.

Parsing the same directory twice doesn't work

If you try to parse the same directory, to the same output twice with the same parameters Docblox will throw a strange error after the second attempt (the first one succeeded)

Notice: iconv(): Detected an illegal character in input string in C:\docblox\src\DocBlox\Reflection\File.php on line 174

Notice: iconv(): Detected an illegal character in input string in C:\docblox\src\DocBlox\Reflection\File.php on line 174

Notice: iconv(): Detected an illegal character in input string in C:\docblox\src\DocBlox\Reflection\File.php on line 174

Add icons indicating type and visibility

Every visible structure should receive icons on key locations (TBD) indicating their type (method, function, property, etc) and their visbility (public, protected, private).
Please mind that in the data/images/icons folder there are already icons for types; these should be used or replace with improvements.

Replace Image_GraphViz with another GraphViz wrapper that does not rely on PEAR

Image_GraphViz relies on the PEAR System.php and other dependencies. This makes it hard to deploy DocBlox in an environment where no PEAR is present.
Since Image_GraphViz is antiquated and throws quite a bit of deprecated warnings and notices I believe it to be a good thing to replace it with another library which does not depend on externals other than Zend Framework.

Implement mechanism to find common folder

With Docblox it is possible to mix and match multiple directories (-d) and files (f).
Now we take the folder of the first -d option to extract the 'base' folder; which is cut from the filenames.
This mechanism is to 'simple' and should be replaced with a mechanism which finds the highest folder that every file and directory have in common and use that as basis.

Checking if file is writeable, but file does not exists yer

When parsing (and transforming) you get 'the log directory does not appear to be writable....' even if everything is OK and it should work.

The problem is that in DocBlox/Abstract.php on line 247 function check if FILE is writeable insted of FOLDER.

P.S. Runing that on windows machine

(there could be same problem on line 187 - same file debug() function)

Refactor XSL templates

On the launch of DocBlox for ZF we noticed that the main feedback is that the XSL templates are not clear enough.
In order to improve this we need to refactor the XSL templates to provide better readability.

When doing this we should also change the following:

  • Split XSL files into smaller chunks to provide easier overridability
  • Require basic theme XSLs to manually include all their components to prevent inclusion problems and allow the user to use, for example, a custom Chrome around the basics of the default.
  • Split CSS files into more manageable chunks to allow easier overriding for users.
  • Import all necessary CSS files in the theme.css
  • Drop auto-inclusion of the default.css but import from theme.css

project:run throws option "d" not recognised error

When using:

php bin/docblox.php project:run -d /path/to/src -t build/

you get the following error on the second "Transform" task:

--------8<-------
ERROR: Option "d" is not recognized.

Not yet implemented
--------8<-------

This is due to the "execute" method in DocBlox_Task_Project_Run which instantiates both the parse and transform tasks which parse the command line options. Option d is not a valid open for Transform.

Allow connections between phpDocumentor Docs

We should research if and how connections between Docs may be possible; for example Aura Framework has multiple modules with each their own docs but with possible interoperability.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.