This release prepares v1.3.0 with additive features and improved documentation while keeping backward-compatible defaults. It also fixes composer download size bloat and embeds our official logo directly into the technical diagrams.
Toon::convertWith()Toon::encodeWith()Toon::skip()toon_encode_with()Toon::encodeLines()Toon::decodeFromLines()toon_encode_lines()toon:convert CLI with:
--from, --to, --stats, --delimiter, --mode, --strictlogo.webp across all 10 technical SVG diagrams in docs/assets/diagrams.gitattributes file using export-ignore rules for /docs, /assets, /tests, and related non-essential files.composer install size to just the core PHP execution code (reduces download from ~6MB to under 80 KB).compatibility_mode=legacyToon::convert()Toon::encode()Toon::decode()Toon::estimateTokens()38 tests, 103 assertions passed22 integration tests passed seamlessly.gitattributes validation: Packagist export simulated and verified (core files only included)composer validate --strict passedcomposer audit passedilluminate/support constraint.This is a backward-compatible update with no breaking changes.
Thanks to @DF-DennisRehbehn for reporting the Laravel 13 compatibility issue.
This release improves documentation, developer experience, and package usability while preserving backward compatibility for existing users.
Toon::diff() for JSON vs TOON comparisonToon::promptBlock() for LLM/prompt-friendly fenced TOON outputToon::validate() for safe TOON validationToon::contentType() and Toon::fileExtension()toon_encode()toon_decode()toon_diff()toon_prompt()toon_validate()Collection::toToon() macroSbsaga\Toon\Concerns\Toonable traitThis release is designed to be safe for users already on v1.2.0.
legacy compatibility mode remains the defaultToon::convert()Toon::encode()Toon::decode()Toon::estimateTokens()composer validate --no-check-publishcomposer testResult:
29 tests passed75 assertions passed🚀 Overview Version 1.2.0 is a major logic update for the TOON package. This release focuses on "Lossless Data Integrity," ensuring that complex, deeply nested PHP structures can be converted to TOON and parsed back without any structural shifts or data leakage.
✨ Key Improvements
Strict Indentation Guard We have introduced a new recursive scope manager in the ToonDecoder. This prevents "indentation drift" where values from a nested block could accidentally merge into the wrong parent key. The parser now strictly resets the scope based on leading spaces.
Smart Object Pivoting The engine now intelligently detects when a list of objects is being parsed. If the decoder sees a repeating key (like id or order_id) at the same indentation level, it automatically pivots the parent container into a sequential array of objects.
Precision Escaping Special character handling has been refined. Commas (,) and colons (:) within string values are now correctly escaped and unescaped, ensuring that names like "Sagar, Admin" or transaction IDs like "TXN:123" do not break the TOON structure.
Optimized Tabular Rendering The items[N]{fields}: block logic is now more robust. It handles nested tables within associative keys much more reliably, significantly reducing token usage for AI prompts.
🛠 Internal Changes Refactored finalizeTables: Cleaner recursive cleanup of internal table markers.
Improved Type Coercion: Better handling of null, boolean, and float types during decoding.
Toon now fully supports more complex nested arrays, making it easier to convert deeply structured data.
inlineScalar method to handle nested arrays recursivelyinlineScalar to handle nested arrays recursively by @sbsaga in https://github.com/sbsaga/toon/pull/7Full Changelog: https://github.com/sbsaga/toon/compare/v1.1.7...v1.1.8
Full Changelog: https://github.com/sbsaga/toon/compare/v1.1.6...v1.1.7
Full Changelog: https://github.com/sbsaga/toon/compare/1.1.4...v1.1.6
Full Changelog: https://github.com/sbsaga/toon/compare/v1.1.4...v1.1.5
Full Changelog: https://github.com/sbsaga/toon/compare/v1.1.3...v1.1.4
How can I help you explore Laravel packages today?