Download the PHP package good-php/serialization without Composer
On this page you can find all versions of the php package good-php/serialization. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download good-php/serialization
More information about good-php/serialization
Files in good-php/serialization
Download good-php/serialization
More information about good-php/serialization
Files in good-php/serialization
Vendor good-php
Package serialization
Short Description Extendable reflection-based serializer with support for JSON and PHP primitive formats
License MIT
Package serialization
Short Description Extendable reflection-based serializer with support for JSON and PHP primitive formats
License MIT
Please rate this library. Is it a good library?
Informations about the package serialization
Good PHP serialization
The concept is similar to Moshi, a Java/Kotlin serialization library - the least effort without sacrificing customizability, support for different formats or ease of use.
This is what it can serialize and deserialize out-of-the-box:
You can then convert it into a "primitive" (scalars and arrays of scalars) or JSON:
Documentation
Basic documentation is available in docs/. For examples, you can look at the test suite: tests/Integration.
Why this over everything else?
There are some alternatives to this, but they usually lack one of the following:
- stupid simple internal structure: no node tree, no value/JSON wrappers, no in-repo custom reflection implementation, no PHP parsing
- doesn't rely on inheritance of serializable classes, hence allows serializing third-party classes
- parses existing PHPDoc information instead of duplicating it through attributes
- supports generic types which are quite useful for wrapper types
- allows simple extension through mappers and complex stuff through type adapters
- produces developer-friendly error messages for invalid data
- correctly handles optional (missing keys) and
null
values as separate concerns - simple to extend with additional formats
All versions of serialization with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.2
good-php/reflection Version ^1.0
illuminate/support Version ^10.0 || ^11.0
good-php/reflection Version ^1.0
illuminate/support Version ^10.0 || ^11.0
The package good-php/serialization contains the following files
Loading the files please wait ....