Skip to content

Described DeduplicateStamp#3317

Open
mnocon wants to merge 2 commits into
5.0from
dedupllicate-stamp
Open

Described DeduplicateStamp#3317
mnocon wants to merge 2 commits into
5.0from
dedupllicate-stamp

Conversation

@mnocon

@mnocon mnocon commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Target: 5.0, 4.6, 6.0

Some minor changes for 4.6 will be needed (adjusting the version)

In 6.0 Deduplicate stamp is removed, so the whole section can be removed.

The deprecation is mentioned in #3279 already

@github-actions

Copy link
Copy Markdown

Preview of modified files

Preview of modified Markdown:

@github-actions

github-actions Bot commented Jul 23, 2026

Copy link
Copy Markdown

Summary

Status Count
🔍 Total 763527
🔗 Unique 15046
✅ Successful 6331
⏳ Timeouts 0
🔀 Redirected 0
👻 Excluded 757196
❓ Unknown 0
🚫 Errors 0
⛔ Unsupported 0

Full Github Actions output

@mnocon
mnocon marked this pull request as ready for review July 23, 2026 14:03
@github-actions

Copy link
Copy Markdown

code_samples/ change report

Before (on target branch)After (in current PR)

code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php


code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php

docs/infrastructure_and_maintenance/background_tasks.md@99:``` php
docs/infrastructure_and_maintenance/background_tasks.md@100:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 1, 3) =]]
docs/infrastructure_and_maintenance/background_tasks.md@101:
docs/infrastructure_and_maintenance/background_tasks.md@102:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 8, 13) =]]
docs/infrastructure_and_maintenance/background_tasks.md@103:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 15, 20) =]]
docs/infrastructure_and_maintenance/background_tasks.md@104:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 25, 26) =]]
docs/infrastructure_and_maintenance/background_tasks.md@105:```
docs/infrastructure_and_maintenance/background_tasks.md@109:``` php
docs/infrastructure_and_maintenance/background_tasks.md@110:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 1, 3) =]]
docs/infrastructure_and_maintenance/background_tasks.md@111:
docs/infrastructure_and_maintenance/background_tasks.md@112:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 9, 14) =]]
docs/infrastructure_and_maintenance/background_tasks.md@113:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 16, 21) =]]
docs/infrastructure_and_maintenance/background_tasks.md@114:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 29, 30) =]]
docs/infrastructure_and_maintenance/background_tasks.md@115:```

001⫶<?php declare(strict_types=1);
002⫶
003⫶namespace App\Dispatcher;
004⫶
005⫶use Symfony\Component\Messenger\MessageBusInterface;
006⫶
007⫶final readonly class SomeClassThatSchedulesExecutionInTheBackground
008⫶{
009⫶ public function __construct(
010⫶ private MessageBusInterface $bus,
011⫶ ) {
012⫶ }
013⫶
014⫶ public function schedule(object $message): void
015⫶ {
016⫶ $this->bus->dispatch($message);
017⫶ }
018⫶}


001⫶<?php declare(strict_types=1);
002⫶
003⫶namespace App\Dispatcher;
004⫶
005⫶use Symfony\Component\Messenger\MessageBusInterface;
006⫶
007⫶final readonly class SomeClassThatSchedulesExecutionInTheBackground
008⫶{
009⫶ public function __construct(
010⫶ private MessageBusInterface $bus,
011⫶ ) {
012⫶ }
013⫶
014⫶ public function schedule(object $message): void
015⫶ {
016⫶ $this->bus->dispatch($message);
017⫶ }
018⫶}

docs/infrastructure_and_maintenance/background_tasks.md@131:``` php
docs/infrastructure_and_maintenance/background_tasks.md@132:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 6, 6, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@133:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 8, 9, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@134:
docs/infrastructure_and_maintenance/background_tasks.md@135:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 24, 24, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@136:```
docs/infrastructure_and_maintenance/background_tasks.md@144:``` php
docs/infrastructure_and_maintenance/background_tasks.md@145:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 6, 6, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@146:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 9, 9, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@147:
docs/infrastructure_and_maintenance/background_tasks.md@148:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 27, 28, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@149:```

001⫶use Ibexa\Contracts\Messenger\Stamp\DeduplicateStamp;
002⫶use Symfony\Component\Messenger\MessageBusInterface;
003⫶
004⫶$deduplicationKey = 'my_message.project.<key_based_on_message>';
005⫶$this->bus->dispatch($message, [new DeduplicateStamp($deduplicationKey)]);

docs/infrastructure_and_maintenance/background_tasks.md@164:``` php
docs/infrastructure_and_maintenance/background_tasks.md@165:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 7, 7, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@166:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 9, 10, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@167:
docs/infrastructure_and_maintenance/background_tasks.md@168:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 25, 25, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@169:```

001⫶use Ibexa\Contracts\Messenger\Stamp\SudoStamp;
002⫶use Symfony\Component\Messenger\MessageBusInterface;
003⫶
004⫶
005⫶$this->bus->dispatch($message, [new SudoStamp()]);


001⫶use Ibexa\Contracts\Messenger\Stamp\SudoStamp;
002⫶use Symfony\Component\Messenger\MessageBusInterface;
003⫶
004⫶
005⫶$this->bus->dispatch($message, [new SudoStamp()]);

docs/infrastructure_and_maintenance/background_tasks.md@148:``` php
docs/infrastructure_and_maintenance/background_tasks.md@149:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 5, 5, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@150:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 7, 9, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@151:
docs/infrastructure_and_maintenance/background_tasks.md@152:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 22, 23, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@153:```
docs/infrastructure_and_maintenance/background_tasks.md@181:``` php
docs/infrastructure_and_maintenance/background_tasks.md@182:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 5, 5, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@183:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 8, 10, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@184:
docs/infrastructure_and_maintenance/background_tasks.md@185:[[= include_code('code_samples/background_tasks/src/Dispatcher/SomeClassThatSchedulesExecutionInTheBackground.php', 23, 24, remove_indent=True) =]]
docs/infrastructure_and_maintenance/background_tasks.md@186:```

001⫶use Ibexa\Contracts\Core\Repository\PermissionResolver;
002⫶use Ibexa\Contracts\Messenger\Stamp\UserPermissionStamp;
003⫶use Symfony\Component\Messenger\MessageBusInterface;
004⫶
005⫶
006⫶$currentUserId = $this->permissionResolver->getCurrentUserReference()->getUserId();
007⫶$this->bus->dispatch($message, [new UserPermissionStamp($currentUserId)]);


001⫶use Ibexa\Contracts\Core\Repository\PermissionResolver;
002⫶use Ibexa\Contracts\Messenger\Stamp\UserPermissionStamp;
003⫶use Symfony\Component\Messenger\MessageBusInterface;
004⫶
005⫶
006⫶$currentUserId = $this->permissionResolver->getCurrentUserReference()->getUserId();
007⫶$this->bus->dispatch($message, [new UserPermissionStamp($currentUserId)]);

Download colorized diff

@mnocon
mnocon requested a review from bnowak July 23, 2026 14:05

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is not entirely true. Our ibexa.messenger.bus supports only default middleware/stamps with basic functionality of messenger + our implemented middlewares/stamps. What it supports is explicitly configured by us, and below is the current list:

shortly, I wouldn't mention that we support (all) stamps available in Symfony because it's not true. All supported Symfony stamps are the most basic ones, which deliver only basic messenger functionality.

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.

2 participants