Skip to content

Commit 2eef8d2

Browse files
HUG-soclozAymDev
authored andcommitted
FIX sessionID attribute case format
1 parent e0fa2cf commit 2eef8d2

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/Messenger/Stamp/AzureBrokerPropertiesStamp.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class AzureBrokerPropertiesStamp implements StampInterface
2121
private $correlationId;
2222

2323
/** @var string|null */
24-
private $sessionID;
24+
private $sessionId;
2525

2626
/** @var int|null */
2727
private $deliveryCount;
@@ -65,7 +65,7 @@ class AzureBrokerPropertiesStamp implements StampInterface
6565
public function __construct(
6666
?string $contentType = null,
6767
?string $correlationId = null,
68-
?string $sessionID = null,
68+
?string $sessionId = null,
6969
?int $deliveryCount = null,
7070
?\DateTimeInterface $lockedUntilUtc = null,
7171
?string $lockToken = null,
@@ -82,7 +82,7 @@ public function __construct(
8282
) {
8383
$this->contentType = $contentType;
8484
$this->correlationId = $correlationId;
85-
$this->sessionID = $sessionID;
85+
$this->sessionId = $sessionId;
8686
$this->deliveryCount = $deliveryCount;
8787
$this->lockedUntilUtc = $lockedUntilUtc;
8888
$this->lockToken = $lockToken;
@@ -112,7 +112,7 @@ public static function createFromResponse(ResponseInterface $response): self
112112
* @var null|array{
113113
* ContentType?: string,
114114
* CorrelationId?: string,
115-
* SessionID?: string,
115+
* SessionId?: string,
116116
* DeliveryCount?: int,
117117
* LockedUntilUtc?: string,
118118
* LockToken?: string,
@@ -152,7 +152,7 @@ public static function createFromResponse(ResponseInterface $response): self
152152
return new self(
153153
$properties['ContentType'] ?? null,
154154
$properties['CorrelationId'] ?? null,
155-
$properties['SessionID'] ?? null,
155+
$properties['SessionId'] ?? null,
156156
$properties['DeliveryCount'] ?? null,
157157
$lockedUntilUtc,
158158
$properties['LockToken'] ?? null,
@@ -179,7 +179,7 @@ public function encode(): string
179179
$properties = [
180180
'ContentType' => $this->contentType,
181181
'CorrelationId' => $this->correlationId,
182-
'SessionID' => $this->sessionID,
182+
'SessionId' => $this->sessionId,
183183
'DeliveryCount' => $this->deliveryCount,
184184
'LockedUntilUtc' => $this->lockedUntilUtc !== null
185185
? $this->lockedUntilUtc->format('Y-m-d H:i:s')
@@ -230,14 +230,14 @@ public function setCorrelationId(?string $correlationId): self
230230
return $this;
231231
}
232232

233-
public function getSessionID(): ?string
233+
public function getSessionId(): ?string
234234
{
235-
return $this->sessionID;
235+
return $this->sessionId;
236236
}
237237

238-
public function setSessionID(?string $sessionID): self
238+
public function setSessionId(?string $sessionId): self
239239
{
240-
$this->sessionID = $sessionID;
240+
$this->sessionId = $sessionId;
241241
return $this;
242242
}
243243

tests/Messenger/Stamp/AzureBrokerPropertiesStampTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public function testCreateFromResponseWithMissingProperties(MockResponse $mockRe
2424

2525
self::assertNull($stamp->getContentType());
2626
self::assertNull($stamp->getCorrelationId());
27-
self::assertNull($stamp->getSessionID());
27+
self::assertNull($stamp->getSessionId());
2828
self::assertNull($stamp->getDeliveryCount());
2929
self::assertNull($stamp->getLockedUntilUtc());
3030
self::assertNull($stamp->getLockToken());
@@ -62,7 +62,7 @@ public function provideMissingBrokerPropertiesResponses(): array
6262
'BrokerProperties' => json_encode([
6363
'ContentType' => null,
6464
'CorrelationId' => null,
65-
'SessionID' => null,
65+
'SessionId' => null,
6666
'DeliveryCount' => null,
6767
'LockedUntilUtc' => null,
6868
'LockToken' => null,
@@ -90,7 +90,7 @@ public function testCreateFromResponse(): void
9090
{
9191
$contentType = 'test-content-type';
9292
$correlationId = 'test-correlation-id';
93-
$sessionID = 'test-session-id';
93+
$sessionId = 'test-session-id';
9494
$deliveryCount = 1;
9595
$lockedUntilUtc = '1970-01-01 00:00:00';
9696
$lockToken = 'test-lock-token';
@@ -111,7 +111,7 @@ public function testCreateFromResponse(): void
111111
'BrokerProperties' => json_encode([
112112
'ContentType' => $contentType,
113113
'CorrelationId' => $correlationId,
114-
'SessionID' => $sessionID,
114+
'SessionId' => $sessionId,
115115
'DeliveryCount' => $deliveryCount,
116116
'LockedUntilUtc' => $lockedUntilUtc,
117117
'LockToken' => $lockToken,
@@ -136,7 +136,7 @@ public function testCreateFromResponse(): void
136136

137137
self::assertSame($contentType, $stamp->getContentType());
138138
self::assertSame($correlationId, $stamp->getCorrelationId());
139-
self::assertSame($sessionID, $stamp->getSessionID());
139+
self::assertSame($sessionId, $stamp->getSessionId());
140140
self::assertSame($deliveryCount, $stamp->getDeliveryCount());
141141

142142
self::assertInstanceOf(\DateTimeInterface::class, $stamp->getLockedUntilUtc());

0 commit comments

Comments
 (0)