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)55.9k↓33.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 1mo 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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

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

2039d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/132dc92943554d6b55bffa7f4914c907e5694adf872bc7ac6afebf3955a065d6?d=identicon)[beapi](/maintainers/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)")

###  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

[masterminds/html5

An HTML5 parser and serializer.

1.8k242.8M229](/packages/masterminds-html5)[sabberworm/php-css-parser

Parser for CSS Files written in PHP

1.8k191.2M65](/packages/sabberworm-php-css-parser)[jms/metadata

Class/method/property metadata management in PHP

1.8k152.8M88](/packages/jms-metadata)[jms/serializer-bundle

Allows you to easily serialize, and deserialize data of any complexity

1.8k89.3M627](/packages/jms-serializer-bundle)[hassankhan/config

Lightweight configuration file loader that supports PHP, INI, XML, JSON, and YAML files

97513.5M170](/packages/hassankhan-config)[meyfa/php-svg

Read, edit, write, and render SVG files with PHP

54613.9M42](/packages/meyfa-php-svg)

PHPackages © 2026

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