PHPackages                             mochaka/serialization-parser - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Parsing &amp; Serialization](/categories/parsing)
4. /
5. mochaka/serialization-parser

ActiveLibrary[Parsing &amp; Serialization](/categories/parsing)

mochaka/serialization-parser
============================

This is my package serialization-parser

v1.1.0(1mo ago)048.1k↓30.4%[1 PRs](https://github.com/aaronflorey/serialization-parser/pulls)1MITPHPPHP ^8.0CI passing

Since Jul 13Pushed 1w agoCompare

[ Source](https://github.com/aaronflorey/serialization-parser)[ Packagist](https://packagist.org/packages/mochaka/serialization-parser)[ Docs](https://github.com/mochaka/serialization-parser)[ RSS](/packages/mochaka-serialization-parser/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (24)Versions (5)Used By (1)

serialization-parser
====================

[](#serialization-parser)

**Parse PHP serialized strings into rich, structured objects — fast, simple, and flexible.**

**serialization-parser** is a PHP package that parses serialized data into a structured, lightweight AST (Abstract Syntax Tree) format.
Each value is converted into a specific typed object (`ArrayType`, `StringType`, `IntegerType`, etc.), with an option to easily export the structure as a plain array.

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require mochaka/serialization-parser
```

Usage
-----

[](#usage)

```
use Mochaka\SerializationParser\SerializationParser;
$data = serialize(['foo' => 'bar', 'baz' => 1]);
$result = SerializationParser::parse($data);
```

The above result will be an instance of `Mochaka\SerializationParser\Data\ArrayType`:

```
var_dump($result);
Mochaka\SerializationParser\Data\ArrayType {#4172
    +name: null,
    +visibility: null,
    +properties: [
      Mochaka\SerializationParser\Data\StringType {#4170
        +name: "foo",
        +visibility: null,
        +value: "bar",
      },
      Mochaka\SerializationParser\Data\IntegerType {#4171
        +name: "baz",
        +visibility: null,
        +value: 1,
      },
    ],
  }
```

All types also have a `->toArray()` method to dump the schema as an array.

```
var_dump($result->toArray());

[
    "name" => null,
    "properties" => [
      [
        "name" => "foo",
        "type" => "String",
        "value" => "bar",
        "visibility" => null,
      ],
      [
        "name" => "baz",
        "type" => "Integer",
        "value" => 1,
        "visibility" => null,
      ],
    ],
    "type" => "Array",
    "visibility" => null,
  ]
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Aaron Florey](https://github.com/aaronflorey)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

48

—

FairBetter than 93% of packages

Maintenance94

Actively maintained with recent releases

Popularity30

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 71.4% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~298 days

Total

2

Last Release

56d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fdee3bef55bb13a185bf9c93506c503663bfda63628214782d56f2f8830c35e5?d=identicon)[Mochaka](/maintainers/Mochaka)

---

Top Contributors

[![aaronflorey](https://avatars.githubusercontent.com/u/948073?v=4)](https://github.com/aaronflorey "aaronflorey (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

laravelmochakaserialization-parser

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/mochaka-serialization-parser/health.svg)

```
[![Health](https://phpackages.com/badges/mochaka-serialization-parser/health.svg)](https://phpackages.com/packages/mochaka-serialization-parser)
```

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
