Download the PHP package kariricode/serializer without Composer
On this page you can find all versions of the php package kariricode/serializer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download kariricode/serializer
More information about kariricode/serializer
Files in kariricode/serializer
Download kariricode/serializer
More information about kariricode/serializer
Files in kariricode/serializer
Vendor kariricode
Package serializer
Short Description Multi-format serialization engine for PHP 8.4+ — JSON, XML, CSV, QueryString, #[Serialize] attributes, powered by kariricode/property-inspector. ARFA 1.3.
License MIT
Homepage https://kariricode.org
Package serializer
Short Description Multi-format serialization engine for PHP 8.4+ — JSON, XML, CSV, QueryString, #[Serialize] attributes, powered by kariricode/property-inspector. ARFA 1.3.
License MIT
Homepage https://kariricode.org
Please rate this library. Is it a good library?
Informations about the package serializer
KaririCode Serializer
[](https://www.php.net/)
[](https://github.com/KaririCode-Framework/kariricode-serializer/actions/workflows/ci.yml)
[](LICENSE)
[](https://phpstan.org/)
[](tests/)
[](https://kariricode.org)
[](composer.json)
[](https://kariricode.org)
[](https://kariricode.org)
**Multi-format serialization for PHP 8.4+ — JSON, XML, CSV, QueryString, zero dependencies.**
[Installation](#installation) · [Quick Start](#quick-start) · [Attribute-Driven](#attribute-driven-dto-serialization) · [All Encoders](#all-4-encoders) · [Architecture](#architecture)
The Problem
Multi-format serialization for PHP always pulls in heavy dependencies or loses the data contract:
The Solution
Requirements
| Requirement | Version |
|---|---|
| PHP | 8.4 or higher |
| ext-simplexml | Built-in (required for XML) |
| kariricode/property-inspector | ^2.0 |
Installation
Quick Start
Attribute-Driven DTO Serialization
All 4 Encoders
| Format | Encoder | MIME Type | PHP Functions |
|---|---|---|---|
json |
JsonEncoder | application/json | json_encode/decode with JSON_THROW_ON_ERROR |
xml |
XmlEncoder | application/xml | SimpleXMLElement + DOMDocument |
csv |
CsvEncoder | text/csv | fputcsv/str_getcsv via php://temp |
query_string |
QueryStringEncoder | application/x-www-form-urlencoded | http_build_query/parse_str |
Adding Custom Encoders
Engine API (Programmatic)
Ecosystem Position
The Serializer converts already-normalized arrays into wire-format strings for transport. It is the last step in the infrastructure pipeline before the payload leaves the application.
Architecture
Source layout
Key design decisions
| Decision | Rationale | ADR |
|---|---|---|
| Format-agnostic engine | Swap format string — no code changes | ADR-001 |
| Serialization groups | Field visibility per consumer without multiple DTOs | ADR-002 |
| RFC compliance | JSON 8259, CSV 4180, URL 3986 | ADR-003 |
| Property Inspector integration | Attribute scanning delegated to kariricode/property-inspector | ADR-004 |
| Zero encoder dependencies | All 4 encoders use only PHP built-ins | ADR-005 |
Specifications
| Spec | Covers |
|---|---|
| SPEC-001 | Encoder interface and registration |
| SPEC-002 | #[Serialize] groups and field mapping |
| SPEC-003 | SerializeAttributeHandler contract and invariants |
Project Stats
| Metric | Value |
|---|---|
| PHP source files | 20 |
| Source lines | ~810 |
| Test files | 13 |
| Test lines | ~700 |
| External runtime dependencies | 1 (kariricode/property-inspector) |
| Encoder classes | 4 |
| Supported formats | JSON, XML, CSV, QueryString |
| PHPStan level | 9 |
| PHP version | 8.4+ |
| ARFA compliance | 1.3 |
Contributing
License
Walmir Silva
Part of the **[KaririCode Framework](https://kariricode.org)** ecosystem.
[kariricode.org](https://kariricode.org) · [GitHub](https://github.com/KaririCode-Framework/kariricode-serializer) · [Packagist](https://packagist.org/packages/kariricode/serializer) · [Issues](https://github.com/KaririCode-Framework/kariricode-serializer/issues)
All versions of serializer with dependencies
PHP Build Version
Package Version
The package kariricode/serializer contains the following files
Loading the files please wait ...