apie/serializer
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 careUse 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 |
serializer
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
Powerful PHP database abstraction layer (DBAL) with many features for database s...
Laravel Serializable Closure provides an easy and secure way to serialize closur...
Cli error handling for console/command-line PHP applications.
Version History
Pre-releases (1)
| Version | Released | PHP | License |
|---|---|---|---|
| 1.0.0-RC2 | >=8.3 | MIT |