PHPackages                             jtc-solutions/code-generator - 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. jtc-solutions/code-generator

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

jtc-solutions/code-generator
============================

Package that helps generating CRUD, services and repository boilerplate.

v0.1.3(1y ago)03.6k↑18.8%proprietaryPHPPHP &gt;=8.3CI failing

Since Apr 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/JTC-Solutions/code-generator)[ Packagist](https://packagist.org/packages/jtc-solutions/code-generator)[ RSS](/packages/jtc-solutions-code-generator/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (14)Versions (6)Used By (0)

JTC Solutions Code Generator Bundle
===================================

[](#jtc-solutions-code-generator-bundle)

Symfony bundle that helps generate boilerplate code for CRUD Controllers (List, Detail, Create, Update, Delete), DTOs, Repositories and Services.

Designed primarily for Domain-Driven Design structured applications.

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

[](#installation)

1. **Require the bundle using Composer**:

```
composer require jtc-solutions/code-generator --dev
```

*(Note: Typically used as a dev dependency)*

2. **Enable the bundle**:
    If your application doesn't use Symfony Flex, you'll need to manually enable the bundle by adding it to your config/bundles.php file:

```
// config/bundles.php
return [
    // ... other bundles
    JtcSolutions\CodeGenerator\JtcSolutionsCodeGeneratorBundle::class => ['dev' => true],
];
```

Configuration
-------------

[](#configuration)

Create a configuration file (e.g., `config/packages/dev/jtc_solutions_code_generator.yaml`) to define how the generator should behave.

```
# config/packages/dev/jtc_solutions_code_generator.yaml
jtc_solutions_code_generator:
    global:
        # Supported variables are {domain} and {entity}
        # Example: App\Domain\Catalog\Entity\Product -> domain=Catalog, entity=Product
        namespace:
            # Template for generated controller namespaces.
            controllerNamespaceTemplate: 'App\{domain}\App\Api\{entity}'
            # Template for generated DTO namespaces.
            dtoNamespaceTemplate: 'App\{domain}\Domain\Dto\{entity}'
            # Template for generated Service namespace.
            serviceNamespaceTemplate: 'App\{domain}\Domain\Service\{entity}'
            # Template for generated Repository namespace.
            repositoryNamespaceTemplate: 'App\{domain}\Infrastructure\Repository'

        project:
            # Project source directory relative to kernel.project_dir
            # Example: 'src' or '.' if source is in the root
            projectDir: '%kernel.project_dir%/src' # Required

            # Base namespace corresponding to the projectDir
            # Example: 'App' for 'src/...'
            projectBaseNamespace: 'project' # Required

            # Fully qualified class name (FQCN) of the interface that all your entities implement.
            # Used by the DTO generator to identify entity properties.
            entityInterface: JtcSolutions\Core\Entity\IEntity # Required

            # Fully qualified class name (FQCN) of the class to use as a type hint
            # in DTOs when an entity property is detected.
            # Example: A property 'product' of type Product (implements IEntity)
            # will become 'product' of type EntityId in the DTO.
            dtoEntityReplacement: JtcSolutions\Core\Dto\EntityId

            # Fully qualified class name (FQCN) of an interface that generated
            # Request DTOs (for Create/Update) should implement.
            requestDtoInterface: JtcSolutions\Core\Dto\IEntityRequestBody

            # Properties that will be skipped and ignored for generations
            # useful for common properties that you do not want in your DTOs and service such as entity Id, or timestamps.
            ignoredProperties:
              - "id"
              - "createdAt"
              - "createdBy"

        openApi:
            # Fully qualified class name (FQCN) of the DTO used for error responses
            # in generated OpenAPI documentation.
            errorResponseClass: JtcSolutions\Core\Dto\ErrorRequestJsonResponse

            # Fully qualified class name (FQCN) of the DTO used for pagination metadata
            # in generated OpenAPI documentation for list endpoints.
            paginationClass: JtcSolutions\Core\Dto\Pagination

    # Configuration for controllers.
    # - "parent" is default extended class
    controllers:
        create:
          parent: JtcSolutions\Core\Controller\BaseEntityCRUDController
        update:
          parent: JtcSolutions\Core\Controller\BaseEntityCRUDController
        delete:
          parent: JtcSolutions\Core\Controller\BaseEntityCRUDController
        detail:
          parent: JtcSolutions\Core\Controller\BaseController
        list:
          parent: JtcSolutions\Core\Controller\BaseController
```

#### Placeholders

[](#placeholders)

- `{domain}`: Extracted from the entity's namespace (e.g., `Catalog` from `App\Catalog\Domain\Entity\Product`).
- `{entity}`: The short class name of the entity (e.g., `Product` from `App\Domain\Catalog\Entity\Product`).

Usage
-----

[](#usage)

The primary way to use the bundle is via the provided Symfony console command.

```
php bin/console jtc-solutions:generate-crud
```

*Note: The TargetEntityFQCN must be in quotes. Otherwise it is escaped.*

**Example**:

```
php bin/console jtc-solutions:generate-crud 'App\Domain\Catalog\Entity\Product'
```

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance46

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 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 ~2 days

Total

4

Last Release

436d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1b321740527037d9566e21683ab4b0a572d7b5b35a3a6e78fbfe9e1819cb047a?d=identicon)[davidjungman](/maintainers/davidjungman)

---

Top Contributors

[![davidjungman](https://avatars.githubusercontent.com/u/22246230?v=4)](https://github.com/davidjungman "davidjungman (27 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StyleECS

Type Coverage Yes

### Embed Badge

![Health badge](/badges/jtc-solutions-code-generator/health.svg)

```
[![Health](https://phpackages.com/badges/jtc-solutions-code-generator/health.svg)](https://phpackages.com/packages/jtc-solutions-code-generator)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M572](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[typo3/cms

TYPO3 CMS is a free open source Content Management Framework initially created by Kasper Skaarhoj and licensed under GNU/GPL.

1.2k1.9M122](/packages/typo3-cms)[silverstripe/framework

The SilverStripe framework

7313.7M2.8k](/packages/silverstripe-framework)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)

PHPackages © 2026

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