Giter Club home page Giter Club logo

odor's Introduction

Skeleton

CI

Description

A skeleton of application, which can be used if you have to satrt a new project with Symfony, Ningx, PHP and Mysql.

Purpose

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

What is in Skeleton ?

Docker

  • Nginx: 1.19
  • PHP: 7.4
  • Mysql: 8.0
  • QualityAssurance: 7.4
  • Redis: 6.0
  • Mailcatcher
  • PhpMyAdmin

Symfony

Version 5.1

Functionnal Test

We use Behat. To run behat use:

  make behat

Unit Test

We use PHPUnit. To run unit test use:

  make unit-test

Makefile

To see all usefull command run:

  make help

How to start with Skeleton ?

First replace "skeleton" occurence with your project name

  • 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

Add host in your /etc/hosts

  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

Install the project

  make install

Work with project

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

Database management

We used a dump to reload faster our database. To load your database use:

  make db-load-fixtures

Update dump

If you add some migration or some fixtures, you have to update your dump with:

   make db-reload-fixtures

PhpMyAdmin

To access PhpMyAdmin use: https://pma.your-host.fr

  • Login: root
  • Password: root

Quality of our code

We have some quality tools and to run all this tools, you can use:

  make code-quality

In our quality tools you can find:

Security checker of symfony

This tools check, if you have vulnerability in your dependencies

  make security-checker

PHPmd

  make phpmd

Composer unused

This tools allows you to check if you have unused dependencies

  make composer-unused

Yaml Linter

  make yaml-linter

Xliff Linter

  make xliff-linter

Twig Linter

  make twig-linter

Container Linter

  make container-linter

PHPStan

  make phpstan

CS Fixer

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

Validate database schema

This Symfony command check if your database schema is coherent with your entities annotation

  make db-validate

Mailcatcher

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

Next step

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!!

odor's People

Contributors

fabienpapet avatar tegbessou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.