Skip to content

Conversation

@Guikingone
Copy link
Contributor

@Guikingone Guikingone commented Nov 27, 2025

Q A
Bug fix? yes
New feature? no
Docs? no
Issues None
License MIT

Summary:

  • When using MessageNormalizer::denormalize(), it looks like we're recreating a new Uuid::v7() in the constructor
  • Due to this behavior, when persisting messages, they're receiving a new uuid even on older ones
  • This PR introduce a IdentifierAwareTrait that expose two methods getId() and withId, the last one allows to either specify an exiting Uuid or use a v7 one

@Guikingone Guikingone changed the title [Platform] Improvements on Uuid handling && MessageNormalizer [Platform] Improvements on Uuid handling && MessageNormalizer Nov 27, 2025
@Guikingone Guikingone marked this pull request as ready for review November 27, 2025 10:05
@carsonbot carsonbot added Bug Something isn't working Platform Issues & PRs about the AI Platform component Status: Needs Review labels Nov 27, 2025
@OskarStark OskarStark changed the title [Platform] Improvements on Uuid handling && MessageNormalizer [Platform] Improvements on Uuid handling & MessageNormalizer Nov 27, 2025
@Guikingone Guikingone force-pushed the refactor/message_identifier branch 4 times, most recently from f4e9f4b to 5896900 Compare November 30, 2025 10:42
@Guikingone Guikingone force-pushed the refactor/message_identifier branch 7 times, most recently from e8cc913 to 604d5aa Compare December 7, 2025 18:24
Copy link
Member

@chr-hertel chr-hertel left a comment

Choose a reason for hiding this comment

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

My assumption as user would be that a withId clones the instance - and that would also help here, right?

we could keep the instantiation of id in the constructor but overwrite if needed with that withId

@Guikingone
Copy link
Contributor Author

Make sense, I was focused on the method and not its usages, to be honest, I was looking at the method last night and said to myself: Damn, that's ugly as hell in the constructor 😅

@Guikingone Guikingone requested a review from chr-hertel December 8, 2025 08:16
@Guikingone Guikingone force-pushed the refactor/message_identifier branch from 27f59fd to ae9096d Compare December 8, 2025 16:25
@chr-hertel
Copy link
Member

I was looking at the method last night and said to myself: Damn, that's ugly as hell

well, we've all been there - over and over ...

@Guikingone Guikingone force-pushed the refactor/message_identifier branch 3 times, most recently from bbe4588 to d373508 Compare December 11, 2025 08:13
@chr-hertel chr-hertel force-pushed the refactor/message_identifier branch from d373508 to a1751b7 Compare December 12, 2025 23:28
@chr-hertel
Copy link
Member

Thank you @Guikingone.

@chr-hertel chr-hertel merged commit 150db7e into symfony:main Dec 12, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working Platform Issues & PRs about the AI Platform component Status: Reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants