Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Domain Driven Bundle Laravel Package

dbrekelmans/domain-driven-bundle

View on GitHub
Deep Wiki
Context7

Domain Driven Bundle

This bundle provides automatic bundle configuration for a domain driven directory structure in Symfony.

Directory structure

The default configuration for this bundle automatically configures the following directory structure:

src/
├── <DomainContextA>/
│   ├── Application
│   ├── Domain
│   │   ├── Entity
│   │   ├── Event
│   │   ├── Factory
│   │   ├── Repository
│   │   ├── Service
│   │   └── ValueObject
│   ├── Infrastructure
│   │   └── config
│   │   │   ├── routes.yaml
│   │   │   └── services.yaml
│   └── Presentation
└── <DomainContextB>/
    └── ...

Installation

Install the bundle with composer: composer require dbrekelmans/domain-driven-bundle.

Routing

Bundle defined routing is never automatically imported in symfony. To automatically import the routing configuration from your context directories, add the following to config/routes.yaml:

framework:
    resource: '@DomainDrivenBundle/Resources/config/routes.yaml'

Configuration

This bundle works out of the box with the directory structure as detailed above. You can configure the directory names and locations in your symfony application in config/packages/domain_driven.yaml.

The default configuration is as follows:

domain_driven:
    directories:
        context: '%kernel.project_dir%/src'
        application: 'Application'
        domain: 'Domain'
        infrastructure: 'Infrastructure'
        presentation: 'Presentation'
        config: 'config'
    files:
        routes: 'routes'
        services: 'services'

Supported bundles

symfony/framework-bundle

Services

Service configuration files are automatically loaded from domain_driven.directories.context/*/domain_driven.directories.infrastructure/domain_driven.directories.config/domain_driven.files.services.{yaml,yml,xml,php}.

Routing

Routing configuration files are automatically loaded from domain_driven.directories.context/*/domain_driven.directories.infrastructure/domain_driven.directories.config/domain_driven.files.routes.{yaml,yml,xml,php}.

symfony/twig-bundle

Templates

Template files are automatically configured in domain_driven.directories.context/*/domain_driven.directories.presentation/domain_driven.directories.template.

Roadmap

Additional bundles support

  • symfony/framework (symfony/translation)
  • doctrine/doctrine-migrations-bundle

Maker command

Console command to create a new context skeleton based on your config. With default configuration will result in the directory structure as detailed above.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
besmartand-pro/php-quality-config
sentix/ai-chatbot
codifyo/ts-generator-bundle
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky
spatie/mailcoach-vapor