Base du projet #8 : Améliorez un projet existant https://openclassrooms.com/projects/ameliorer-un-projet-existant-1
This repository is dedicated to the modernization of the ToDo & Co web application.
The main objective of this project is to take over an existing legacy codebase (Symfony 3.1 / PHP 5.5.9), perform a thorough code quality audit, fix critical technical debt, and implement new technical requirements—including advanced user management, security policies, and an exhaustive automated testing suite (PHPUnit).
- Framework Upgrade: Migrated the legacy application to Symfony 3.4 and PHP 7.4 to ensure stability and long-term dependency support.
- Security Overhaul: Implemented multi-level roles, isolated task ownership, and resolved security vulnerabilities using Symfony Voters.
- Quality Assurance: Built a comprehensive automated testing suite with PHPUnit, covering controllers, forms, and business logic.
- CI/CD Pipeline: Integrated GitHub Actions for continuous integration, including automated tests, static analysis, and code style validation on every push.
| Category | Technology |
|---|---|
| Framework | Symfony 3.4 |
| Language | PHP 7.4 |
| Database | MySQL / MariaDB |
| Testing | PHPUnit |
| CI/CD | GitHub Actions |
| Static Analysis & Quality | Codacy, PHPStan, PHP CS Fixer |
To make onboarding and maintenance as smooth as possible, the documentation is split into dedicated guides:
- Step-by-step local setup instructions.
- Database configuration and fixtures.
- Git workflow (branch naming and Conventional Commits).
- Commands to run the automated test suite.
- Authentication architecture overview.
- Role hierarchy (
ROLE_USER/ROLE_ADMIN). - Route-level authorization and
TaskVoterrules. - Demo accounts for testing.
For complete installation instructions, refer to CONTRIBUTING.md.
composer installDuring installation, provide your local database credentials when parameters.yml is generated.
php bin/console doctrine:database:create
php bin/console doctrine:schema:create
php bin/console doctrine:fixtures:load --no-interactionphp bin/console server:startThe application will be available at:
http://127.0.0.1:8000
Run the complete automated test suite:
php bin/phpunitRun a specific test file (example: Task controller security tests):
php bin/phpunit tests/AppBundle/Controller/TaskControllerTest.phpCode quality is continuously monitored to keep the project maintainable and compliant with Symfony best practices.
- PSR-12 compatibility enforced with PHP CS Fixer.
- PHPStan is used to detect type inconsistencies and potential runtime issues before deployment.
- GitHub Actions automatically executes tests, code style checks, and static analysis.
- Codacy reviews every Pull Request to monitor technical debt and maintain code quality.