Skip to content

Conversation

@larskemper
Copy link
Member

@larskemper larskemper commented Dec 19, 2025

Changes

General

  • unified logging and exception handling (own validation exception class)
  • split invalid field value in required / optional field log (required is an error, optional a warning)
  • added translation log for future fix implementation
  • fix conversion of order custom fields (before was set to invalid "null" if not existing)
  • fix sizing and coloring of ssl url in ui
  • fix unpinned padding of log group table

Validation wise

  • added check for database field definition: field now get marked as required if: definition has required flag, database field is not nullable and has no default value
  • removed check for unexpected fields (adds unnecessary noise to logs and errors)
  • removed db lookup of associations ids (n+1 query problem)
  • removed validation of association fields by serializer (often false positive, cause of missing write context data)
  • added a more naive / basic check for association fields: correct data structure and valid ids

@larskemper larskemper self-assigned this Dec 19, 2025
@larskemper larskemper marked this pull request as ready for review December 19, 2025 10:49
@larskemper larskemper changed the title refactor: filter optional database field refactor: filter optional database fields Dec 19, 2025
@MalteJanz MalteJanz self-requested a review December 19, 2025 14:07
@larskemper larskemper marked this pull request as draft January 6, 2026 09:43
@larskemper larskemper marked this pull request as ready for review January 6, 2026 10:01
@larskemper larskemper marked this pull request as draft January 6, 2026 10:05
@larskemper larskemper changed the title refactor: filter optional database fields refactor: migration validation Jan 6, 2026
@larskemper larskemper marked this pull request as ready for review January 7, 2026 09:29
Comment on lines +238 to +239
$baseData,
MigrationValidationException::unexpectedNullValue('id')->getMessage(),
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
$baseData,
MigrationValidationException::unexpectedNullValue('id')->getMessage(),
'convertedData' => $baseData,
'expectedExceptionMessage' => MigrationValidationException::unexpectedNullValue('id')->getMessage(),

Copy link
Member Author

Choose a reason for hiding this comment

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

when comes the day where I finally remember this 🤣. I need a phpstan rule for this

],
[
MigrationValidationInvalidFieldValueLog::class,
MigrationValidationInvalidOptionalFieldValueLog::class,
Copy link
Contributor

Choose a reason for hiding this comment

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

here the keys are missing, too

Comment on lines +508 to +512
[
...$baseProduct,
'categories' => [],
],
[],
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[
...$baseProduct,
'categories' => [],
],
[],
'convertedData' => [
...$baseProduct,
'categories' => [],
],
'expectedLogs' => [],

Comment on lines +616 to +617
$baseProduct,
[],
Copy link
Contributor

Choose a reason for hiding this comment

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

same: keys missing

@larskemper larskemper marked this pull request as draft January 9, 2026 10:44
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.

5 participants