-
Notifications
You must be signed in to change notification settings - Fork 25
refactor: add migration logging optional fields #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: add migration logging optional fields #40
Conversation
6f7d36f to
5f11375
Compare
0adfed7 to
c76e78e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the migration logging system by adding optional fields to migration log entries, implementing a builder pattern for log creation, and modernizing the logging architecture.
Key changes:
- Added optional fields (entity name, field info, source/converted data, exception details) to migration logging
- Introduced
SwagMigrationLogBuilderfor constructing log entries with optional data - Replaced constructor-based log instantiation with builder pattern across all converters and services
Reviewed Changes
Copilot reviewed 94 out of 96 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/Migration/Logging/Log/Builder/SwagMigrationLogBuilder.php |
New builder class for constructing migration log entries with optional fields |
src/Migration/Logging/Log/Builder/AbstractSwagMigrationLogEntry.php |
New abstract base class implementing common log entry functionality |
src/Migration/Logging/SwagMigrationLoggingDefinition.php |
Added new optional database fields for enhanced logging data |
| Multiple converter files | Updated to use builder pattern instead of direct constructor calls |
| Test files | Updated test expectations to match new logging structure |
Comments suppressed due to low confidence (1)
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.
src/Profile/Shopware/Converter/MainVariantRelationConverter.php
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
ennasus4sun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it 💙 💪🏻
d2468fd
into
feature/migration-logging-refactor
| */ | ||
| public function build(string $logClass): AbstractSwagMigrationLogEntry | ||
| { | ||
| $log = new $logClass( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the $logClass is invalid class name or the constructor arguments dont match it will throw an error. So I think we need a try ... catch here.
resolves #11811