Skip to content

v1.0.0

Choose a tag to compare

@gusvasconcelos gusvasconcelos released this 18 Sep 15:02

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog,
and this project adheres to Semantic Versioning.

[1.0.0] - 2025-09-18

🎉 Initial Release

This is the first stable release of the Markdown Converter library, a simple and fluent PHP library for creating Markdown files for content generation purposes.

✨ Features

  • Fluent Interface: All methods return the converter instance, enabling method chaining for clean and readable code
  • Comprehensive Markdown Support: Full support for essential Markdown elements
    • Headings (levels 1-6) with heading(string $text, int $level = 1)
    • Paragraphs with paragraph(string $text)
    • Horizontal rules with horizontalRule()
    • Code blocks with syntax highlighting support via codeBlock(string $code, string $language = "")
    • Links with link(string $url, string $text)
    • Ordered lists with orderedList(array $items)
    • Unordered lists with unorderedList(array $items)
  • File Output: Write generated content directly to files with write(string $directory, string $filename)
  • Content Retrieval: Get generated markdown as string with getContent()
  • Directory Creation: Automatic directory creation when writing files
  • PHP 7.4+ Compatibility: Support for PHP 7.4 and higher versions

🛠️ Technical Details

  • PSR-4 Autoloading: Fully compliant with PSR-4 autoloading standards
  • Comprehensive Test Suite: 12 test methods with 24 assertions covering all functionality
  • MIT License: Open source with permissive licensing
  • Zero Dependencies: No external dependencies for production use
  • Type Declarations: Full type hints for better IDE support and code safety

📚 Use Cases

  • Generating API documentation
  • Creating structured content from data
  • Converting data structures to readable format
  • Automated report generation
  • Content management systems integration

🔧 Installation

composer require gusvasconcelos/markdown-converter

💡 Basic Usage

use GusVasconcelos\MarkdownConverter\MarkdownConverter;

$converter = new MarkdownConverter();

$converter
    ->heading('API Request Log')
    ->paragraph('Request ID: 1234567890')
    ->horizontalRule()
    ->codeBlock('{"name":"John","age":30,"email":"john@example.com"}', "json")
    ->link('https://api.example.com', 'API Documentation')
    ->write(__DIR__, "example"); // Creates example.md

🏗️ Development History

This release represents the culmination of iterative development including:

  • Library architecture design and implementation
  • Comprehensive test suite development
  • Documentation and examples creation
  • Method naming refinements (build → write)
  • Package rebranding (MarkdownLogger → MarkdownConverter)
  • MIT License adoption

📋 Requirements

  • PHP 7.4 or higher
  • Composer for installation

For the complete API documentation and examples, please refer to the README.md file.