♻️ refactor(FolderProcessorSRP): extraction FolderService — SRP Vague 3#140
Merged
ronan-develop merged 3 commits intomainfrom Mar 16, 2026
Merged
♻️ refactor(FolderProcessorSRP): extraction FolderService — SRP Vague 3#140ronan-develop merged 3 commits intomainfrom
ronan-develop merged 3 commits intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Vague 3 du plan SOLID/KISS/DRY :
FolderProcessorviolait le SRP en mélangeant dispatch HTTP, validation, ownership, persistance et logging (~260 lignes).Changements
Nouvelles interfaces DIP
FilenameValidatorInterfaceOwnershipCheckerInterfaceAuthenticationResolverInterfaceLes 3 services implémentent leurs interfaces — testabilité complète par mock.
FolderService (nouveau)
Contient toute la logique métier extraite de
FolderProcessor:createFolder: validation nom, unicité, persistupdateFolder: ownership, rename, mediaType, déplacement + détection de cycledeleteFolder: ownership, suppression avec/sans migration des fichiersFolderProcessor (simplifié)
Réduit à un pur dispatcher HTTP → domaine :
FolderServiceTests
FolderServiceTest(TDD RED→GREEN)Commits
✅ test(FolderServiceTest): RED → tests unitaires FolderService + interfaces DIP✨ feat(FolderService): extraction logique métier depuis FolderProcessor (SRP)♻️ refactor(FolderProcessor): simplification — pur dispatcher HTTP→FolderService