tomrf / readme-gen
generates readme with public api documentation for php packages
0.0.9
2022-11-11 00:10 UTC
Requires
- php: ^8.0
- haydenpierce/class-finder: ^0.4.3
- phpdocumentor/reflection-docblock: ^5.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.8
- phpmd/phpmd: ^2.12
- phpstan/phpstan: ^1.6
- phpunit/phpunit: ^9.5
- roave/security-advisories: dev-latest
README
Automatically generates a 📚 README file with public API documentation for a PHP package, based on docblocks and package information from composer.json
Included formatters:
- Markdown
📔 Go to documentation
Installation
Installation via composer:
composer require tomrf/readme-gen
Usage
$readmeGen = new \Tomrf\ReadmeGen\ReadmeGen('.'); // path to project directory echo $readmeGen->generate( new Tomrf\ReadmeGen\Formatter\MarkdownFormatter( \phpDocumentor\Reflection\DocBlockFactory::createInstance(), new \phpDocumentor\Reflection\Types\ContextFactory() ), 'resources/template.md' );
Testing
composer test
License
This project is released under the MIT License (MIT). See LICENSE for more information.
Documentation
📂 Tomrf\ReadmeGen\ReadmeGen::class
ReadmeGen.
Very much a work in progress.
__construct()
public function __construct( string $projectRoot ): void
generate()
public function generate( Tomrf\ReadmeGen\Interface\ReadmeFormatterInterface $formatter, string $templateFilename ): string
Generated 2022-06-15T22:33:50+02:00 using 📚tomrf/readme-gen