Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds comprehensive Company CRUD functionality to the Phalcon API, following the same architectural patterns established for User management. The changes include new Company services, handlers, validators, sanitizers, mappers, and extensive test coverage.
Key Changes:
- Added complete Company CRUD operations (Create, Read, Update, Delete, GetMany)
- Refactored common functionality into reusable components (Transformer, AbstractValidator, AbstractInputValueObject)
- Moved validator and sanitizer enums into domain-specific namespaces for better organization
- Added new routes and container definitions for Company operations
- Removed unused code and improved code reuse across User and Company domains
Reviewed changes
Copilot reviewed 133 out of 133 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/Unit/Domain/Infrastructure/Providers/RouterProviderTest.php | Added tests for 5 new company routes |
| tests/Unit/Domain/Infrastructure/Enums/Http/RoutesEnumTest.php | Updated route count from 7 to 12 and added company route test cases |
| tests/Unit/Domain/Infrastructure/Enums/Container/*DefinitionsEnumTest.php | Added comprehensive test coverage for all definition enums (User, Company, Auth, Common) |
| tests/Unit/Domain/Infrastructure/DataSource/*/Validator/*Test.php | Added validator tests for Company and User enums |
| tests/Unit/Domain/Infrastructure/DataSource/*/Sanitizer/*Test.php | Added sanitizer enum tests |
| tests/Unit/Domain/Application/Company/**/*Test.php | Complete test suite for Company services, handlers, and commands |
| tests/Fixtures/Domain/Migrations/CompaniesMigration.php | New migration fixture for company test data |
| tests/AbstractUnitTestCase.php | Added helper methods for company test data generation |
| src/Domain/Infrastructure/Enums/Http/RoutesEnum.php | Added 5 company routes with proper service mappings |
| src/Domain/Infrastructure/Enums/Container/*DefinitionsEnum.php | Added CompanyDefinitionsEnum and refactored existing enums |
| src/Domain/Infrastructure/DataSource/Transformer/Transformer.php | New shared transformer class for data transformations |
| src/Domain/Infrastructure/DataSource/Company/** | Complete Company domain implementation (validators, sanitizers, repository, mappers, DTOs) |
| src/Domain/Infrastructure/DataSource/User/** | Refactored to use new shared components and moved enums to proper namespaces |
| src/Domain/Infrastructure/Listeners/DbErrorListener.php | New listener for database error logging |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
tests/Unit/Domain/Application/Company/Handler/CompanyHandlerDeleteTest.php
Outdated
Show resolved
Hide resolved
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.
No description provided.