Skip to content

Commit 2bbaa60

Browse files
Merge branch '5.2' into 5.3
* 5.2: Fix usage of str_contains() fix intersection types in tests
2 parents e8d2254 + db754b4 commit 2bbaa60

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Tests/Command/SetupTransportsCommandTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SetupTransportsCommandTest extends TestCase
2424
public function testReceiverNames()
2525
{
2626
// mock a service locator
27-
/** @var MockObject|ServiceLocator $serviceLocator */
27+
/** @var MockObject&ServiceLocator $serviceLocator */
2828
$serviceLocator = $this->createMock(ServiceLocator::class);
2929
// get method must be call twice and will return consecutively a setup-able transport and a non setup-able transport
3030
$serviceLocator->expects($this->exactly(2))
@@ -49,7 +49,7 @@ public function testReceiverNames()
4949
public function testReceiverNameArgument()
5050
{
5151
// mock a service locator
52-
/** @var MockObject|ServiceLocator $serviceLocator */
52+
/** @var MockObject&ServiceLocator $serviceLocator */
5353
$serviceLocator = $this->createMock(ServiceLocator::class);
5454
// get method must be call twice and will return consecutively a setup-able transport and a non setup-able transport
5555
$serviceLocator->expects($this->exactly(1))
@@ -74,7 +74,7 @@ public function testReceiverNameArgumentNotFound()
7474
$this->expectException(\RuntimeException::class);
7575
$this->expectExceptionMessage('The "not_found" transport does not exist.');
7676
// mock a service locator
77-
/** @var MockObject|ServiceLocator $serviceLocator */
77+
/** @var MockObject&ServiceLocator $serviceLocator */
7878
$serviceLocator = $this->createMock(ServiceLocator::class);
7979
// get method must be call twice and will return consecutively a setup-able transport and a non setup-able transport
8080
$serviceLocator->expects($this->exactly(0))

Transport/Serialization/PhpSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function decode(array $encodedEnvelope): Envelope
2929
throw new MessageDecodingFailedException('Encoded envelope should have at least a "body".');
3030
}
3131

32-
if (!str_contains($encodedEnvelope['body'], '}', -1)) {
32+
if (str_ends_with($encodedEnvelope['body'], '}')) {
3333
$encodedEnvelope['body'] = base64_decode($encodedEnvelope['body']);
3434
}
3535

0 commit comments

Comments
 (0)