Stars: 965
Forks: 170
Pull Requests: 152
Issues: 86
Watchers: 49
Last Updated: 2022-09-30 19:39:54
Symfony 5 DDD ES CQRS backend boilerplate.
License: Other
Languages: PHP, Makefile, Dockerfile, Twig, Mustache
A boilerplate for DDD, CQRS, Event Sourcing applications using Symfony as framework and running with PHP 8.
Symfony 4 still available in symfony-4 branch
Creating an Application Use Case
Action | Command |
---|---|
Setup | make start |
Run Tests | make phpunit |
Static Analisys | make style |
Code Style | make cs |
Code style check | make cs-check |
PHP Shell | make s=php sh |
Xdebug | make xoff/xon |
Build Artifacts | make artifact |
PHPSTORM has native integration with Docker compose. That's nice but will stop your php container after run the test scenario. That's not nice when using fpm. A solution could be use another container just for that purpose but is way slower and I don't want. For that reason I use ssh connection.
ssh in the container it's ONLY for that reason and ONLY in the DEV TAG, if you've ssh installed in your production container, you're doing it wrong...*
Click here for the detailed instructions about how to setup the PHP remote interpreter in PHPStorm.
If you're already familiar with it, here a quick configuration reference:
Host | Direction |
---|---|
Docker 4 mac | localhost |
Dinghy | $ dinghy ip |
Port: 2323
Filesystem mapping: {PROJECT_PATH}
-> /app
To ease your development process, you can use Xdebug with PHPSTORM.
Add a Docker interpreter
Enable Xdebug listenning. Don't forget to also activate Xdebug helper from your browser.
Additionally, you can check Break at first line in PHP scripts
to ensure your debug is working.
Make a request from you API at http://127.0.0.1/api/doc for example. You should see this popup:
Click on Accept
and you should be ready to debug ! Start placing breakpoints on your code and enjoy debugging !
Note for Windows users:
You might need to update
docker-os=
todocker-os=windows
in Makefile or specify its value on command line like$ make start docker-os=windows
.
Thanks goes to these wonderful people (emoji key):
Luis |
Kajetan |
Krzysztof Kowalski |
Patryk Woziński |
jon-ht |
This project follows the all-contributors specification. Contributions of any kind welcome!