/TodoList

Improve an existing ToDo & Co application

Primary LanguageHTML

P8 OC DA/PHP - Symfony

Improve an existing ToDo & Co application

Codacy Badge

Getting Started

These instructions will get you a copy of the project up and running on your local machine if you want to test it or develop something on it.

Prerequisites

To make the project run you will need to install those things :

Installing

Follow those steps to make the project run on your machine

Clone the project :

git clone https://github.com/mathiiii-dev/TodoList.git

Install composer dependencies :

composer install && npm install

Run webpack build :

npm run build

Database & DataFixtures

First edit .env (or create a .env.local to override it) with your database credentials :

DATABASE_URL="mysql://root:@127.0.0.1:3306/to-do-list?serverVersion=5.7"

Create the database :

php bin/console doctrine:database:create

Update schema :

php bin/console doctrine:schema:update --force

Load some data into the database :

php bin/console doctrine:fixtures:load

Test account

The datafixtures will load some users for you to test the application :

Admin user:

Pseudo : Mathias
Password : password

Normal user :

Pseudo : Xavier
Password : password

Launch project

Using Symfony CLI :

symfony serve

Unit & Functional tests

The tests are available here :

📦 
└─ tests
  â”œâ”€ Fixtures
  â”‚  â””─ UserTaskFixtures.yaml
  â”œâ”€ Functional
  â”‚  â””─ Controller
  â”‚     â”œâ”€ HomeControllerTest.php
  â”‚     ├─ SecurityControllerTest.php
  │     â”œâ”€ TaskControllerTest.php
  │     â””─ UserControllerTest.php
  └─ Unit
        ├─ Entity
        │  â”œâ”€ TaskTest.php
        │  â””─ UserTest.php
        ├─ Form
        │  â”œâ”€ TaskTypeTest.php
        │  â””─ UserTypeTest.php
        └─ Repository
            ├─ TaskRepositoryTest.php
            └─ UserRepositoryTest.php

If you want to run some unit or functional tests, you can simply run :

php ./vendor/bin/phunit

If you want to generate a code coverage report, you can run :

php ./vendor/bin/phunit --coverage-html public/tests

The code coverage of this project is about 100% :

Then you can access the report here : https://127.0.0.1:8000/tests/ code coverage

Built With

Wiki

To help you understand how this project works and how you can contribute to this project please check the docs directory or the Wiki of this repository

Versioning

For the versions available, see the tags on this repository.

Authors

  • Mathias Micheli - Student - Github