memio / pretty-printer
Memio's PrettyPrinter, used to generate PHP code from given Model
Installs: 311 111
Dependents: 5
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 3
Open Issues: 0
pkg:composer/memio/pretty-printer
Requires
- php: ^7.4 || ^8.0
- memio/model: ^4.0@alpha
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.19.3
- phpspec/phpspec: ^7.0
- phpstan/phpstan: 1.12.32
- rector/rector: ^1.2.10
- rector/swiss-knife: ^2.3
This package is auto-updated.
Last update: 2026-02-12 09:14:13 UTC
README
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. Have a look at the main repository.
Installation
Install it using Composer:
composer require memio/pretty-printer:^3.0
Want to know more?
Memio uses phpspec, 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
makeormake helpto see all available commands.
You can see the current and past versions using one of the following:
- the
git tagcommand - the releases page on Github
- the file listing the changes between versions
And finally some meta documentation: