This document breaks down the upgrade plan into specific, actionable tasks.
[x]Symfony 4.4 -> Symfony 5.4[x]Symfony 5.4 -> Symfony 6.4
- Goal: Ensure critical parts of the application are covered by tests before refactoring and upgrading.
- Tasks:
[x]Analyze Test Coverage: Run coverage reports (docker compose run --rm -e APP_ENV=test app bin/phpunit --coverage-html var/coverage) and identify key areas lacking tests (Controllers, Services, critical business logic). (Estimate: 0.5h)[x]Write Unit Tests for Core Services: Identify core services in/src/Service(formerly/src/Services) and/src/Helper(to be refactored) and add unit tests. (Estimate: Task per service, 0.5-1h each)[x]App\\Service\\ExportService[x]App\\Service\\SubticketSyncService[x]App\\Service\\Util\\TimeCalculationService[x]App\\Service\\Util\\TicketService[x]App\\Service\\Ldap\\LdapClientService[x]App\\Service\\LocalizationService[x]App\\Service\\SystemClock
[x]Write Integration Tests: Add integration tests for interactions between key components (e.g., Service + Repository). (Estimate: Task per interaction, 0.5-1h each)[x]Tests\\Repository\\EntryRepositoryIntegrationTest
[x]Write Functional Tests for Critical Routes: Identify critical user-facing routes and add functional tests to ensure basic functionality. (Estimate: Task per route/feature, 0.5-1h each)[x]Controllers covered: Default, Admin, Controlling, Interpretation, Security
- Goal: Remove usage of APIs deprecated in Symfony 6.4 and scheduled for removal in 7.x/7.3.
- Tasks:
[x]Enable deprecation tracking in tests: Usesymfony/phpunit-bridgeand setSYMFONY_DEPRECATIONS_HELPER=weakfor local runs. (0.25h)[x]Run test suite with deprecations enabled:docker compose run --rm -e APP_ENV=test -e SYMFONY_DEPRECATIONS_HELPER=weak app bin/phpunitand export report. (0.5h)[x]Translations API audit: Ensure onlySymfony\\Contracts\\Translation\\TranslatorInterfaceis used; removeSymfony\\Component\\Translation\\TranslatorInterfacealias fromconfig/services.yamlif unused. (0.25h)[x]Routing audit: Confirm all controllers use PHP attributes; remove any leftover annotation/YAML routes. (0.25h)[x]Twig & PHP audit: Verifytwig/twigconstraint supports PHP 8.4/Symfony 7.3; plan bump if required. (0.25h)[x]Fix remaining deprecations: Triage and resolve notices from the report. (variable)
- Goal: Align the codebase fully with Symfony 6.4 conventions before upgrading.
- Tasks:
[x]Analyze Controller Structure:[x]Review major controllers (legacyDefaultController,ControllingController) – most endpoints migrated to invokable actions underApp\Controller\Default\*,App\Controller\Controlling\ExportAction. Remaining legacy classes contain only comments/BC wrappers.[x]Identify extractions: Export spreadsheet helpers (setCellDate,setCellHours) are candidates for a smallExportSpreadsheetFormatterservice if we want thinner controllers; optional.[x]Documented notes here; no blocking refactors required pre-7.3.
[x]Move classes fromsrc/Servicestosrc/Service:[x]Movesrc/Services/Export.phptosrc/Service/ExportService.php(or similar appropriate name). (Estimate: 0.1h)[x]Update namespace in the moved file (App\Services->App\Service). (Estimate: 0.1h)[x]Update any explicit references inservices.yamlor elsewhere. (Estimate: 0.1h)[x]Movesrc/Services/SubticketSyncService.phptosrc/Service/SubticketSyncService.php. (Estimate: 0.1h)[x]Update namespace in the moved file. (Estimate: 0.1h)[x]Update any explicit references. (Estimate: 0.1h)[x]Delete thesrc/Servicesdirectory once empty. (Estimate: 0.1h)[x]Clear cache (docker compose run --rm app bin/console cache:clear). (Estimate: 0.1h)
[x]Refactorsrc/HelperClasses to Services (state-aware):[x]JiraOAuthApi: Update factory to returnJiraOAuthApiServicedirectly; removeApp\\Helper\\JiraOAuthApi. (0.5-1h)[x]LdapClient:App\\Service\\Ldap\\LdapClientServicein use; delete unused helperApp\\Helper\\LdapClient. (0.25h)[x]LocalizationHelper: Not used; deletesrc/Helper/LocalizationHelper.php. (0.25h)[x]LoginHelper: Replace usages (e.g., inBaseController) with Security APIs if any remain; then delete helper. (0.5-1h)[x]TicketHelper: Replace static calls inCrudControllerwith DI ofApp\\Service\\Util\\TicketService; remove helper after migration. (0.5-1h)[x]TimeHelper: Replace static calls withApp\\Service\\Util\\TimeCalculationServiceacross controllers/repositories; review entity usage; remove helper after migration. (1-2h)- Status: Controllers and repository use
TimeCalculationService; entityProject::toArray()still instantiates service directly forminutesToReadable. Consider injecting formatter via DTO or a static utility; acceptable for now.
- Status: Controllers and repository use
[x]Cleanup: Deletesrc/Helper/once all helpers are removed. (0.1h)
[x]Routing via PHP Attributes: Controllers already use attributes; legacy YAML removed. (Done)[x]Review Service Configuration:[x]Examineconfig/services.yaml. (Estimate: 0.5h)[x]Ensure autowiring and autoconfiguration are enabled and used effectively (_defaults,App\\). (Estimate: 0.5h)[x]Remove unnecessary explicit service definitions and legacy aliases (e.g., translator, annotations reader) if unused. (0.5h)- Note: Kept aliases for
TranslatorInterface,SessionInterface, andLoggerInterface(in active use). Explicitsessionservice retained for prod/dev; no legacy annotations reader present.
- Note: Kept aliases for
[ ]Ensure Strict Types and Type Hints:[x]Adddeclare(strict_types=1);to all PHP files. (Estimate: 0.5h - Use automated tooling if possible)[x]Add parameter and return type hints wherever missing, replacing@param/@returnphpdoc tags. (Estimate: 1h+ - Highly variable, do incrementally)
- Goal: Ensure code quality meets defined standards.
- Tasks:
[x]Run PHPStan: Executedocker compose run --rm app composer analyzeand fix reported issues. (Estimate: 1h+ - Highly variable, depends on initial state)[x]Run Psalm: Executedocker compose run --rm app composer psalmand fix reported issues. (Estimate: 1h+ - Highly variable, depends on initial state)[x]Reduce issues in controllers (admin/crud/default) and integration layer (JiraOAuthApiService)[x]Tidy repository return types and static signatures (remaining)
[x]Run CS Check/Fix: Executedocker compose run --rm app composer cs-checkanddocker compose run --rm app composer cs-fixto ensure PSR-12 compliance. (Estimate: 0.5h)
- Goal: Replace ad-hoc request parsing with typed DTOs and Symfony request mapping attributes while preserving existing semantics and tests.
- Tasks:
[x]AddApp\Dto\InterpretationFiltersDtoand refactorInterpretationControllerto use it[x]Introduce invokable controllerApp\Controller\Interpretation\GetAllEntriesActionusing#[MapQueryString][x]AddApp\Dto\ExportQueryDtoand invokableApp\Controller\Controlling\ExportActionusing#[MapQueryString][x]AddApp\Dto\AdminSyncDtoand invokableApp\Controller\Admin\SyncProjectSubticketsActionusing#[MapQueryString][x]Wire routes to new invokables and deprecate legacy actions incrementally[x]Refactor Admin controller into invokable actions; remove legacyAdminController[x]Refactor Tracking actions into invokables (SaveEntry,DeleteEntry,BulkEntry); remove legacyCrudController[x]Refactor Settings save into invokable; remove legacySettingsController[x]Refactor Interpretation endpoints into invokables; remove legacyInterpretationController[x]Refactor Default endpoints into invokables (index, summaries, data, exports, JIRA callback, scripts)[x]Follow-up: consider#[MapRequestPayload]for POST endpoints (project/customer/preset save)
[x]Updatecomposer.json: Change Symfony dependencies to^7.3.[x]Doctrine ORM 3 compatibility: Replaced deprecated DBAL APIs in repositories/tests; mock updates in tests.[x]PHPUnit 12 migration: phpunit.xml migrated to 12.3 schema; deprecated annotations replaced.[x]Runcomposer update: Resolve dependency conflicts.[x]Address Compatibility Issues: Fix errors based on Symfony 7 upgrade guides (e.g., Response::send signature).[x]Update Configuration Files: Adaptpackages/updates from recipes, verify test framework config.[x]Adjust Tests where needed: Ensure compatibility; full suite green.
[x]Run Full Test Suite: Ensure all tests pass.[x]Add CI: GitHub Actions workflowci.ymlruns static analysis and tests.[ ]Manual Testing: Verify critical application flows.- ...
[x]Audit auth:config/packages/security.yaml,App\Security\LdapAuthenticator,App\Controller\SecurityController,App\Controller\BaseController, login tests[x]AddApp\EventSubscriber\AccessDeniedSubscriberto keep legacy 403 message text[ ]Unify login route to/login(GET+POST); alignLdapAuthenticator::supports[ ]Replace manualcheckLogin/isPlwith#[IsGranted]/#[Security]across controllers (in progress)[ ]ModernizeBaseControllerto useTokenStorage; remove session unserialize hacks (in progress)[ ]Update tests to useloginUserhelper; remove session token hacks[ ]Adjustassets/js*for auth redirects and 401 handling if needed[ ]Run analyzers and fast tests; commit after each step (in progress)
[ ]Introduce Symfony TypeInfo component for stronger type introspection in services and mappers (symfony/type-info). See docs: https://symfony.com/doc/current/components/type_info.html[ ]Migrate date/time transfer to DatePoint/DatePointType for immutable, timezone-aware values in DTOs and forms where applicable.[ ]Extend object-mapper transformations to handle DatePoint mapping to entities.
(Historical phases retained above. Current focus: 6.4 -> 7.3.)