PHPackages                             ninsuo/code-generator-bundle - 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. ninsuo/code-generator-bundle

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

ninsuo/code-generator-bundle
============================

06PHP

Since Jan 21Pushed 4y ago1 watchersCompare

[ Source](https://github.com/ninsuo/code-generator-bundle)[ Packagist](https://packagist.org/packages/ninsuo/code-generator-bundle)[ RSS](/packages/ninsuo-code-generator-bundle/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Code generator
==============

[](#code-generator)

### What is it?

[](#what-is-it)

It's a code generator heavily inspired from the Symfony maker, developed in a web interface.

Create snippets:

- Add your context in YAML
- Enrich it with PHP code
- Write down your Twig templates

Use snippets

- Either use "Copy" buttons in the UX
- Or use the interactive maker-like command-line

Share snippets:

- Easily export and import snippets in the UX
- Share snippets in a project using fixtures

[![intro](docs/images/0-intro.png)](docs/images/0-intro.png)

Check out more details and screenshots [here](docs/index.md).

### Standalone install

[](#standalone-install)

You can install this generator standalone if needed, just download a new symfony project.

Ensure [symfony cli](https://symfony.com/download) is installed and run:

```
symfony new codegen --full

```

You'll need to set up a storage, in `.env` you may uncomment:

```
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"

```

### Bundle install

[](#bundle-install)

#### Use composer

[](#use-composer)

```
composer require --dev ninsuo/code-generator-bundle
```

or in `composer.json`:

```
{
  "require": {
    "ninsuo/code-generator-bundle": "dev-main"
  }
}
```

#### Add the bundle

[](#add-the-bundle)

The PHP enricher is a beautiful RCE vulnerability, so please enable this bundle in development environment only!

In `config/bundles.php`:

```
