andythorne/symfony-skeleton-ddd

A minimal Symfony project recommended to create bare bones Domain Driven Designed applications

5.2.0 2020-12-11 21:53 UTC

This package is auto-updated.

Last update: 2024-04-12 05:28:45 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Installation

composer create-project andythorne/symfony-skeleton-ddd

Project Architecture

This project sets up symfony with separated application, domain and infrastructure layers:

Path Namespace
src/apps App\
src/domains Domain\
src/infra Infra\

Application Layer

Each application layer "app" has autoconfigured Controllers under App\<AppName>\Controller\. In-line with symfony skeleton, you will need to set up routing for each app. It's suggested to set a path prefix for each app:

# config/routes/annotations.yaml

# ACME app
acme_controllers:
    resource: '../../src/apps/Acme/Controller/**/*'
    type: annotation
    prefix: /acme

App-level service configuration should be done in config/apps/<appName>.yaml.

Domain Layer

Each domain under Domain\ has the symfony event dispatcher autoconfigured by default.

Domain-level service configuration should be done in config/domains/<domainName>.yaml.

Infra Layer

Infra-level service configuration should be done in config/infra/<infraName>.yaml.