Clean Architecture in PHP Symfony: Symfony based application in a Docker container

Recommend this page to a friend!
  Info   View files View files (78)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog (1)    
Last Updated Ratings Unique User Downloads Download Rankings
2021-06-14 (3 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 33 All time: 10,256 This week: 94Up
Version License PHP version Categories
clean-architecture-s 1.0.0The PHP License5PHP 5, Systems administration, Language
Description Author

This package can be used to implement a Symfony based application in a Docker container.

It provides all files to implement the start of a PHP application based on Symfony that can be run using Docker.

An application set using this package will be run using MongoDB and NginX.

Innovation Award
PHP Programming Innovation award nominee
June 2021
Number 6
Symfony is a popular PHP framework used to build Web applications.

Docker is a container-based system that allows packaging all the files needed to run an application and other applications that the main application depends on. It can also run the packaged application from its container.

This package makes it easier to build Symfony applications to be packaged and run using Docker.

Manuel Lemos
Picture of Omar Shaban
Name: Omar Shaban <contact>
Classes: 3 packages by
Country: Germany Germany
Age: 35
All time rank: 4308226 in Germany Germany
Week rank: 607 Up30 in Germany Germany Up
Innovation award
Innovation award
Nominee: 2x

Details

Clean Architecture in PHP Symfony

An example project following clean architecture principles in Symfony

Setup instructions

  1. create a .env file
    cp .env.dist .env
    
  2. create containers
    make start
    
  3. build php app - install vendor packages - check style/mess detector - run unit tests
make build-php-app php

  1. restart php container
    make restart php
    

Hosts

Service - URL: http://localhost:8021/

Documentation

  • README.md
  • docs/architecture_overview.pdf
  • Swagger/OpenAPI - json: http://localhost:8021/api/docs.json - swagger ui: http://localhost:8021/docs/
  Files folder image Files  
File Role Description
Files folder imagedocker (3 directories)
Files folder imagedocs (1 file)
Files folder imagestore (7 files, 5 directories)
Accessible without login Plain text file .env.dist Data Auxiliary data
Accessible without login Plain text file docker-compose.yml Data Auxiliary data
Accessible without login Plain text file Makefile Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  docker  
File Role Description
Files folder imagegrafana (1 file, 1 directory)
Files folder imagenginx (3 files)
Files folder imageprometheus (2 files)

  Files folder image Files  /  docker  /  grafana  
File Role Description
Files folder imageprovisioning (2 directories)
  Accessible without login Plain text file config.monitoring Data Auxiliary data

  Files folder image Files  /  docker  /  grafana  /  provisioning  
File Role Description
Files folder imagedashboards (1 file)
Files folder imagedatasources (1 file)

  Files folder image Files  /  docker  /  grafana  /  provisioning  /  dashboards  
File Role Description
  Accessible without login Plain text file dashboard.yml Data Auxiliary data

  Files folder image Files  /  docker  /  grafana  /  provisioning  /  datasources  
File Role Description
  Accessible without login Plain text file datasource.yml Data Auxiliary data

  Files folder image Files  /  docker  /  nginx  
File Role Description
  Accessible without login Plain text file Dockerfile Data Auxiliary data
  Accessible without login Plain text file nginx.conf Data Auxiliary data
  Accessible without login Plain text file symfony.conf Data Auxiliary data

  Files folder image Files  /  docker  /  prometheus  
File Role Description
  Accessible without login Plain text file alert.rules Data Auxiliary data
  Accessible without login Plain text file prometheus.yml Data Auxiliary data

  Files folder image Files  /  docs  
File Role Description
  Accessible without login Plain text file architecture_overview.pdf Data Auxiliary data

  Files folder image Files  /  store  
File Role Description
Files folder imagebin (2 files)
Files folder imageconfig (5 files, 2 directories)
Files folder imagepublic (1 file)
Files folder imagesrc (1 file, 3 directories)
Files folder imagetests (1 file, 1 directory)
  Accessible without login Plain text file .env Data Auxiliary data
  Accessible without login Plain text file .env.test Data Auxiliary data
  Accessible without login Plain text file composer.json Data Auxiliary data
  Accessible without login Plain text file Dockerfile Data Auxiliary data
  Accessible without login Plain text file Makefile Data Auxiliary data
  Accessible without login Plain text file phpmd.xml Data Auxiliary data
  Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data

  Files folder image Files  /  store  /  bin  
File Role Description
  Plain text file console Class Class source
  Accessible without login Plain text file phpunit Data Auxiliary data

  Files folder image Files  /  store  /  config  
File Role Description
Files folder imagepackages (10 files, 3 directories)
Files folder imageroutes (1 file, 1 directory)
  Plain text file bootstrap.php Class Class source
  Plain text file bundles.php Class Class source
  Accessible without login Plain text file doctrine.yaml Data Auxiliary data
  Accessible without login Plain text file routes.yaml Data Auxiliary data
  Accessible without login Plain text file services.yaml Data Auxiliary data

  Files folder image Files  /  store  /  config  /  packages  
File Role Description
Files folder imagedev (2 files)
Files folder imageprod (3 files)
Files folder imagetest (4 files)
  Accessible without login Plain text file api_platform.yaml Data Auxiliary data
  Accessible without login Plain text file cache.yaml Data Auxiliary data
  Accessible without login Plain text file doctrine_mongodb.yaml Data Auxiliary data
  Accessible without login Plain text file framework.yaml Data Auxiliary data
  Accessible without login Plain text file hb_swagger_ui.yaml Data Auxiliary data
  Accessible without login Plain text file nelmio_cors.yaml Data Auxiliary data
  Accessible without login Plain text file routing.yaml Data Auxiliary data
  Accessible without login Plain text file security.yaml Data Auxiliary data
  Accessible without login Plain text file twig.yaml Data Auxiliary data
  Accessible without login Plain text file validator.yaml Data Auxiliary data

  Files folder image Files  /  store  /  config  /  packages  /  dev  
File Role Description
  Accessible without login Plain text file monolog.yaml Data Auxiliary data
  Accessible without login Plain text file routing.yaml Data Auxiliary data

  Files folder image Files  /  store  /  config  /  packages  /  prod  
File Role Description
  Accessible without login Plain text file doctrine.yaml Data Auxiliary data
  Accessible without login Plain text file doctrine_mongodb.yaml Data Auxiliary data
  Accessible without login Plain text file monolog.yaml Data Auxiliary data

  Files folder image Files  /  store  /  config  /  packages  /  test  
File Role Description
  Accessible without login Plain text file framework.yaml Data Auxiliary data
  Accessible without login Plain text file monolog.yaml Data Auxiliary data
  Accessible without login Plain text file routing.yaml Data Auxiliary data
  Accessible without login Plain text file validator.yaml Data Auxiliary data

  Files folder image Files  /  store  /  config  /  routes  
File Role Description
Files folder imagedev (1 file)
  Accessible without login Plain text file api_platform.yaml Data Auxiliary data

  Files folder image Files  /  store  /  config  /  routes  /  dev  
File Role Description
  Accessible without login Plain text file twig.yaml Data Auxiliary data

  Files folder image Files  /  store  /  public  
File Role Description
  Accessible without login Plain text file index.php Example Example script

  Files folder image Files  /  store  /  src  
File Role Description
Files folder imageDataProviders (1 directory)
Files folder imageDomain (2 directories)
Files folder imageEntryPoints (1 directory)
  Plain text file Kernel.php Class Class source

  Files folder image Files  /  store  /  src  /  DataProviders  
File Role Description
Files folder imageDatabase (1 directory)

  Files folder image Files  /  store  /  src  /  DataProviders  /  Database  
File Role Description
Files folder imageMongoDb (2 files, 1 directory)

  Files folder image Files  /  store  /  src  /  DataProviders  /  Database  /  MongoDb  
File Role Description
Files folder imageAssemblers (1 file)
  Plain text file Key.php Class Class source
  Plain text file MongoKeyDataProvider.php Class Class source

  Files folder image Files  /  store  /  src  /  DataProviders  /  Database  /  MongoDb  /  Assemblers  
File Role Description
  Plain text file EntryAssembler.php Class Class source

  Files folder image Files  /  store  /  src  /  Domain  
File Role Description
Files folder imageEntities (1 file)
Files folder imageUseCases (5 files, 2 directories)

  Files folder image Files  /  store  /  src  /  Domain  /  Entities  
File Role Description
  Plain text file Key.php Class Class source

  Files folder image Files  /  store  /  src  /  Domain  /  UseCases  
File Role Description
Files folder imageDataProviderDefinitions (1 file)
Files folder imageException (1 file)
  Plain text file DeleteAllValuesUseCase.php Class Class source
  Plain text file DeleteValueUseCase.php Class Class source
  Plain text file GetAllValuesUseCase.php Class Class source
  Plain text file GetValueUseCase.php Class Class source
  Plain text file SetValueUseCase.php Class Class source

  Files folder image Files  /  store  /  src  /  Domain  /  UseCases  /  DataProviderDefinitions  
File Role Description
  Plain text file KeyDataProvider.php Class Class source

  Files folder image Files  /  store  /  src  /  Domain  /  UseCases  /  Exception  
File Role Description
  Plain text file ValueNotFoundException.php Class Class source

  Files folder image Files  /  store  /  src  /  EntryPoints  
File Role Description
Files folder imageRest (5 directories)

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  
File Role Description
Files folder imageAssemblers (1 file)
Files folder imageDataProviders (1 file)
Files folder imageEndpoints (5 files, 1 directory)
Files folder imageResources (1 file)
Files folder imageResponses (1 file)

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  /  Assemblers  
File Role Description
  Plain text file KeyAssembler.php Class Class source

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  /  DataProviders  
File Role Description
  Plain text file KeyItemDataProvider.php Class Class source

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  /  Endpoints  
File Role Description
Files folder imageCore (2 files)
  Plain text file DeleteAllValues.php Class Class source
  Plain text file DeleteValue.php Class Class source
  Plain text file GetAllValues.php Class Class source
  Plain text file GetValue.php Class Class source
  Plain text file SetValue.php Class Class source

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  /  Endpoints  /  Core  
File Role Description
  Plain text file AbstractEndpoint.php Class Class source
  Plain text file AbstractResourceAwareEndpoint.php Class Class source

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  /  Resources  
File Role Description
  Plain text file Key.php Class Class source

  Files folder image Files  /  store  /  src  /  EntryPoints  /  Rest  /  Responses  
File Role Description
  Plain text file StatusResponse.php Class Class source

  Files folder image Files  /  store  /  tests  
File Role Description
Files folder imageDomain (1 directory)
  Plain text file MockeryTestCase.php Class Class source

  Files folder image Files  /  store  /  tests  /  Domain  
File Role Description
Files folder imageUseCases (5 files)

  Files folder image Files  /  store  /  tests  /  Domain  /  UseCases  
File Role Description
  Plain text file DeleteAllValuesUseCaseTest.php Class Class source
  Plain text file DeleteValueUseCaseTest.php Class Class source
  Plain text file GetAllValuesUseCaseTest.php Class Class source
  Plain text file GetValueUseCaseTest.php Class Class source
  Plain text file SetValueUseCaseTest.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:33
This week:0
All time:10,256
This week:94Up
For more information send a message to info at phpclasses dot org.