Skip to content

mathiiii-dev/TodoList

 
 

Repository files navigation

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

About

Improve an existing ToDo & Co application

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 91.9%
  • PHP 5.7%
  • Twig 1.3%
  • JavaScript 0.6%
  • CSS 0.3%
  • Shell 0.2%