Skip to content

An up to date clean Symfony based on docker (PHP, Caddy, Postgres) with QA and tests tools

Notifications You must be signed in to change notification settings

damien-louis/symfony-docker

Repository files navigation

Symfony Docker

Build Status

An up to date clean Symfony based on docker (PHP, Caddy, Postgres) with QA and tests tools.
Behat component isn't available for Symfony 7 for the moment. Please use Symfony 6.4 if you need Behat.

1. git clone git@github.com:damien-louis/symfony-docker.git my-project
2. cd my-project
3. make install

It's enough \o/ Now you can visit https://app.local (or personal domain if you change SERVER_NAME in .env/.env.local)

PHP versions:

You can change PHP_VERSION in .env.local to switch to another version.
Versions available on https://hub.docker.com/r/dmnlouis/php:

  • 8.2
  • 8.3

X-Debug:

To use PHP with X-Debug enabled:

  1. make stop
  2. In .env.local, replace PHP_IMAGE= value by php-xdebug
  3. make start

Or use make restart-with-xdebug if sed is installed on your machine.

To return to PHP without X-Debug:

Follow same steps with putting back php value to PHP_IMAGE=

Or use make restart-without-xdebug if sed is installed on your machine.

QA tools:

  • PHP_CodeSniffer 3.10.3
  • PHP-CS-Fixer 3.64.0
  • PHPStan 1.12.7
  • PHP Insights 2.11.0
  • YML Linter
  • Twig Linter
  • Service Container Linter

/!\ Don't forget to attach to your own repository:

1. rm -rf .git
2. git init
3. git remote add origin <your repo>
4. git checkout -b first-commit
5. git add .
6. git commit -m "First commit"
7. git push origin first-commit

Execute make to list commands (make qa, make tests...)

You can remove .github folder if you don't use Github