wundii/structron

A PHP library for generating human-readable documentation from structured data objects like DTOs, Entities, and Value Objects.

1.0.2 2025-06-27 05:29 UTC

This package is auto-updated.

Last update: 2025-06-27 05:30:27 UTC


README

PHP-Tests PHPStan VERSION PHP Rector ECS PHPUnit codecov Downloads

A PHP library for generating human-readable documentation from structured data objects like DTOs, Entities, and Value Objects. This is based on the data mapper.

Installation

Require the bundle and its dependencies with composer:

composer require wundii/afterbuy-sdk

Creating the config file

vendor/bin/structron init

Configuration

use Wundii\Structron\Config\StructronConfig;

return static function (StructronConfig $structronConfig): void {
    $structronConfig->docPath('your/docs/folder');
    $structronConfig->paths(['your/dto/folder', 'your/other/dto/folder']);
    
    /**
     * Optional: The input in this example is the default value 
     */
    $structronConfig->phpExtension('php');
    $structronConfig->skip([]);
    $structronConfig->setIndentFileIteration();
    
    /**
     * Other possibilities for automated use
     */
    $structronConfig->disableProcessBar();
    $structronConfig->disableExitCode();
};

Usage

vendor/bin/structron