Repository navigation
v0.3.0
What's Changed
This release focuses on parser correctness, fixing several string and number edge cases, and broadens SNBT compatibility, alongside stricter internal typing.
Fixes
- Strings: spaces inside quoted strings are no longer stripped
- Strings: values are now escaped via
json_encode, fixing malformed output for strings containing quotes, backslashes, tabs, or newlines - Strings: correctly terminate strings ending in an escaped backslash (e.g.
"C:\\") - Arrays: empty typed arrays (
[I;],[B;],[L;]) now parse to[]instead of[0] - Numbers: full float/double precision is preserved instead of being rounded to 14 significant digits (e.g.
0.10000000149011612d)
Features
- Allow dots, dashes, and plus signs in unquoted compound keys
- Tolerate tabs and newlines between tokens, so pretty-printed SNBT parses
- Malformed input now throws a dedicated
SNBTParseException(implementsSNBTException, extendsRuntimeException) instead of a bareException(still catchable as\Exception)
Tooling
- Static analysis with PHPStan at level 8 across
srcandtests, enforced in CI - Development-only files are trimmed from the distributed package via
.gitattributes
Full Changelog: v0.2.0...v0.3.0