This repository is used to practice Symfony and Domain-driven design. Commit messages will have detailed description which commands, documentation and other resources were used along the way. The goal is to have information on why and how in addition to what has changed. git blame
and git log
can be used to follow along, commit history can be seen as a tutorial. Commit Driven Learning (CDL). 🤯
- Symfony Docker with FrankenPHP at commit.
- Symfony at commit.
- Makefile at commit.
- Documentation for debugging with PhpStorm and Visual Studio Code.
- Unit, functional and E2E tests at commit, commit, commit and commit.
- CQRS and Event Sourcing at commit and commit.
- Domain Events at commit.
- Deployment in production on Kubernetes at commit and commit.
- Semantic HTML with Pico CSS at commit.
- Deptrac at commit and commit.
- PHPStan at commit.
- Easy Coding Standard at commit.
- Docker Compose (v2.10+)
- If you are using Windows, you have to install chocolatey.org or Cygwin to use the
make
command. Check out this StackOverflow question for more explanations.
Note
The project is developed on Debian 12 if you use another OS have that in mind if something doesn't work as expected.
To build Docker images, after cloning current repository in the project root execute:
make build
To install Symfony inside Docker container and start the application:
make up
make up
will install Symfony only if it is not already installed.
After installation app should be available at http://localhost/.
pgAdmin - administration and development platform for PostgreSQL
It is available at http://localhost:5050/.
Credentials:
- Email Address / Username:
[email protected]
- Password:
!ChangeMe!
Mailpit - email & SMTP testing tool with API for developers
It is available at http://localhost:8025/.
RabbitMQ - a reliable and mature messaging and streaming broker
RabbitMQ Management (UI) is available at http://localhost:15672/.
Credentials:
- Username:
admin
- Password:
!ChangeMe!
Action | Command |
---|---|
List all commands | make help |
Start containers | make up |
Check project for errors, run tests, code analysis, etc. | make check |
Stop containers | make down |
Rebuild and start the containers | make rebuild |
Restart the containers | make restart |
Show live logs | make logs |
Get Bash shell in container | make bash |
Clear the cache | make cc |
Start tests with phpunit | make test |
Install composer package | make composer c='require <PACKAGE_NAME>' |
Take ownership of files outside the container | make ownership |
Remove all the containers, networks, volumes and images | make destroy |
Execute Symfony console command | make sf c='<COMMAND>' , e.g. make sf c='about' |
Run architectural layers analysis with Deptrac | make ala |
Run static code analysis with PHPStan | make sca |
Run coding standard analysis with Easy Coding Standard | make csa |
Fix coding standard with Easy Coding Standard | make csf |
Everything here is heavily influenced by these great projects:
- Symfony: The Fast Track
- Symfony Documentation
- Symfony Docker
- API Platform
- jorge07/symfony-6-es-cqrs-boilerplate
- Pico CSS
Big thank you for all the fish lessons goes to them. 🙏
🐬