Skip to content

Commit 0d1b08e

Browse files
committed
-
1 parent 33b200d commit 0d1b08e

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Fixtures/Messenger/DummyTask.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
use Symfony\Component\Scheduler\Attribute\AsCronTask;
66
use Symfony\Component\Scheduler\Attribute\AsPeriodicTask;
77

8-
#[AsCronTask(expression: '* * * * *', arguments: [1], schedule: 'dummy')]
9-
#[AsCronTask(expression: '0 * * * *', timezone: 'Europe/Berlin', arguments: ['2'], schedule: 'dummy', method: 'method2')]
10-
#[AsPeriodicTask(frequency: 5, arguments: [3], schedule: 'dummy')]
11-
#[AsPeriodicTask(frequency: 'every day', from: '00:00:00', jitter: 60, arguments: ['4'], schedule: 'dummy', method: 'method4')]
8+
#[AsCronTask(expression: '* * * * *', arguments: [1], schedule: 'dummy_task')]
9+
#[AsCronTask(expression: '0 * * * *', timezone: 'Europe/Berlin', arguments: ['2'], schedule: 'dummy_task', method: 'method2')]
10+
#[AsPeriodicTask(frequency: 5, arguments: [3], schedule: 'dummy_task')]
11+
#[AsPeriodicTask(frequency: '1 day', from: '00:00:00', jitter: 60, arguments: ['4'], schedule: 'dummy_task', method: 'method4')]
1212
class DummyTask
1313
{
1414
public static array $calls = [];
1515

16-
#[AsPeriodicTask(frequency: 'every hour', from: '09:00:00', until: '17:00:00', arguments: ['b' => 6, 'a' => '5'], schedule: 'dummy')]
17-
#[AsCronTask(expression: '0 0 * * *', arguments: ['7', 8], schedule: 'dummy')]
16+
#[AsPeriodicTask(frequency: '1 hour', from: '09:00:00', until: '17:00:00', arguments: ['b' => 6, 'a' => '5'], schedule: 'dummy_task')]
17+
#[AsCronTask(expression: '0 0 * * *', arguments: ['7', 8], schedule: 'dummy_task')]
1818
public function attributesOnMethod(string $a, int $b): void
1919
{
2020
self::$calls[__FUNCTION__][] = [$a, $b];

src/Symfony/Component/Scheduler/DependencyInjection/AddScheduleMessengerPass.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ public function process(ContainerBuilder $container): void
5959

6060
$taskArguments = [
6161
'$message' => $message,
62-
] + array_filter(match ($tagAttributes['trigger'] ?? throw new InvalidArgumentException("Tag 'scheduler.task' is missing attribute 'trigger' on service $serviceId.")) {
62+
] + array_filter(match ($tagAttributes['trigger'] ?? throw new InvalidArgumentException(sprintf('Tag "scheduler.task" is missing attribute "trigger" on service "%s".', $serviceId))) {
6363
'every' => [
64-
'$frequency' => $tagAttributes['frequency'] ?? throw new InvalidArgumentException("Tag 'scheduler.task' is missing attribute 'frequency' on service $serviceId."),
64+
'$frequency' => $tagAttributes['frequency'] ?? throw new InvalidArgumentException(sprintf('Tag "scheduler.task" is missing attribute "frequency" on service "%s".', $serviceId)),
6565
'$from' => $tagAttributes['from'] ?? null,
6666
'$until' => $tagAttributes['until'] ?? null,
6767
],
6868
'cron' => [
69-
'$expression' => $tagAttributes['expression'] ?? throw new InvalidArgumentException("Tag 'scheduler.task' is missing attribute 'expression' on service $serviceId."),
69+
'$expression' => $tagAttributes['expression'] ?? throw new InvalidArgumentException(sprintf('Tag "scheduler.task" is missing attribute "expression" on service "%s".', $serviceId)),
7070
'$timezone' => $tagAttributes['timezone'] ?? null,
7171
],
7272
}, fn ($value) => null !== $value);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy