Releases: juananrey/default-ddd-php-project
Releases · juananrey/default-ddd-php-project
DDD-ing the whole project and emancipating from Symfomy framework
🎩 Goal
- This project SHOULD implement a DDD architectural style to be used as a default PHP project
- As a consequence of 1), this project SHOULD implement the framework of choice just as an Infrastructure concern (hence, not determining the Model and Application layers implementation).
🗿 In the mid time
- Removing
Redis
as a basic dependency of the dockerized environment and providing the option of using it by spinning up thedocker-compose-with-redis.yml
script. - Adding exhaustive documentation on how to go to production with the current project and the architectural base definition of the project.
- Giving some love to
composer.json
file by adding exclusively the minimum dependencies.� - Better exception handling by extracting any infrastructure concern from them (before they used to have an HTTP error code!!). Now the information about HTTP error codes can just be inferred on the Infrastructure by checking the
internal error code
of the exceptions!�
Adding basic structure + PHPUnit + PHPCS
- Adding
FrameworkExtraBundle
to render controllers with given Annotations. - Adding
HealthCheckController
, minimal piece of code which will determine if our API is running or not. - Adding custom exceptions for our application: the idea behind this is that every exception within our domain shall extend from
AppException
, which have the control on two things:- All our exceptions will have specific error codes (of course, already known by our clients).
- In order to avoid bubbling up exceptions and make an infinite
try/catch
, such exceptions will also contain a predefined HTTP error code.
- Adding
ExceptionListener
, which will render every exception within the system in ajson
format, to be consistent with the rest of the API. - Adding PHPUnit unit and functional test possibilities, which can be executed running
bin/phpunit
. - Adding PHP Code Sniffer which defaults to the PSR-2 standard, and that can be executed by running
bin/phpcs
.
Adding docker + symfony flex index page render
Adding docker + symfony flex index page render