adrienlbt/hexagonal-maker-bundle

Hexagonal Maker bundle add commands to Symfony Maker bundle to help you to create files for hexagonal architecture.

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:symfony-bundle

1.0.0 2025-05-11 19:14 UTC

This package is auto-updated.

Last update: 2025-05-13 12:08:15 UTC


README

The Hexagonal Maker Bundle is a code generator, for Symfony, who automise the use case creation process for the Hexagonal Architecture. It's use the Symfony's Maker Bundle.

⚙️Install

Add the bundle with composer

composer require --dev adrienlbt/hexagonal-maker-bundle

If Symfony Flex doesn't add automatically the bundle, active it manually:

// config/bundles.php
return [
    // ...
    AdrienLbt\HexagonalMakerBundle\HexagonalMakerBundle::class => ['dev' => true]
];

⚙️Configure

If Symfony Flew doesn't create config file automaticallly, create it manually:

# config/packages/hexagonal_maker_bundle.yaml
hexagonal_maker:
  application_path: 'Application'
  domain_path: 'Domain'
  infrastructure_path: 'Infrastructure'

Override namespace

Actually (and for this first version), we duplicate the code of Symfony's Maker Bundle. For use our command we need to override the namespace for use our implementation of generator. For this you can run the following command:

bin/console make:hexagonal:dump-autoload

The result of this command, add namespace overiding in your composer.json file.

// composer.json
{
    ...,
    "autoload": {
        "psr-4": {
            ...,
            "Symfony\\Bundle\\MakerBundle\\": "vendor/adrienlbt/hexagonal-maker-bundle/src/Maker/Decorator/"
        }
    }
}

Usage

Create Use Case

Run command like follow and follow instructions.

bin/console make:hexagonal:usecase