PHP Printer aims at providing a Pretty Printer powered by a templating engine, for PHP Parser.
If you're not familiar with it, PHP Parser is a fantasic library that provides:
Unfortunately, the code generated by its Pretty Printer can only be customized
by extending the PhpParser\PrettyPrinter\Standard
class
(see this PSR-2 example).
Using a template engine, those coding style can be more easily customized: all we'd need is to create a template, and use it to overwrite the default one.
PHP Printer just started, so there's nothing available yet. Here's the roadmap:
We're going to use our experience with Memio to make PHP Printer the right tool for PHP code generation! At least that's what we aim for.
Here's the documentation:
You can see the current and past versions using one of the following:
git tag
commandAnd finally some meta documentation: