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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package serializer

KaririCode Serializer

[![PHP 8.4+](https://img.shields.io/badge/PHP-8.4%2B-777BB4?logo=php&logoColor=white)](https://www.php.net/) [![CI](https://github.com/KaririCode-Framework/kariricode-serializer/actions/workflows/ci.yml/badge.svg)](https://github.com/KaririCode-Framework/kariricode-serializer/actions/workflows/ci.yml) [![License: MIT](https://img.shields.io/badge/License-MIT-22c55e.svg)](LICENSE) [![PHPStan Level 9](https://img.shields.io/badge/PHPStan-Level%209-4F46E5)](https://phpstan.org/) [![Tests](https://img.shields.io/badge/Tests-100%25_pass-22c55e)](tests/) [![Encoders](https://img.shields.io/badge/Encoders-4-22c55e)](https://kariricode.org) [![Zero Runtime Deps](https://img.shields.io/badge/Runtime%20Deps-0-22c55e)](composer.json) [![ARFA](https://img.shields.io/badge/ARFA-1.3-orange)](https://kariricode.org) [![KaririCode Framework](https://img.shields.io/badge/KaririCode-Framework-orange)](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
Requires php Version ^8.4
kariricode/property-inspector Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kariricode/serializer contains the following files

Loading the files please wait ...