Repository navigation
Releases: manojrammurthy/toon-php-lite
Release list
v0.3.0 - Nested objects decoding
✨ Added
Nested object decoding
You can now write YAML-style nested TOON:
user:
id: 1
name: Manoj
Better internal error messages (line numbers, row contexts)
Tightened row-count validation for:
primitive arrays
list blocks
tabular blocks
🛠 Improved
Decoder internals refactored to be cleaner and fully indentation-aware
PHPStan clean run (0 errors) with updated rules
🧪 Testing
Added round-trip tests for nested structures
100% test suite passing (24 tests, 46 assertions)
v0.2.0 – Comments, EncodeOptions & Better Errors
Added
EncodeOptionsfor configurable indentation and optional trailing newline inToon::encode().- Comment support in decoder (
#and//, both full-line and inline). - Improved
DecodeExceptionmessages with line numbers and offending lines.
Notes
This should be backwards compatible with existing usage:
Toon::encode($data)still behaves the same.- New features are opt-in via
EncodeOptions.
v0.1.0 – Initial release
🎉 First release of TOON PHP Lite
This is the initial public release of TOON PHP Lite, a lightweight PHP library for encoding and decoding TOON (Token-Oriented Object Notation).
✨ Features
-
ToonLite\Toon::encode(mixed $data): string- Encodes:
- associative arrays →
key: value - primitive lists →
key[n]: a,b,c - uniform list of objects →
key[n]{col1,col2}:tabular format - mixed/other lists → list format
- associative arrays →
- Encodes:
-
ToonLite\Toon::decode(string $toon): mixed- Parses:
key: valuekey[n]: a,b,ckey[n]{a,b,c}:+ tabular rowskey[n]:with- valueitems
- Parses:
-
Zero runtime dependencies
-
Tested with PHPUnit
-
GitHub Actions CI for PHP 8.1, 8.2, 8.3
🔧 Requirements
- PHP
>= 8.1
📦 Install
composer require manoj/toon-php-lite