From c9b62cfe0f63c921b47572c8ee7c180f31c46842 Mon Sep 17 00:00:00 2001
From: Adjoukou AGBELOU <64167040+Mike031289@users.noreply.github.com>
Date: Sun, 26 Jul 2026 10:40:56 +0200
Subject: [PATCH] Revert "feat: upgrade project to Symfony 5.4 and PHP 8.1 with
complete test coverage"
---
.env | 33 -
.env.test | 9 -
.github/workflows/ci.yml | 35 +-
.gitignore | 26 +-
README.md | 134 +-
app/.htaccess | 7 +
app/AppCache.php | 7 +
app/AppKernel.php | 51 +
.../views/Exception/error403.html.twig | 48 +
.../views/Exception/error404.html.twig | 48 +
.../views/Exception/error500.html.twig | 48 +
.../Resources/views}/base.html.twig | 0
.../Resources/views}/default/index.html.twig | 0
app/Resources/views/security/login.html.twig | 17 +
.../Resources/views}/task/create.html.twig | 0
.../Resources/views}/task/edit.html.twig | 0
.../Resources/views}/task/list.html.twig | 0
.../Resources/views}/user/create.html.twig | 0
.../Resources/views}/user/edit.html.twig | 0
.../Resources/views}/user/list.html.twig | 0
app/autoload.php | 11 +
app/config/config.yml | 69 +
app/config/config_dev.yml | 34 +
app/config/config_prod.yml | 21 +
app/config/config_test.yml | 16 +
app/config/parameters.yml.dist | 19 +
app/config/routing.yml | 3 +
app/config/routing_dev.yml | 14 +
app/config/security.yml | 33 +
app/config/services.yml | 18 +
bin/console | 27 +-
bin/phpunit | 23 -
composer.json | 125 +-
composer.lock | 9958 ++++-------------
config/bundles.php | 17 -
config/packages/cache.yaml | 19 -
config/packages/debug.yaml | 5 -
config/packages/doctrine.yaml | 45 -
config/packages/doctrine_migrations.yaml | 6 -
config/packages/framework.yaml | 24 -
config/packages/mailer.yaml | 3 -
config/packages/monolog.yaml | 55 -
config/packages/routing.yaml | 12 -
config/packages/security.yaml | 65 -
config/packages/sensio_framework_extra.yaml | 3 -
.../test/dama_doctrine_test_bundle.yaml | 4 -
config/packages/translation.yaml | 7 -
config/packages/twig.yaml | 6 -
config/packages/validator.yaml | 13 -
config/packages/web_profiler.yaml | 15 -
config/preload.php | 5 -
config/routes.yaml | 3 -
config/routes/annotations.yaml | 7 -
config/routes/framework.yaml | 4 -
config/routes/web_profiler.yaml | 8 -
config/services.yaml | 27 -
doc/QUALITY_AUDIT_REPORT.md | 129 +-
doc/TECHNICAL_SECURITY.md | 89 +-
migrations/.gitignore | 0
phpstan.dist.neon | 8 -
phpunit.xml.dist | 75 +-
public/index.php | 9 -
public/test-coverage/.css/bootstrap.min.css | 7 -
public/test-coverage/.css/custom.css | 0
public/test-coverage/.css/nv.d3.min.css | 1 -
public/test-coverage/.css/octicons.css | 5 -
public/test-coverage/.css/style.css | 122 -
public/test-coverage/.icons/file-code.svg | 1 -
.../test-coverage/.icons/file-directory.svg | 1 -
public/test-coverage/.js/bootstrap.min.js | 7 -
public/test-coverage/.js/d3.min.js | 5 -
public/test-coverage/.js/file.js | 61 -
public/test-coverage/.js/jquery.min.js | 2 -
public/test-coverage/.js/nv.d3.min.js | 8 -
public/test-coverage/.js/popper.min.js | 5 -
public/test-coverage/AppBundle.php.html | 111 -
.../LinkAnonymousTasksCommand.php.html | 298 -
public/test-coverage/Command/dashboard.html | 284 -
public/test-coverage/Command/index.html | 119 -
.../Controller/DefaultController.php.html | 171 -
.../Controller/SecurityController.php.html | 228 -
.../Controller/TaskController.php.html | 416 -
.../Controller/UserController.php.html | 303 -
.../test-coverage/Controller/dashboard.html | 287 -
public/test-coverage/Controller/index.html | 203 -
public/test-coverage/Entity/Task.php.html | 565 -
public/test-coverage/Entity/User.php.html | 719 --
public/test-coverage/Entity/dashboard.html | 286 -
public/test-coverage/Entity/index.html | 147 -
public/test-coverage/Form/TaskType.php.html | 212 -
public/test-coverage/Form/UserType.php.html | 218 -
public/test-coverage/Form/dashboard.html | 284 -
public/test-coverage/Form/index.html | 147 -
.../Repository/TaskRepository.php.html | 176 -
.../Repository/UserRepository.php.html | 215 -
.../test-coverage/Repository/dashboard.html | 290 -
public/test-coverage/Repository/index.html | 147 -
.../Security/AccessDeniedHandler.php.html | 235 -
.../test-coverage/Security/TaskVoter.php.html | 328 -
public/test-coverage/Security/dashboard.html | 284 -
public/test-coverage/Security/index.html | 147 -
public/test-coverage/_css/bootstrap.min.css | 7 -
public/test-coverage/_css/custom.css | 0
public/test-coverage/_css/nv.d3.min.css | 1 -
public/test-coverage/_css/octicons.css | 5 -
public/test-coverage/_css/style.css | 158 -
public/test-coverage/_icons/file-code.svg | 1 -
.../test-coverage/_icons/file-directory.svg | 1 -
public/test-coverage/_js/bootstrap.min.js | 7 -
public/test-coverage/_js/d3.min.js | 5 -
public/test-coverage/_js/file.js | 62 -
public/test-coverage/_js/jquery.min.js | 2 -
public/test-coverage/_js/nv.d3.min.js | 8 -
public/test-coverage/_js/popper.min.js | 5 -
public/test-coverage/dashboard.html | 294 -
public/test-coverage/index.html | 258 -
rector.php | 18 -
src/.htaccess | 7 +
src/AppBundle/AppBundle.php | 9 +
.../Command/LinkAnonymousTasksCommand.php | 75 +
.../Controller/DefaultController.php | 17 +
.../Controller/SecurityController.php | 44 +
.../Controller/TaskController.php | 32 +-
src/AppBundle/Controller/UserController.php | 121 +
.../DataFixtures/ORM/LoadData.php} | 95 +-
src/{ => AppBundle}/Entity/Task.php | 103 +-
src/AppBundle/Entity/User.php | 179 +
src/{ => AppBundle}/Form/TaskType.php | 4 +-
src/{ => AppBundle}/Form/UserType.php | 17 +-
.../Security/AccessDeniedHandler.php | 4 +-
src/{ => AppBundle}/Security/TaskVoter.php | 8 +-
src/Command/LinkAnonymousTasksCommand.php | 101 -
src/Controller/.gitignore | 0
src/Controller/DefaultController.php | 18 -
src/Controller/SecurityController.php | 53 -
src/Controller/UserController.php | 106 -
src/Entity/.gitignore | 0
src/Entity/User.php | 236 -
src/Kernel.php | 11 -
src/Repository/.gitignore | 0
src/Repository/TaskRepository.php | 23 -
src/Repository/UserRepository.php | 40 -
symfony.lock | 294 -
templates/security/login.html.twig | 56 -
.../Command/LinkAnonymousTasksCommandTest.php | 201 +
.../Controller/DefaultControllerTest.php | 26 +
.../Controller/SecurityControllerTest.php | 127 +
.../Controller/TaskControllerTest.php | 184 +
.../Controller/UserControllerTest.php | 225 +
tests/{ => AppBundle}/Entity/TaskTest.php | 10 +-
tests/{ => AppBundle}/Entity/UserTest.php | 11 +-
tests/{ => AppBundle}/Form/TaskTypeTest.php | 10 +-
tests/{ => AppBundle}/Form/UserTypeTest.php | 14 +-
.../Security/AccessDeniedHandlerTest.php | 84 +
.../Security/TaskVoterTest.php | 13 +-
.../Command/LinkAnonymousTasksCommandTest.php | 275 -
tests/Controller/DefaultControllerTest.php | 70 -
tests/Controller/SecurityControllerTest.php | 79 -
tests/Controller/TaskControllerTest.php | 152 -
tests/Controller/UserControllerTest.php | 102 -
tests/Security/AccessDeniedHandlerTest.php | 89 -
tests/bootstrap.php | 55 +-
translations/.gitignore | 0
{public => web}/.htaccess | 0
web/app.php | 18 +
web/app_dev.php | 44 +
{public => web}/apple-touch-icon.png | Bin
{public => web}/config.php | 0
{public => web}/css/bootstrap.min.css | 0
{public => web}/css/shop-homepage.css | 0
{public => web}/favicon.ico | Bin
.../fonts/glyphicons-halflings-regular.eot | Bin
.../fonts/glyphicons-halflings-regular.svg | 0
.../fonts/glyphicons-halflings-regular.ttf | Bin
.../fonts/glyphicons-halflings-regular.woff | Bin
.../fonts/glyphicons-halflings-regular.woff2 | Bin
{public => web}/img/Logo_OpenClassrooms.png | Bin
{public => web}/img/todolist_content.jpg | Bin
{public => web}/img/todolist_homepage.jpg | Bin
{public => web}/js/bootstrap.js | 0
{public => web}/js/bootstrap.min.js | 0
{public => web}/robots.txt | 0
182 files changed, 4268 insertions(+), 18548 deletions(-)
delete mode 100644 .env
delete mode 100644 .env.test
create mode 100644 app/.htaccess
create mode 100644 app/AppCache.php
create mode 100644 app/AppKernel.php
create mode 100644 app/Resources/TwigBundle/views/Exception/error403.html.twig
create mode 100644 app/Resources/TwigBundle/views/Exception/error404.html.twig
create mode 100644 app/Resources/TwigBundle/views/Exception/error500.html.twig
rename {templates => app/Resources/views}/base.html.twig (100%)
rename {templates => app/Resources/views}/default/index.html.twig (100%)
create mode 100644 app/Resources/views/security/login.html.twig
rename {templates => app/Resources/views}/task/create.html.twig (100%)
rename {templates => app/Resources/views}/task/edit.html.twig (100%)
rename {templates => app/Resources/views}/task/list.html.twig (100%)
rename {templates => app/Resources/views}/user/create.html.twig (100%)
rename {templates => app/Resources/views}/user/edit.html.twig (100%)
rename {templates => app/Resources/views}/user/list.html.twig (100%)
create mode 100644 app/autoload.php
create mode 100644 app/config/config.yml
create mode 100644 app/config/config_dev.yml
create mode 100644 app/config/config_prod.yml
create mode 100644 app/config/config_test.yml
create mode 100644 app/config/parameters.yml.dist
create mode 100644 app/config/routing.yml
create mode 100644 app/config/routing_dev.yml
create mode 100644 app/config/security.yml
create mode 100644 app/config/services.yml
delete mode 100644 bin/phpunit
delete mode 100644 config/bundles.php
delete mode 100644 config/packages/cache.yaml
delete mode 100644 config/packages/debug.yaml
delete mode 100644 config/packages/doctrine.yaml
delete mode 100644 config/packages/doctrine_migrations.yaml
delete mode 100644 config/packages/framework.yaml
delete mode 100644 config/packages/mailer.yaml
delete mode 100644 config/packages/monolog.yaml
delete mode 100644 config/packages/routing.yaml
delete mode 100644 config/packages/security.yaml
delete mode 100644 config/packages/sensio_framework_extra.yaml
delete mode 100644 config/packages/test/dama_doctrine_test_bundle.yaml
delete mode 100644 config/packages/translation.yaml
delete mode 100644 config/packages/twig.yaml
delete mode 100644 config/packages/validator.yaml
delete mode 100644 config/packages/web_profiler.yaml
delete mode 100644 config/preload.php
delete mode 100644 config/routes.yaml
delete mode 100644 config/routes/annotations.yaml
delete mode 100644 config/routes/framework.yaml
delete mode 100644 config/routes/web_profiler.yaml
delete mode 100644 config/services.yaml
delete mode 100644 migrations/.gitignore
delete mode 100644 phpstan.dist.neon
delete mode 100644 public/index.php
delete mode 100644 public/test-coverage/.css/bootstrap.min.css
delete mode 100644 public/test-coverage/.css/custom.css
delete mode 100644 public/test-coverage/.css/nv.d3.min.css
delete mode 100644 public/test-coverage/.css/octicons.css
delete mode 100644 public/test-coverage/.css/style.css
delete mode 100644 public/test-coverage/.icons/file-code.svg
delete mode 100644 public/test-coverage/.icons/file-directory.svg
delete mode 100644 public/test-coverage/.js/bootstrap.min.js
delete mode 100644 public/test-coverage/.js/d3.min.js
delete mode 100644 public/test-coverage/.js/file.js
delete mode 100644 public/test-coverage/.js/jquery.min.js
delete mode 100644 public/test-coverage/.js/nv.d3.min.js
delete mode 100644 public/test-coverage/.js/popper.min.js
delete mode 100644 public/test-coverage/AppBundle.php.html
delete mode 100644 public/test-coverage/Command/LinkAnonymousTasksCommand.php.html
delete mode 100644 public/test-coverage/Command/dashboard.html
delete mode 100644 public/test-coverage/Command/index.html
delete mode 100644 public/test-coverage/Controller/DefaultController.php.html
delete mode 100644 public/test-coverage/Controller/SecurityController.php.html
delete mode 100644 public/test-coverage/Controller/TaskController.php.html
delete mode 100644 public/test-coverage/Controller/UserController.php.html
delete mode 100644 public/test-coverage/Controller/dashboard.html
delete mode 100644 public/test-coverage/Controller/index.html
delete mode 100644 public/test-coverage/Entity/Task.php.html
delete mode 100644 public/test-coverage/Entity/User.php.html
delete mode 100644 public/test-coverage/Entity/dashboard.html
delete mode 100644 public/test-coverage/Entity/index.html
delete mode 100644 public/test-coverage/Form/TaskType.php.html
delete mode 100644 public/test-coverage/Form/UserType.php.html
delete mode 100644 public/test-coverage/Form/dashboard.html
delete mode 100644 public/test-coverage/Form/index.html
delete mode 100644 public/test-coverage/Repository/TaskRepository.php.html
delete mode 100644 public/test-coverage/Repository/UserRepository.php.html
delete mode 100644 public/test-coverage/Repository/dashboard.html
delete mode 100644 public/test-coverage/Repository/index.html
delete mode 100644 public/test-coverage/Security/AccessDeniedHandler.php.html
delete mode 100644 public/test-coverage/Security/TaskVoter.php.html
delete mode 100644 public/test-coverage/Security/dashboard.html
delete mode 100644 public/test-coverage/Security/index.html
delete mode 100644 public/test-coverage/_css/bootstrap.min.css
delete mode 100644 public/test-coverage/_css/custom.css
delete mode 100644 public/test-coverage/_css/nv.d3.min.css
delete mode 100644 public/test-coverage/_css/octicons.css
delete mode 100644 public/test-coverage/_css/style.css
delete mode 100644 public/test-coverage/_icons/file-code.svg
delete mode 100644 public/test-coverage/_icons/file-directory.svg
delete mode 100644 public/test-coverage/_js/bootstrap.min.js
delete mode 100644 public/test-coverage/_js/d3.min.js
delete mode 100644 public/test-coverage/_js/file.js
delete mode 100644 public/test-coverage/_js/jquery.min.js
delete mode 100644 public/test-coverage/_js/nv.d3.min.js
delete mode 100644 public/test-coverage/_js/popper.min.js
delete mode 100644 public/test-coverage/dashboard.html
delete mode 100644 public/test-coverage/index.html
delete mode 100644 rector.php
create mode 100644 src/.htaccess
create mode 100644 src/AppBundle/AppBundle.php
create mode 100644 src/AppBundle/Command/LinkAnonymousTasksCommand.php
create mode 100644 src/AppBundle/Controller/DefaultController.php
create mode 100644 src/AppBundle/Controller/SecurityController.php
rename src/{ => AppBundle}/Controller/TaskController.php (82%)
create mode 100644 src/AppBundle/Controller/UserController.php
rename src/{DataFixtures/AppFixtures.php => AppBundle/DataFixtures/ORM/LoadData.php} (67%)
rename src/{ => AppBundle}/Entity/Task.php (52%)
create mode 100644 src/AppBundle/Entity/User.php
rename src/{ => AppBundle}/Form/TaskType.php (94%)
rename src/{ => AppBundle}/Form/UserType.php (82%)
rename src/{ => AppBundle}/Security/AccessDeniedHandler.php (94%)
rename src/{ => AppBundle}/Security/TaskVoter.php (96%)
delete mode 100644 src/Command/LinkAnonymousTasksCommand.php
delete mode 100644 src/Controller/.gitignore
delete mode 100644 src/Controller/DefaultController.php
delete mode 100644 src/Controller/SecurityController.php
delete mode 100644 src/Controller/UserController.php
delete mode 100644 src/Entity/.gitignore
delete mode 100644 src/Entity/User.php
delete mode 100644 src/Kernel.php
delete mode 100644 src/Repository/.gitignore
delete mode 100644 src/Repository/TaskRepository.php
delete mode 100644 src/Repository/UserRepository.php
delete mode 100644 symfony.lock
delete mode 100644 templates/security/login.html.twig
create mode 100644 tests/AppBundle/Command/LinkAnonymousTasksCommandTest.php
create mode 100644 tests/AppBundle/Controller/DefaultControllerTest.php
create mode 100644 tests/AppBundle/Controller/SecurityControllerTest.php
create mode 100644 tests/AppBundle/Controller/TaskControllerTest.php
create mode 100644 tests/AppBundle/Controller/UserControllerTest.php
rename tests/{ => AppBundle}/Entity/TaskTest.php (94%)
rename tests/{ => AppBundle}/Entity/UserTest.php (96%)
rename tests/{ => AppBundle}/Form/TaskTypeTest.php (91%)
rename tests/{ => AppBundle}/Form/UserTypeTest.php (89%)
create mode 100644 tests/AppBundle/Security/AccessDeniedHandlerTest.php
rename tests/{ => AppBundle}/Security/TaskVoterTest.php (96%)
delete mode 100644 tests/Command/LinkAnonymousTasksCommandTest.php
delete mode 100644 tests/Controller/DefaultControllerTest.php
delete mode 100644 tests/Controller/SecurityControllerTest.php
delete mode 100644 tests/Controller/TaskControllerTest.php
delete mode 100644 tests/Controller/UserControllerTest.php
delete mode 100644 tests/Security/AccessDeniedHandlerTest.php
delete mode 100644 translations/.gitignore
rename {public => web}/.htaccess (100%)
create mode 100644 web/app.php
create mode 100644 web/app_dev.php
rename {public => web}/apple-touch-icon.png (100%)
rename {public => web}/config.php (100%)
rename {public => web}/css/bootstrap.min.css (100%)
mode change 100644 => 100755
rename {public => web}/css/shop-homepage.css (100%)
mode change 100644 => 100755
rename {public => web}/favicon.ico (100%)
rename {public => web}/fonts/glyphicons-halflings-regular.eot (100%)
mode change 100644 => 100755
rename {public => web}/fonts/glyphicons-halflings-regular.svg (100%)
mode change 100644 => 100755
rename {public => web}/fonts/glyphicons-halflings-regular.ttf (100%)
mode change 100644 => 100755
rename {public => web}/fonts/glyphicons-halflings-regular.woff (100%)
mode change 100644 => 100755
rename {public => web}/fonts/glyphicons-halflings-regular.woff2 (100%)
mode change 100644 => 100755
rename {public => web}/img/Logo_OpenClassrooms.png (100%)
rename {public => web}/img/todolist_content.jpg (100%)
rename {public => web}/img/todolist_homepage.jpg (100%)
rename {public => web}/js/bootstrap.js (100%)
mode change 100644 => 100755
rename {public => web}/js/bootstrap.min.js (100%)
mode change 100644 => 100755
rename {public => web}/robots.txt (100%)
diff --git a/.env b/.env
deleted file mode 100644
index a712f26..0000000
--- a/.env
+++ /dev/null
@@ -1,33 +0,0 @@
-# In all environments, the following files are loaded if they exist,
-# the latter taking precedence over the former:
-#
-# * .env contains default values for the environment variables needed by the app
-# * .env.local uncommitted file with local overrides
-# * .env.$APP_ENV committed environment-specific defaults
-# * .env.$APP_ENV.local uncommitted environment-specific overrides
-#
-# Real environment variables win over .env files.
-#
-# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
-# https://symfony.com/doc/current/configuration/secrets.html
-#
-# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
-# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
-
-###> symfony/framework-bundle ###
-APP_ENV=dev
-APP_SECRET=b9fabc4b571b22156a8da8caea68f6c0
-###< symfony/framework-bundle ###
-
-###> doctrine/doctrine-bundle ###
-# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
-# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
-#
-# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db"
-# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"
-DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
-###< doctrine/doctrine-bundle ###
-
-###> symfony/mailer ###
-MAILER_DSN=null://null
-###< symfony/mailer ###
diff --git a/.env.test b/.env.test
deleted file mode 100644
index bb828a0..0000000
--- a/.env.test
+++ /dev/null
@@ -1,9 +0,0 @@
-# define your env variables for the test env here
-KERNEL_CLASS='App\Kernel'
-APP_SECRET='$ecretf0rt3st'
-SYMFONY_DEPRECATIONS_HELPER=999999
-PANTHER_APP_ENV=panther
-PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
-
-DATABASE_URL="sqlite:///%kernel.project_dir%/var/test.db"
-APP_ENV=test
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 513aac2..75d00be 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,4 +1,4 @@
-name: Symfony 5.4 CI Pipeline
+name: Symfony 3.4 CI Pipeline
# Trigger the workflow on push or pull requests for the develop, main, and master branches
on:
@@ -9,7 +9,7 @@ on:
jobs:
tests:
- name: PHPUnit Tests (PHP 8.1)
+ name: PHPUnit Tests (PHP 7.4)
runs-on: ubuntu-latest
# Provision a containerized MySQL service for integration testing
@@ -32,13 +32,13 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v4
- # 2. Setup PHP Environment with required extensions and tools for Symfony 5.4
+ # 2. Setup PHP Environment with required extensions and tools for Symfony 3.4
- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
with:
- php-version: '8.1'
- extensions: mbstring, xml, ctype, iconv, intl, pdo, pdo_mysql, mysqli
- tools: composer:v2
+ php-version: '7.4'
+ extensions: mbstring, xml, ctype, iconv, pdo, pdo_mysql, mysqli
+ tools: composer:2.2
coverage: none # Disabled to optimize execution speed
# 3. Validate composer.json syntax and integrity
@@ -47,24 +47,27 @@ jobs:
# 4. Install Project Dependencies using Composer
- name: Install Dependencies
- run: composer install --prefer-dist --no-progress
+ run: composer install --prefer-dist --no-progress --no-suggest
- # 5. Inject Symfony 5.4 environment variables into GitHub Environment
+ # 5. Inject Symfony 3.4 parameters into GitHub Environment to override local settings
- name: Configure Test Environment Variables
run: |
- echo "DATABASE_URL=mysql://root:@127.0.0.1:3306/todoco_db?serverVersion=5.7" >> $GITHUB_ENV
- echo "APP_ENV=test" >> $GITHUB_ENV
+ echo "DATABASE_URL=mysql://root:@127.0.0.1:3306/todoco_db" >> $GITHUB_ENV
+ echo "SYMFONY__DATABASE_HOST=127.0.0.1" >> $GITHUB_ENV
+ echo "SYMFONY__DATABASE_PORT=3306" >> $GITHUB_ENV
+ echo "SYMFONY__DATABASE_NAME=todoco_db" >> $GITHUB_ENV
+ echo "SYMFONY__DATABASE_USER=root" >> $GITHUB_ENV
+ echo "SYMFONY__DATABASE_PASSWORD=" >> $GITHUB_ENV
# 6. Build the database schema using Doctrine console commands
- - name: Create Test Database and Load Fixtures
+ - name: Initialize Database and Schema
run: |
- php bin/console doctrine:database:create --env=test --if-not-exists
- php bin/console doctrine:schema:update --env=test --force
- php bin/console doctrine:fixtures:load --env=test --append -n
+ php bin/console doctrine:database:create --env=test --if-not-exists
+ php bin/console doctrine:schema:update --env=test --force
- # 7. Hydrate the isolated database with fixtures (forced purge & load)
+ # 7. Hydrate the isolated database with fixtures
- name: Load Test Fixtures
- run: php bin/console doctrine:fixtures:load --env=test --purge-with-truncate
+ run: php bin/console doctrine:fixtures:load --env=test -n
# 8. Execute the automated test suite
- name: Run Automated Test Suite
diff --git a/.gitignore b/.gitignore
index 067f91b..b122c84 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,28 +15,4 @@
/vendor/
/web/bundles/
/build/
-
-###> symfony/framework-bundle ###
-/.env.local
-/.env.local.php
-/.env.*.local
-/config/secrets/prod/prod.decrypt.private.php
-/public/bundles/
-/var/
-/vendor/
-###< symfony/framework-bundle ###
-
-###> phpunit/phpunit ###
-/phpunit.xml
-/public/test-coverage/
-.phpunit.result.cache
-###< phpunit/phpunit ###
-###> symfony/phpunit-bridge ###
-.phpunit.result.cache
-/phpunit.xml
-###< symfony/phpunit-bridge ###
-
-###> phpstan/phpstan ###
-phpstan.neon
-###< phpstan/phpstan ###
-.env
+/web/test-coverage/
diff --git a/README.md b/README.md
index 95202fb..bc71113 100644
--- a/README.md
+++ b/README.md
@@ -1,89 +1,75 @@
# ToDo & Co Application
-[](https://github.com/Mike031289/ToDo-Co/actions/workflows/ci.yml)
+[](https://github.com/Mike031289/ToDo-Co/actions/workflows/ci.yml)
-Base du projet **OpenClassrooms #8** : _Améliorez un projet existant_
+Base du projet #8 : Améliorez un projet existant
https://openclassrooms.com/projects/ameliorer-un-projet-existant-1
---
-# 📝 About the Project
+## 📝 About The Project
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, eliminate technical debt, and implement new technical requirements, including advanced user management, security policies, and a comprehensive automated testing suite using **PHPUnit**.
+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).
-## 🚀 Modernization Goals Achieved
+### 🚀 Modernization Goals Achieved
-- **Framework Upgrade:** Migrated the application from **Symfony 3.1** to **Symfony 5.4 LTS** and from **PHP 5.5.9** to **PHP 8.1**.
-- **Security Overhaul:** Introduced multi-level roles, secured task ownership, and protected sensitive actions using Symfony **Voters**.
-- **Quality Assurance:** Implemented an extensive automated test suite with **PHPUnit 9.6**, covering controllers, entities, forms, and business logic.
-- **CI/CD Pipeline:** Configured **GitHub Actions** to automatically run tests, static analysis, and coding standards validation on every push and pull request.
+- **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.
---
-# 🛠️ Tech Stack
+## 🛠️ Tech Stack
| Category | Technology |
-| ----------------------------- | ----------------------------- |
-| **Framework** | Symfony 5.4 |
-| **Language** | PHP 8.1 |
+| :---------------------------- | :---------------------------- |
+| **Framework** | Symfony 3.4 |
+| **Language** | PHP 7.4 |
| **Database** | MySQL / MariaDB |
-| **Testing** | PHPUnit 9.6 |
+| **Testing** | PHPUnit |
| **CI/CD** | GitHub Actions |
| **Static Analysis & Quality** | Codacy, PHPStan, PHP CS Fixer |
-| **Migration Tool** | Rector (PHP 8.1 compatible) |
-| **Debugging & Profiling** | Xdebug 3.x |
---
-# 📖 Project Documentation
+## 📖 Project Documentation
-To simplify onboarding and long-term maintenance, the documentation is organized into dedicated guides.
+To make onboarding and maintenance as smooth as possible, the documentation is split into dedicated guides:
-## 📘 Installation & Contribution Guide (`CONTRIBUTING.md`)
+### 📘 Installation & Contribution Guide (`CONTRIBUTING.md`)
-This guide includes:
+- Step-by-step local setup instructions.
+- Database configuration and fixtures.
+- Git workflow (branch naming and Conventional Commits).
+- Commands to run the automated test suite.
-- Local installation instructions
-- Database configuration
-- Fixture loading
-- Git workflow (branch naming and Conventional Commits)
-- Commands for running the automated test suite
+### 🔐 Technical Security & Authentication (`doc/security.md`)
-## 🔐 Technical Security & Authentication (`doc/TECHNICAL_SECURITY.md`)
-
-This document describes:
-
-- Authentication architecture
-- Role hierarchy (`ROLE_USER` / `ROLE_ADMIN`)
-- Route-level authorization
-- Business authorization using `TaskVoter`
-- Demo accounts for testing
+- Authentication architecture overview.
+- Role hierarchy (`ROLE_USER` / `ROLE_ADMIN`).
+- Route-level authorization and `TaskVoter` rules.
+- Demo accounts for testing.
---
-# 🚦 Quick Start
+## 🚦 Quick Start (Local Setup)
-For complete installation instructions, see **CONTRIBUTING.md**.
+For complete installation instructions, refer to **CONTRIBUTING.md**.
-## 1. Install dependencies
+### 1. Install dependencies
```bash
composer install
```
-## 2. Configure the database
-
-Update your database connection settings in your `.env` file (or your local environment configuration).
+### 2. Configure the database
-Example:
-
-```dotenv
-DATABASE_URL="mysql://user:password@127.0.0.1:3306/todo"
-```
+During installation, provide your local database credentials when `parameters.yml` is generated.
-## 3. Create the database and load fixtures
+### 3. Create the database and load fixtures
```bash
php bin/console doctrine:database:create
@@ -91,7 +77,7 @@ php bin/console doctrine:schema:create
php bin/console doctrine:fixtures:load --no-interaction
```
-## 4. Start the local server
+### 4. Start the local server
```bash
php bin/console server:start
@@ -105,61 +91,35 @@ http://127.0.0.1:8000
---
-# 🧪 Running Tests & Code Coverage
-
-## Run the complete test suite
-
-```bash
-vendor/bin/phpunit
-```
-
-## Run a specific test class
-
-Task entity tests:
-
-```bash
-vendor/bin/phpunit tests/Entity/TaskTest.php
-```
+## 🧪 Running Tests
-Task controller tests:
+Run the complete automated test suite:
```bash
-vendor/bin/phpunit tests/Controller/TaskControllerTest.php
+php bin/phpunit
```
-## Generate a code coverage report
+Run a specific test file (example: Task controller security tests):
```bash
-php -d xdebug.mode=coverage vendor/bin/phpunit --coverage-text
+php bin/phpunit tests/AppBundle/Controller/TaskControllerTest.php
```
---
-# 📊 Quality Audit
-
-Code quality is continuously monitored to ensure maintainability and compliance with Symfony best practices.
-
-## ✅ Coding Standards
-
-Coding style follows **PSR-12** and is automatically enforced using **PHP CS Fixer**.
-
-## 🔍 Static Analysis
+## 📊 Quality Audit
-**PHPStan** is used to detect:
+Code quality is continuously monitored to keep the project maintainable and compliant with Symfony best practices.
-- Type inconsistencies
-- Potential runtime errors
-- Dead code
-- Common programming mistakes
+### ✅ Coding Standards
-before deployment.
+- PSR-12 compatibility enforced with **PHP CS Fixer**.
-## 🔄 Continuous Integration
+### 🔍 Static Analysis
-Every push and pull request automatically triggers the GitHub Actions pipeline, which performs:
+- **PHPStan** is used to detect type inconsistencies and potential runtime issues before deployment.
-- PHPUnit test execution
-- PHP CS Fixer validation
-- PHPStan static analysis
+### 🔄 Continuous Integration
-Additionally, **Codacy** continuously reviews pull requests to monitor technical debt and maintain overall code quality.
+- **GitHub Actions** automatically executes tests, code style checks, and static analysis.
+- **Codacy** reviews every Pull Request to monitor technical debt and maintain code quality.
diff --git a/app/.htaccess b/app/.htaccess
new file mode 100644
index 0000000..fb1de45
--- /dev/null
+++ b/app/.htaccess
@@ -0,0 +1,7 @@
+
+ Désolé, vous ne possédez pas les privilèges de sécurité requis pour consulter cette ressource. Certaines actions de gestion sont réservées uniquement aux administrateurs. +
++ Le lien que vous avez suivi est peut-être obsolète, l'adresse a pu changer, ou la page a été définitivement supprimée. +
++ Notre serveur a rencontré une anomalie imprévue. Nos équipes techniques ont été automatiquement notifiées et travaillent à sa résolution. Veuillez rafraîchir la page ou réessayer ultérieurement. +
+0)for(u=-1;++u","
"],col:[2,"
"],tr:[2,"","
"],td:[3,"
"],_default:[0,"",""]};ge.optgroup=ge.option,ge.tbody=ge.tfoot=ge.colgroup=ge.caption=ge.thead,ge.th=ge.td;function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&N(e,t)?w.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n","