PHPackages                             beapi/gutenberg-serializer - 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. beapi/gutenberg-serializer

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

beapi/gutenberg-serializer
==========================

Serialize gutenberg blocks array to a string

1.0.1(5y ago)56.1k↑114.3%GPL-3.0-or-laterPHPPHP &gt;=7.1CI failing

Since Mar 17Pushed 5y ago3 watchersCompare

[ Source](https://github.com/BeAPI/gutenberg-serializer)[ Packagist](https://packagist.org/packages/beapi/gutenberg-serializer)[ RSS](/packages/beapi-gutenberg-serializer/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (2)Dependencies (9)Versions (4)Used By (0)

gutenberg-serializer
====================

[](#gutenberg-serializer)

Package to transform Gutenberg block array to a Gutenberg firendly string

Purpose
=======

[](#purpose)

This package allows you to use a block array from "parse\_blocs" for example, and serialize it into Gutenberg compatible content. This can be used to migrate content from blocs or programmatically generate content for Gutenberg. The library supports innerBlocs.

Example
=======

[](#example)

```
$bloc = [
		[
			'blockName'    => 'core/paragraph',
			'attrs'        =>
				[
					'id' => 4
				],
			'innerBlocks'  => [],
			'innerHTML'    => '
				This is a content
			',
			'innerContent' => [
				0 => '
				This is a content
				',
			],
		]
];
$content = BlocksSerializer::from_array( $bloc );
```

Will become :

```

This is a content

```

Commands
========

[](#commands)

You have commands into the project :

- `composer cs` : Check the coding standards
- `composer cbf` : Beautify automatically all the files of the project
- `composer test` : Launch the tests
- `composer psalm`: Launch psalm on the files

###  Health Score

31

—

LowBetter than 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 75% 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 ~215 days

Total

2

Last Release

2085d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2190273?v=4)[Be API](/maintainers/beapi)[@BeAPI](https://github.com/BeAPI)

---

Top Contributors

[![Rahe](https://avatars.githubusercontent.com/u/1007502?v=4)](https://github.com/Rahe "Rahe (6 commits)")[![petitphp](https://avatars.githubusercontent.com/u/158572?v=4)](https://github.com/petitphp "petitphp (2 commits)")

---

Tags

library

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/beapi-gutenberg-serializer/health.svg)

```
[![Health](https://phpackages.com/badges/beapi-gutenberg-serializer/health.svg)](https://phpackages.com/packages/beapi-gutenberg-serializer)
```

###  Alternatives

[mck89/peast

Peast is PHP library that generates AST for JavaScript code

19139.2M47](/packages/mck89-peast)[sauladam/shipment-tracker

Parses tracking information for several carriers, like UPS, USPS, DHL and GLS by simply scraping the data. No need for any kind of API access.

9843.5k](/packages/sauladam-shipment-tracker)[jstewmc/rtf

Read and write Rich Text Format (RTF) documents with PHP

45153.1k6](/packages/jstewmc-rtf)[tcds-io/php-jackson

A lightweight, flexible object serializer for PHP, inspired by FasterXML/jackson

113.2k10](/packages/tcds-io-php-jackson)

PHPackages © 2026

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