Skip to content

v3.0.0

Choose a tag to compare

@HelgeSverre HelgeSverre released this 26 Nov 14:02
· 9 commits to main since this release

Breaking Changes

This major release aligns with TOON Specification v3.0, which standardizes the encoding for list-item objects whose first field is a tabular array.

Changed Behavior (Section 10 - Objects as List Items)

When a list-item object has a tabular array as its first field:

  • Tabular rows: Now appear at depth +2 from the hyphen line (was depth +1)
  • Sibling fields: Remain at depth +1 from the hyphen line

Output Format Change

Before (v2.x):

items[1]:
  - users[2]{id,name}:
    1,Ada
    2,Bob
    status: active

After (v3.0):

items[1]:
  - users[2]{id,name}:
      1,Ada
      2,Bob
    status: active

Migration Notes

  • Encoder output changed: If you rely on exact output format matching, update your expectations
  • Decoder backward compatible: The decoder handles both old and new indentation patterns
  • Round-trip safe: encode → decode → encode produces consistent v3.0 format

Added

  • tests/Spec/Version3BreakingChangesTest.php with 6 tests verifying v3.0 compliance
  • Round-trip test for v3.0 tabular list-item format

Test Coverage

  • Total: 551 tests, 1023 assertions (100% passing)
  • PHPStan Level 9: 0 errors
  • Full TOON Specification v3.0 conformance verified