feat: migrating from ddd structure to internachi-modular - #73
Merged
Conversation
…modular # Conflicts: # app-modules/ranking/tests/Feature/RankingByLevelTest.php # app-modules/season/tests/Feature/GetCurrentSeasonTest.php # app-modules/season/tests/Feature/GetSeasonsTest.php # composer.json # composer.lock # tests/Unit/Season/Application/GetCurrentSeasonTest.php # tests/Unit/Season/Application/GetSeasonsTest.php
Clintonrocha98
marked this pull request as ready for review
November 1, 2025 22:39
- Enhances user and meeting entities - Add boolean cast for 'is_donator' in User entity - Refactor UserEntity and remove unnecessary exception documentation - Update request namespaces for feedback-related requests - Improve test cases by using Mockery for stubbing - Change ID fields to string type in various tests and entities - Refactor meeting entity to handle DateTimeImmutable correctly - Update routes to use BotAuthentication middleware
This pull request focuses on improving consistency, simplifying test setups, and cleaning up module configurations across several modules (`character`, `authentication`, and `feedback`). The most significant changes include refactoring tests to use real repository implementations instead of mocks for actions, unifying ID types to strings, simplifying service provider boot methods, and cleaning up Composer autoload configurations. **Test Refactoring and Consistency Improvements:** * Refactored unit and feature tests in the `character` module to use actual repository implementations (via `Mockery`) instead of mocking action classes directly, leading to more realistic and maintainable tests. This includes changes in `ClaimCharacterBadgeTest`, `ClaimDailyBonusTest`, `FindCharacterIdByUserIdTest`, `GetCharacterByUserIDTest`, and `IncrementExperienceTest`. Test data generation was also unified to use string IDs everywhere, and trait helpers were improved for flexibility. * Updated test route middlewares in both `character` and `feedback` modules to use the `BotAuthentication::class` reference instead of the string `'bot-auth'`, improving type safety and maintainability. **Configuration and Module Cleanup:** * Simplified the `boot()` methods in `AuthenticationServiceProvider` and `CharacterServiceProvider` to empty methods, likely deferring route loading to elsewhere or as part of a broader refactor. * Cleaned up `composer.json` autoload sections for `authentication`, `character`, and `feedback` modules by removing unnecessary or duplicate entries, standardizing the structure. **Other Notable Changes:** * Removed an unused migration file for the `badge` module, reducing clutter. * Fixed namespace imports in `FeedbacksController` to correct the path to request classes. * Minor improvements and bug fixes in `DailyRewardEntity`, including making the class non-final and fixing date handling logic. These changes collectively improve code quality, consistency, and maintainability across the project.
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.

This pull request removes several service provider, route provider, factory, exception, domain, and interface files across multiple modules (
Authentication,Character,Feedback,Integrations,Meeting, andProvider). The changes indicate a major cleanup or refactor, likely to remove unused code, consolidate logic, or prepare for a new architecture.The most important changes are:
Removal of Domain and Provider Registration:
CharacterDomain.php,FeedbackDomain.php,MeetingDomain.php, andIntegrationsDomain.php, which previously registered service and route providers for each module. [1] [2] [3] [4]Removal of Service and Route Providers:
AuthenticationServiceProvider.php,CharacterServiceProvider.php,FeedbackRouteProvider.php,MeetingServiceProvider.php,TwitchIntegrationProvider.php). These files were responsible for binding interfaces to implementations and registering routes. [1] [2] [3] [4] [5] [6] [7] [8] [9]Removal of Factories and Exceptions:
PastSeasonFactory.php,MeetingTypeFactory.php) and custom exception classes (e.g.,MeetingExceptions.php). [1] [2] [3]Removal of Domain and Repository Interfaces:
TwitchService,TwitchOAuthService, andTokenRepository, which defined contracts for various services and repositories. [1] [2] [3]Removal of Application Layer Logic:
PaginateMeetings.php, which handled business logic coordination.These changes represent a significant structural update, likely as part of a larger refactor or migration effort.