- Add support for PHP 8.2
- Improve Github action workflow
- Fix additional PHP 8.1 deprecations
- Fix issue with
JsonStream::getContents()
no returning buffer contents
- Add support for PHP 8.1
- HHVM support has been dropped due to HHVM's renewed focus on Hack
- CI build has been migrated to github actions
- The CI build now tests for PHP version from 5.6 to 8.0
- Return
UNKNOWN_ERROR
as error code if valid error constant is not found - Minor improvements to the travis build process
- Slightly improve the bundled autoloader
- For
json_encode()
compatibility, all objects are encoded as JSON objects unless they implementTraversable
and either return0
as the first key or return no values at all. - Testing for associative arrays is now more memory efficient and fails faster.
- JSON encoding errors now contain the error constant.
- The visibility for
StreamJsonEncoder::write()
andBufferJsonEncoder::write()
has been changed to protected (as was originally intended). - A new protected method
AbstractJsonEncoder::getValueStack()
has been added that returns the current unresolved value stack (for special write method implementations). - An overridable protected method
AbstractJsonEncoder::resolveValue()
has been added which is used to resolve objects (i.e. resolving the value of closures and objects implementingJsonSerializable
).
- Initial release