A skeleton of application, which can be used if you have to satrt a new project with Symfony, Ningx, PHP and Mysql.
This skeleton will be used on new and actual projects in our organization In our skeleton we want a stack which is capable to run a Symfony application
- Nginx: 1.19
- PHP: 7.4
- Mysql: 8.0
- QualityAssurance: 7.4
- Redis: 6.0
- Mailcatcher
- PhpMyAdmin
Version 5.1
We use Behat. To run behat use:
make behat
We use PHPUnit. To run unit test use:
make unit-test
To see all usefull command run:
make help
- Change all occurences of "skeleton" in Makefile
- Change host "skeleton.docker" in site.conf
- Change "skeleton" in .bashrc
- Change base url "https://skeleton.docker" in behat.yml.dist
- Change database name "skeleton" in .env
- Change dump name "skeleton.sql" in FixtureContext
- Change local domain "https://skeleton.docker" in ErrorHandlerContext.php
- Change urls which finish with "skeleton.docker" in docker-compose.override.yaml.dist
sudo vim /etc/hosts
127.0.0.1 your-host.fr 127.0.0.1 pma.your-host.fr 127.0.0.1 mailcatcher.your-host.fr
make install
If you have already install the project and you want to switch to another project or stop for today, just stop your project:
make stop
And start when you need with:
make start
We used a dump to reload faster our database. To load your database use:
make db-load-fixtures
If you add some migration or some fixtures, you have to update your dump with:
make db-reload-fixtures
To access PhpMyAdmin use: https://pma.your-host.fr
- Login: root
- Password: root
We have some quality tools and to run all this tools, you can use:
make code-quality
In our quality tools you can find:
This tools check, if you have vulnerability in your dependencies
make security-checker
make phpmd
This tools allows you to check if you have unused dependencies
make composer-unused
make yaml-linter
make xliff-linter
make twig-linter
make container-linter
make phpstan
This tools check if you have error in your coding styles.
To show this error use:
make cs
To fix this errors use:
make cs-fix
This Symfony command check if your database schema is coherent with your entities annotation
make db-validate
If your local app send mail, your mail will be catched by the mailcatcher. To see this mail go to: https://mailcatcher.your-host.fr
If you want to help use, you can add some features like:
- A gitlab-ci.yaml example
- Add a docker image for S3 storage and some test
- Upgrade symfony version to 5.2
- Add Mac support
This are idea, but feel free to suggest any features you want!!