New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

apie/serializer

Composer package of the apie library: serializer
7,670

Larablocks Analysis

apie/serializer works with any PHP project: the latest release (1.0.0-RC2, May 3, 2025) doesn't depend on Laravel.

Recommendation checks

Use with care

Use with care: meets 0 of 3 checks.

  • No release in the last 12 months (last: May 3, 2025)
  • 321 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Quiet
  • Last release (pre-release): May 3, 2025.
  • No releases in the last 12 months.
  • First released: May 3, 2025.
  • Monthly downloads: 321.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 29, 2026.

Install
composer require apie/serializer:1.0.0-RC2
Latest Version:1.0.0-RC2
PHP:>=8.3
License:MIT
Last Updated:Nov 20, 2026
Links: GitHub  ·  Packagist
Maintainer: pjordaan

serializer

Latest Stable Version Total Downloads Latest Unstable Version License PHP Composer

PHP Composer

This package is part of the Apie library. The code is maintained in a monorepo, so PR's need to be sent to the monorepo

Documentation

The Apie serializer serializes stored data to the customers or backwards. It is very similar to the Symfony serializer, except the context array in Symfony serializer is replaced with a ApieSerializerContext which also contains method for recursive calls. It still has the same logic related to decoding/encoding/normalizing and denormalizing.

Normalization and denormalization Usage

The simples use is just calling the static method create or customize it with the constructor method:

use Apie\Core\Context\ApieContext;
use Apie\Serializer\Serializer;

$serializer = Serializer::create();
// returns new SerializedHashmap(['id' => 'example@example.com', 'password' => 'p@ssW0rd'])
$serializer->normalize(new User('example@example.com', 'p@ssW0rd'), new ApieContext());
// returns new User('example.com', 'p@ssW0rd')
$serializer->denormalizeNewObject(
    ['id' => 'example@example.com', 'password' => 'p@ssW0rd'],
    User::class,
    new ApieContext()
);

Customization

To add your own normalization logic, you need to add a class implementing Apie\Serializer\Interfaces\NormalizerInterface. To add your own denormalization logic, you need to add a class implementing Apie\Serializer\Interfaces\DenormalizerInterface.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

670,032,257 9,703
laravel/framework

The Laravel Framework.

640,572,096 35,338
laravel/tinker

Powerful REPL for the Laravel framework.

546,909,908 7,440
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

465,816,364 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

431,187,642 4,660

Version History

Pre-releases (1)
Version Released PHP License
1.0.0-RC2 >=8.3 MIT