PHP Readme Helper: API documentation generator for README files

Recommend this page to a friend!
  Info   View files Example   View files View files (25)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2020-05-15 (5 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 75 This week: 1All time: 9,659 This week: 248Up
Version License PHP version Categories
php-readme-helper 1.0.0MIT/X Consortium ...7Utilities and Tools, Project Management, L..., P..., P...
Description Author

This package can be used as an API documentation generator for README files.

It can scan a given directory to find class files or check a given class file to extract documentation about the class functions and variables.

The package can generate a new README file from a template file in Markdown format and returns it as a string.

Optionally it can restrict the generated documentation to a given list of class functions.

Innovation Award
PHP Programming Innovation award nominee
May 2020
Number 8
Many API developers produce documentation for their APIs in README files using the Markdown format.

This package can generate automatic documentation README files for APIs by extracting such documentations from API source files.

Manuel Lemos
Picture of Lars Moelleken
  Performance   Level  
Name: Lars Moelleken <contact>
Classes: 24 packages by
Country: Germany Germany
Age: 32
All time rank: 74248 in Germany Germany
Week rank: 30 Up3 in Germany Germany Up
Innovation award
Innovation award
Nominee: 10x

Winner: 1x

Details

[//]: # (AUTO-GENERATED BY "PHP README Helper": base file -> docs/base.md) Build Status Coverage Status Codacy Badge Latest Stable Version Total Downloads License Donate to this project using Paypal Donate to this project using Patreon

? PHP README Helper

Helper to auto-generate the API documentation in your README file.

Example

(build/generate_docs.php)

$readmeGenerator = new \voku\PhpReadmeHelper\GenerateApi();

$readmeText = ($readmeGenerator)->generate(
    __DIR__ . '/../src/voku/PhpReadmeHelper/GenerateApi.php',
    __DIR__ . '/docs/base.md'
);

file_put_contents(__DIR__ . '/../README.md', $readmeText);

GenerateApi

<p id="voku-php-readme-class-methods"></p>

generate(string $codePath, string $baseDocFilePath, string[]|null $useClasses): string

<a href="#voku-php-readme-class-methods">?</a> This method can generate API documentation with types from php code into your README file.

Parameters: - string $codePath <p>Path to a file or a directory.</p> - string $baseDocFilePath <p>Path to your base file for the README.</p> - array<array-key, string>|null $useClasses <p>If used, you can specify to classes, you will use.</p>

Return: - string <p>Return a string with the generated README.</p>

Support

For support and donations please visit Github | Issues | PayPal | Patreon.

For status updates and release announcements please visit Releases | Twitter | Patreon.

For professional support please contact me.

Thanks

  • Thanks to GitHub (Microsoft) for hosting the code and a good infrastructure including Issues-Managment, etc.
  • Thanks to IntelliJ as they make the best IDEs for PHP and they gave me an open source license for PhpStorm!
  • Thanks to Travis CI for being the most awesome, easiest continous integration tool out there!
  • Thanks to StyleCI for the simple but powerfull code style check.
  • Thanks to PHPStan && Psalm for really great Static analysis tools and for discover bugs in the code!
  Files folder image Files  
File Role Description
Files folder image.github (3 files)
Files folder imagebuild (1 file, 1 directory)
Files folder imagesrc (1 directory)
Files folder imagetests (3 files, 1 directory)
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file circle.yml Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.txt Doc. Documentation
Accessible without login Plain text file phpcs.php_cs Example Example script
Accessible without login Plain text file phpstan.neon Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file psalm.xml Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  .github  
File Role Description
  Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
  Accessible without login Plain text file ISSUE_TEMPLATE.md Data Auxiliary data
  Accessible without login Plain text file PULL_REQUEST_TEMPLATE.md Data Auxiliary data

  Files folder image Files  /  build  
File Role Description
Files folder imagedocs (1 file)
  Accessible without login Plain text file generate_docs.php Example Example script

  Files folder image Files  /  build  /  docs  
File Role Description
  Accessible without login Plain text file base.md Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imagevoku (1 directory)

  Files folder image Files  /  src  /  voku  
File Role Description
Files folder imagePhpReadmeHelper (2 files, 1 directory)

  Files folder image Files  /  src  /  voku  /  PhpReadmeHelper  
File Role Description
Files folder imageTemplate (1 file)
  Plain text file GenerateApi.php Class Class source
  Plain text file GenerateStringHelper.php Class Class source

  Files folder image Files  /  src  /  voku  /  PhpReadmeHelper  /  Template  
File Role Description
  Plain text file TemplateFormatter.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imagefixtures (1 file)
  Accessible without login Plain text file bootstrap.php Aux. Auxiliary script
  Plain text file Dummy.php Class Class source
  Plain text file PhpDocHelperTest.php Class Class source

  Files folder image Files  /  tests  /  fixtures  
File Role Description
  Accessible without login Plain text file base.md Data Auxiliary data

Downloadphp-readme-helper-2020-05-15.zip 18KB
Downloadphp-readme-helper-2020-05-15.tar.gz 14KB
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
Simple PHP Code Parser Download .zip .tar.gz the code parser is needed to get the informations from the php files Required
 Version Control Unique User Downloads Download Rankings  
 100%
Total:75
This week:1
All time:9,659
This week:248Up

For more information send a message to info at phpclasses dot org.