PHPackages                             memio/pretty-printer - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. memio/pretty-printer

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

memio/pretty-printer
====================

Memio's PrettyPrinter, used to generate PHP code from given Model

v3.0.1(3mo ago)6311.5k↓31.5%35MITPHPPHP ^7.2 || ^8.0CI passing

Since Apr 22Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/memio/pretty-printer)[ Packagist](https://packagist.org/packages/memio/pretty-printer)[ Docs](http://memio.github.io/memio)[ RSS](/packages/memio-pretty-printer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (6)Versions (20)Used By (5)

Memio's PrettyPrinter
=====================

[](#memios-prettyprinter)

`PrettyPrinter` is a code generator (printer) that takes a Model and calls the appropriate `TemplateEngine` to actually generate the corresponding code, using highly opinionated coding standards (pretty).

`PrettyPrinter` returns a string that can be saved in a file, displayed on a console output or displayed in a web page. Possibilities are endless!

> **Note**: This package is part of [Memio](http://memio.github.io/memio). Have a look at [the main repository](http://github.com/memio/memio).

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

[](#installation)

Install it using [Composer](https://getcomposer.org/download):

```
composer require memio/pretty-printer:^3.0

```

Want to know more?
------------------

[](#want-to-know-more)

Memio uses [phpspec](http://phpspec.net/), which means the tests also provide the documentation. Not convinced? Then clone this repository and run the following commands:

```
make lib-init                        # Set up Docker environment
make phpspec arg='--format pretty'   # Run the specifications
```

> **Note**: Run `make` or `make help` to see all available commands.

You can see the current and past versions using one of the following:

- the `git tag` command
- the [releases page on Github](https://github.com/memio/pretty-printer/releases)
- the file listing the [changes between versions](CHANGELOG.md)

And finally some meta documentation:

- [copyright and MIT license](LICENSE)
- [versioning and branching models](VERSIONING.md)
- [contribution instructions](CONTRIBUTING.md)

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance81

Actively maintained with recent releases

Popularity38

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity77

Established project with proven stability

 Bus Factor1

Top contributor holds 94.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 ~247 days

Recently: every ~856 days

Total

17

Last Release

95d ago

Major Versions

v1.0.2 → v2.0.02015-12-01

v1.0.3 → v2.0.0-alpha12016-09-21

2.0.3 → v3.0.02024-08-13

v3.0.1 → v4.0.0-alpha12026-02-12

PHP version history (5 changes)v1.0.0-rc1PHP &gt;=5.3.3

v2.0.0PHP ^5.3|^7.0

v2.0.0-alpha1PHP ^7.0

v3.0.0PHP ^7.2 || ^8.0

v4.0.0-alpha1PHP ^7.4 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/34578c5e0a3bc10fb9ef6e3a3a0b3356d6cde1133c8fa0e090d0a99298df1f76?d=identicon)[gnupat](/maintainers/gnupat)

---

Top Contributors

[![gnugat](https://avatars.githubusercontent.com/u/793185?v=4)](https://github.com/gnugat "gnugat (34 commits)")[![pyrech](https://avatars.githubusercontent.com/u/2021641?v=4)](https://github.com/pyrech "pyrech (1 commits)")[![wolxXx](https://avatars.githubusercontent.com/u/1898009?v=4)](https://github.com/wolxXx "wolxXx (1 commits)")

---

Tags

phpcodegenerator

###  Code Quality

Static AnalysisPHPStan, Rector

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/memio-pretty-printer/health.svg)

```
[![Health](https://phpackages.com/badges/memio-pretty-printer/health.svg)](https://phpackages.com/packages/memio-pretty-printer)
```

###  Alternatives

[memio/spec-gen

phpspec extension for better code generation

66204.3k28](/packages/memio-spec-gen)[tomloprod/radiance

A deterministic mesh gradient avatar generator for PHP.

1393.7k](/packages/tomloprod-radiance)[lara-zeus/quantity

filamentphp Input Number component, with user-friendly increment and decrement controls

2065.8k3](/packages/lara-zeus-quantity)

PHPackages © 2026

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