Conversation
…cture This commit restructures the entire application to follow the principles of Domain-Driven Design (DDD) and Onion Architecture. The goal is to isolate the core domain, make the application more testable, and decouple it from framework-specific details. The `src` directory is now organized into four distinct layers, with dependencies flowing only inwards: - **Domain Layer (`src/Domain`):** - Contains the core business logic, including rich entities, repository interfaces, and domain events. - This layer is now completely independent of any framework or external library. Doctrine and validation attributes have been removed from entities and moved to external XML mapping files in `src/Resource`. - **Application Layer (`src/Application`):** - Orchestrates the domain logic by implementing the application's use cases. - Contains the Commands, Queries, and their respective Handlers. - **Infrastructure Layer (`src/Infrastructure`):** - Provides the concrete implementations for interfaces defined in the inner layers (e.g., Doctrine repositories, Messenger buses). - The Symfony Kernel (`Kernel.php`) now resides here, clearly marking it as an infrastructure detail. - **Representation Layer (`src/Representation`):** - Contains all user-facing components, such as controllers, forms, and voters. Additionally, all framework-specific configuration (bundles, packages, routes), templates, and assets have been moved from the project root into a dedicated `src/Resource` directory. This makes a clean separation between the application's code and the framework's configuration. Signed-off-by: azjezz <azjezz@protonmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit restructures the entire application to follow the principles of Domain-Driven Design (DDD) and Onion Architecture. The goal is to isolate the core domain, make the application more testable, and decouple it from framework-specific details.
The
srcdirectory is now organized into four distinct layers, with dependencies flowing only inwards:Domain Layer (
src/Domain):src/Resource.Application Layer (
src/Application):Infrastructure Layer (
src/Infrastructure):Kernel.php) now resides here, clearly marking it as an infrastructure detail.Representation Layer (
src/Representation):Additionally, all framework-specific configuration (bundles, packages, routes), templates, and assets have been moved from the project root into a dedicated
src/Resourcedirectory. This makes a clean separation between the application's code and the framework's configuration.