Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/webeetle/symfony-ddd-skeleton

Simple scaffolding for PHP / Symfony REST microservice
https://github.com/webeetle/symfony-ddd-skeleton

hexagonal-architecture php symfony

Last synced: 4 days ago
JSON representation

Simple scaffolding for PHP / Symfony REST microservice

Awesome Lists containing this project

README

        

# Symfony DDD Skeleton

## Description

This is a complete stack for running Symfony 6.3 into Docker containers using docker-compose tool.

It is composed by 2 containers:

- `nginx`, acting as the webserver.
- `php`, the PHP-FPM container with the 8.2 version of PHP.

## Installation

1. ๐Ÿ˜€ Clone this rep.

2. Create the file `./.docker/.env.nginx.local` using `./.docker/.env.nginx` as template. The value of the variable `NGINX_BACKEND_DOMAIN` is the `server_name` used in NGINX.

3. Go inside folder `./docker` and run `docker-compose up -d` to start containers.

4. Inside the `php` container, run `composer install` to install dependencies from `/var/www/symfony` folder.

## Run Scritps

๐Ÿงน Keep a modern codebase with **PHP Coding Standards Fixer**:
```bash
composer lint
```

โœ… Run refactors using **Rector**
```bash
composer refacto
```

โš—๏ธ Run static analysis using **PHPStan**:
```bash
composer test:types
```

โœ… Run unit tests using **PHPUnit**
```bash
composer test:unit
```

๐Ÿš€ Run the entire test suite:
```bash
composer test
```