Skip to content

Commit 5669c38

Browse files
bug #52874 [Scheduler] Separate id and description in message providers (valtzu)
This PR was squashed before being merged into the 6.4 branch. Discussion ---------- [Scheduler] Separate id and description in message providers | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix #52853 | License | MIT Separate id and description in message providers to keep `debug:schedule` output clean while allowing arbitrary distinct id. Commits ------- d73bf83992 [Scheduler] Separate id and description in message providers
2 parents c26a221 + 60512ff commit 5669c38

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Tests/Fixtures/Messenger/DummyTask.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@
99
#[AsCronTask(expression: '0 * * * *', timezone: 'Europe/Berlin', arguments: ['2'], schedule: 'dummy_task', method: 'method2')]
1010
#[AsPeriodicTask(frequency: 5, arguments: [3], schedule: 'dummy_task')]
1111
#[AsPeriodicTask(frequency: '1 day', from: '2023-10-25 09:59:00Z', jitter: 60, arguments: ['4'], schedule: 'dummy_task', method: 'method4')]
12+
#[AsPeriodicTask(frequency: '1 day', from: '2023-10-25 09:59:00Z', arguments: ['9'], schedule: 'dummy_task', method: 'method5')]
13+
#[AsPeriodicTask(frequency: '1 day', from: '2023-10-25 09:59:00Z', arguments: ['9b'], schedule: 'dummy_task', method: 'method5')]
14+
#[AsPeriodicTask(frequency: '1 day', from: '2023-10-25 09:59:00Z', arguments: ['named' => '9'], schedule: 'dummy_task', method: 'method5')]
1215
class DummyTask
1316
{
1417
public static array $calls = [];

Tests/Functional/SchedulerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ public function testAutoconfiguredScheduler()
8484
$this->assertCount(779, $calls['__invoke']);
8585
$this->assertSame([['2']], $calls['method2']);
8686
$this->assertSame([['4']], $calls['method4']);
87+
$this->assertSame([['9'], ['9b'], ['named' => '9']], $calls['method5']);
8788
$this->assertSame([['5', 6], ['7', 8]], $calls['attributesOnMethod']);
8889
}
8990

0 commit comments

Comments
 (0)