ToDo & Co is a startup that offers a daily task management application.
-
Clone the repository:
git clone https://github.com/meline-p/todo-co.git cd todo-co
-
Install dependencies with Composer:
composer install
-
Configure the environment by copying the .env file:
cp .env .env.local
-
Configure the test environment by copying the .env.test file:
cp .env.test .env.test.local
APP_SECRET
: Generate a random secret keyphp bin/console secrets:generate-keys
DATABASE_URL
: Database connection URL.
Ensure these parameters are configured in the .env.local
and .env.test.local
file.
-
Create and update the database:
php bin/console doctrine:database:create php bin/console doctrine:migrations:migrate php bin/console doctrine:schema:update --force
-
(Optional) Load test data:
php bin/console doctrine:fixtures:load
Start the local server:
symfony serve -d
Access the application via your browser at http://localhost:8000.
-
This website uses
TagAwareCacheInterface
for cache management. To clear or invalidate the cache by tag, you can use the following command:php bin/console cache:clear
-
Or to invalidate a specific tag:
$cachePool->invalidateTags(['your_tag']);
-
Create and update the test database:
php bin/console doctrine:database:create --env=test php bin/console doctrine:migrations:migrate --env=test php bin/console doctrine:schema:update --force --env=test
-
Running Tests: Unit and functional tests should be placed in the tests/ directory.
-
Run all tests:
php vendor/bin/phpunit
-
Run a specific test:
php vendor/bin/phpunit tests/Entity/TaskTest.php
-
Generate test coverage report:
php vendor/bin/phpunit --coverage-html public/test-coverage
To generate documentation, use phpDocumentor. You can download the latest PHAR file from https://phpdoc.org/phpDocumentor.phar and put it at the root of the project. Execute this command:
php phpDocumentor.phar run -d ./src -t docs/
Access the generated documentation in the docs/index.html directory. Launch Go Live on Visual Studio Code and access the online documentation in the docs directory.
This document outlines the quality process and rules that all developers must follow when making changes to the project.
It is available at the root of the project: collaboration.md
.
This report consists of HTML files generated by PHPUnit, indicating the application's code coverage level. To generate new tests and a new coverage report:
php vendor/bin/phpunit --coverage-html public/test-coverage