Skip to content

Conversation

@larskemper
Copy link
Member

@larskemper larskemper commented Aug 18, 2025

resolves #11811

@larskemper larskemper changed the title Refactor/migration logging optional fields refactor: add migration logging optional fields Aug 18, 2025
@larskemper larskemper self-assigned this Aug 18, 2025
@larskemper larskemper force-pushed the refactor/migration-logging-optional-fields branch from 6f7d36f to 5f11375 Compare August 18, 2025 14:25
@larskemper larskemper force-pushed the refactor/migration-logging-optional-fields branch from 0adfed7 to c76e78e Compare August 19, 2025 06:41
@larskemper larskemper requested a review from Copilot August 19, 2025 06:42

This comment was marked as outdated.

Copy link

Copilot AI left a 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 SwagMigrationLogBuilder for 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.

@larskemper larskemper marked this pull request as ready for review August 19, 2025 12:17
@larskemper larskemper requested a review from Copilot August 19, 2025 12:21
Copy link

Copilot AI left a 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.

Copy link
Contributor

@ennasus4sun ennasus4sun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it 💙 💪🏻

@larskemper larskemper merged commit d2468fd into feature/migration-logging-refactor Aug 21, 2025
7 checks passed
@larskemper larskemper deleted the refactor/migration-logging-optional-fields branch August 21, 2025 12:50
*/
public function build(string $logClass): AbstractSwagMigrationLogEntry
{
$log = new $logClass(
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants