Image

Spawner

Spawn boilerplate code for any PHP application component

Development Boilerplate Generator PHP

Spawner is a PHP console application that lets you spawn boilerplate code for any component.

It is similar to Laravel Artisan and Symfony's Console code generators. You can define your own commands and have it generate boilerplate code using YAML files, just like this one.

name: Generate Form
command: generate:form
description: Generates a custom form plugin

inputs:
  path:
    input: ask
    message: Where to generate the form ?
    default: src/Form

  name:
    input: ask
    message: What should the name of this form be ?
    default: DefaultForm

actions:
  - action: template
    source: Form/template/Form.php.twig
    target: ${path}/${name}.php

Spawner ships with a lot of helpers that lets defining custom commands a breeze.