POC of Clean Architecture with Symfony

Introduction

I will soon be changing jobs and the clean architecture is used in the new company. So I decided to experiment with it by making a POC.
Maybe it can inspire someone. Or could someone help me to correct any errors in my approach.

As far as I could understand there are two main approaches in clean architecture. The first involves inserting the entire framework in the infrastructure, the second instead involves inserting only some parts of it in the infrastructure directory. It contains essential infrastructure details such as the code that interacts with your database, makes calls to the file system, or code that handles HTTP calls to other applications on which you depend for example (like Hexagonal Architecture).
In this POC I will use the first approach.

The example I have implemented is simply a user registration, which can be done via a form or via an API and the business logic is shared between the two.

Continue reading on Medium

Leave a comment