ToDolist is a Symfony application to manage your daily tasks daily tasks. The goal of this pedagogic project is to update, test and document this application.
You need a web server with PHP7 (>= 8.0.0) and MySQL.
Versions used in this project:
- PHP 8.0.6
- MySQL 8.0.25
See more information on technical requirements in the Symfony official documentation.
Framework: Symfony ^5.3
Dependencies manager: Composer ^2.1.8
Quality audit (php-cs-fixer / PHPStan / Codacy / phpunit / GitHub Actions)
Download zip files or clone the project repository with github (see GitHub documentation).
Configure the database server url in your environment file:
...
###> doctrine/doctrine-bundle ###
DATABASE_URL="mysql://db_user:[email protected]:3306/db_name?serverVersion=5.7"
- If needed, install Composer by following the official instructions.
- In your cmd, go to the directory where you want to install the project and install dependencies with composer:
$ cd some\directory
$ composer install
Dependencies should be installed in your project (check vendor directory).
If you are in a dev environment, you can create the database and fill it with fake contents with the following commands in the project directory:
- create the database
php bin/console doctrine:database:create
- Create database structure thanks to migrations:
php bin/console doctrine:migrations:migrate
- Install fixtures to have fake contents:
php bin/console doctrine:fixtures:load
Your database should be updated with fake tasks and users.
php bin/console doctrine:database:create --env=test
php bin/console doctrine:schema:update --env=test -–force
To run all tests, use the following command:
./vendor/bin/phpunit
See more details and options about command-line test runner in PHP Unit documentation - EN / FR.
See the technical documentation.
See Contributing file.