You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: conformidade ARFA 1.3 — extrair MigrationService + naming + pure VO
S1/S7 — Immutabilidade (MigrationReport):
- Removidos removeFiles(), removePackagesFromComposer(), removeRecursive() do VO
- MigrationReport agora é pure Value Object (final readonly) sem side-effects de I/O
- Adicionado docblock referenciando MigrationService como executor das operações
S1 — Single Responsibility (MigrationService):
- Criado Core/MigrationService com toda lógica de I/O extraída do VO
- removeFiles(MigrationReport): deleta config files e cache paths do disco
- removePackagesFromComposer(MigrationReport): reescreve composer.json require-dev
S2 — DIP (MigrateCommand):
- MigrationService injetado via construtor (default parameter PHP 8.4+)
- Chamadas delegadas ao service: service->removeFiles() e service->removePackagesFromComposer()
S4 — Naming (Devkit.php):
- $ctx → $context em init() e ensureDirectories()
- $dir → $directoryPath em ensureDirectories() e removeRecursive()
Tests:
- Criado MigrationServiceTest com 4 testes de I/O (file, directory, non-existent, composer.json)
- Removido removeFilesDeletesExistingFiles do MigrationReportTest (migrado)
- cs-fixer aplicado em 35 arquivos (native_function_invocation + estilo)
Quality: cs-fixer ✓ phpstan ✓ psalm ✓ phpunit ✓
0 commit comments