Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6ceb0c

Browse files
committed
meaningfully error in DeduplicateStamp if the Lock component is missing
1 parentcb08480 commitc6ceb0c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎src/Symfony/Component/Messenger/Stamp/DeduplicateStamp.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespaceSymfony\Component\Messenger\Stamp;
1313

1414
useSymfony\Component\Lock\Key;
15+
useSymfony\Component\Messenger\Exception\LogicException;
1516

1617
finalclass DeduplicateStampimplements StampInterface
1718
{
@@ -22,6 +23,10 @@ public function __construct(
2223
private ?float$ttl =300.0,
2324
privatebool$onlyDeduplicateInQueue =false,
2425
) {
26+
if (!class_exists(Key::class)) {
27+
thrownewLogicException(\sprintf('You cannot use the "%s" as the Lock component is not installed. Try running "composer require symfony/lock".',self::class));
28+
}
29+
2530
$this->key =newKey($key);
2631
}
2732

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp