PHPackages                             twc/maker-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. twc/maker-bundle

ActiveSymfony-bundle[Utility &amp; Helpers](/categories/utility)

twc/maker-bundle
================

Wrap maker bundle to introduce context option to change destination template

v7.0.3(1y ago)1417.8k3MITPHPPHP ^8.0CI failing

Since Apr 22Pushed 1y ago3 watchersCompare

[ Source](https://github.com/thewalkingcoder/maker-bundle)[ Packagist](https://packagist.org/packages/twc/maker-bundle)[ RSS](/packages/twc-maker-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (22)Used By (0)

TwcMakerBundle
==============

[](#twcmakerbundle)

[![build passing](https://github.com/thewalkingcoder/maker-bundle/actions/workflows/php.yml/badge.svg)](https://github.com/thewalkingcoder/maker-bundle/actions/workflows/php.yml/badge.svg)

When your symfony architecture is different like (ddd, cqrs, adr, custom architecture) you lost the powerfull of makerBundle, because directory structure is not at the same place. TwcMakerBundle try to revolve that, to wrap maker command and introduce "context" option.

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

[](#installation)

```
composer require twc/maker-bundle --dev
```

Basic Usage
-----------

[](#basic-usage)

### Generic configuration

[](#generic-configuration)

```
#config/packages/dev/twc_maker.yaml
twc_maker:
    componentName:
        - { context: 'contextName', target: 'Your\SpecificNamespace' }
        - { context: 'contextName1', target: 'Your\SpecificNamespace' }
        - ...
```

### Specific configuration

[](#specific-configuration)

#### Component entity

[](#component-entity)

for entity component you must use ***target\_entity*** and ***target\_repository*** instead ***target***

```
#config/packages/dev/twc_maker.yaml
twc_maker:
    entity:
        - { context: 'contextName', target_entity: 'Your\SpecificEntityNamespace', target_repository: 'Your\SpecificRepositoryNamespace' }
```

#### Component controller

[](#component-controller)

for controller you can specific ***dir*** to change generation folder (default contextName)

```
#config/packages/dev/twc_maker.yaml
twc_maker:
    controller:
        - { context: 'contextName', target: 'Your\SpecificNamespace', dir: 'my/custom/directory/template' }
```

### Console

[](#console)

TwcMakerBundle wrap maker command and add new option ***--context*** (shortcut -c)

### Sample with CQRS concept

[](#sample-with-cqrs-concept)

```
#config/packages/dev/twc_maker.yaml
twc_maker:
    message:
        - { context: 'post.command', target: 'App\Post\Application\Command' }
        - { context: 'post.query', target: 'App\Post\Application\Query' }
```

in your console

```
php bin/console make:twc:message NewPost --context=post.command
php bin/console make:twc:message AllPostsArchivedQuery --context=post.query
```

```
#shortcut version
php bin/console make:twc:message NewPost -c post.command
php bin/console make:twc:message AllPostsArchivedQuery -c post.query
```

results

```
created: src/Post/Application/Command/NewPost.php
created: src/Post/Application/Command/NewPostHandler.php
created: src/Post/Application/Query/AllPostArchivedQuery.php
created: src/Post/Application/Query/AllPostArchivedQueryHandler.php
```

### Sample with DDD concept

[](#sample-with-ddd-concept)

```
#config/packages/dev/twc_maker.yaml
twc_maker:
    entity:
        - { context: 'membership', target_entity: 'App\MemberShip\Domain\Entity', target_repository: 'App\MemberShip\Infrastructure\Doctrine\Repository' }
    controller:
        - { context: 'membership', target: 'App\MemberShip\Presenter\Controller' }
    form:
        - { context: 'membership', target: 'App\MemberShip\Presenter\Form' }
```

in your console

```
php bin/console make:twc:entity UserMembership -c membership
```

result

```
created: src/Membership/Domain/Entity/UserMemberShip.php
created: src/Membership/Infrastructure/Doctrine/Repository/UserMemberShipRepository.php
```

Troubleshooting
---------------

[](#troubleshooting)

### Specific directory not created

[](#specific-directory-not-created)

If your specific directory not created, clean cache and retry.

```
php bin/console c:c
```

### Could not determine where to locate the new class

[](#could-not-determine-where-to-locate-the-new-class)

If you have error message like

```
Could not determine where to locate the new class "xxx" maybe try with a full namespace like
```

Check your composer.json with PSR-4 config, maybe you need to add your namespace, or try with `App\`

Support
-------

[](#support)

Actually TwcMakerBundle wrap 9 components

componentscontrollervalidatorformmessagemessenger-middlewarevotercommandfixturesentity

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance42

Moderate activity, may be stable

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~87 days

Recently: every ~41 days

Total

21

Last Release

477d ago

Major Versions

v1.0.9 → 6.x-dev2021-12-21

v1.1.3 → v7.0.02024-08-12

PHP version history (3 changes)v1.0.0PHP ^7.2

6.x-devPHP ^7.2|^8.0

v7.0.0PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6ca9e4f2f4fc47561098d90766068064d857a3b38364d27ebe5d4f4cc648eee?d=identicon)[neocode](/maintainers/neocode)

---

Top Contributors

[![thewalkingcoder](https://avatars.githubusercontent.com/u/10476280?v=4)](https://github.com/thewalkingcoder "thewalkingcoder (20 commits)")

---

Tags

makersymfony

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/twc-maker-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/twc-maker-bundle/health.svg)](https://phpackages.com/packages/twc-maker-bundle)
```

###  Alternatives

[kunstmaan/generator-bundle

If you're like us, you like to build applications without having to do the same things over and over again and dislike copy/pasting code and change a couple of words every time you need feature X. The KunstmaanGeneratorBundle gives you the possibility to generate code for new bundles, adminlists and can even make you a basic default website. That way you don't have to wait too long before you see some results and you have more time to do other things. Easy no?

23113.5k2](/packages/kunstmaan-generator-bundle)

PHPackages © 2026

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