Skip to content

Conversation

@Orkin
Copy link
Contributor

@Orkin Orkin commented Dec 17, 2025

Q A
Branch? 7.4
Bug fix? yes
New feature? no
Deprecations? no
Issues Fix #...
License MIT

During compilation, messages that must be signed are correctly discovered from handler configuration.
However, MessengerPass was additionally filtering those messages using Messenger routing configuration via array_intersect_key.

This behavior may rely on an intended coupling between routing and message signing (@nicolas-grekas ?), but routing configuration can contain wildcard patterns (e.g. Some\Command\*) that do not correspond to concrete message class names.
As a result, valid messages could be incorrectly excluded from the signing process.

This change removes the dependency on Messenger routing when determining which messages should be signed.
Message signing now relies solely on messages discovered at compile time, which is the only accurate source.

@carsonbot carsonbot added this to the 7.4 milestone Dec 17, 2025
@Orkin Orkin force-pushed the fix/messenger-message-signature branch from 66ad353 to c3b6d3f Compare December 17, 2025 22:31

$container->getDefinition('messenger.signing_serializer')
->replaceArgument(2, $messageToSerializersMapping);
$container->setParameter('messenger.message_to_serializers_mapping', $messageToSerializersMapping);
Copy link
Member

Choose a reason for hiding this comment

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

why add this parameter? It's not needed for the fix isn't it?
better remove it IMHO

@Orkin Orkin force-pushed the fix/messenger-message-signature branch from c3b6d3f to ba73154 Compare December 18, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants