Skip to content

Commit 890cfa2

Browse files
Remove code features unsupported by older versions of PHP LRN-43664
1 parent 078eb0d commit 890cfa2

File tree

4 files changed

+25
-6
lines changed

4 files changed

+25
-6
lines changed

src/Services/PreHashStringFactory.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ class PreHashStringFactory
1313
LegacyPreHashString::class,
1414
];
1515

16-
protected array $validServices;
16+
/**
17+
* @var array
18+
*/
19+
protected /* array */ $validServices;
1720

1821
public function __construct()
1922
{

src/Services/PreHashStrings/LegacyPreHashString.php

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,11 +94,15 @@ class LegacyPreHashString implements PreHashStringInterface
9494
'domain',
9595
];
9696

97-
/** Service name to generate a pre-hash string for */
98-
protected string $service;
97+
/** Service name to generate a pre-hash string for
98+
* @var string
99+
*/
100+
protected /* string */ $service;
99101

100-
/** V1-compat strings need the secret to be part of the pre-hash string */
101-
protected bool $v1Compat;
102+
/** V1-compat strings need the secret to be part of the pre-hash string
103+
* @var bool
104+
*/
105+
protected /* bool */ $v1Compat;
102106

103107
public function __construct(string $service, bool $v1Compat = false)
104108
{

tests/Request/InitTest.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,9 @@ public function testNullRequestPacketAndActionGeneratesValidInit()
153153
$this->assertInstanceOf(Init::class, $initObject);
154154
}
155155

156+
/**
157+
* @requires PHPUnit >= 9.6
158+
*/
156159
public function testMetaWithTelemetryOnlyAddsSdkProp()
157160
{
158161
list($service, $security, $secret, $request, $action) = ParamsFixture::getWorkingQuestionsApiParams();
@@ -170,6 +173,9 @@ public function testMetaWithTelemetryOnlyAddsSdkProp()
170173
$this->assertEquals(1, count((array) $generatedObject->meta));
171174
}
172175

176+
/**
177+
* @requires PHPUnit >= 9.6
178+
*/
173179
public function testRequestWithTelemetryPreservesOtherMetaProps()
174180
{
175181
list($service, $security, $secret, $request, $action) = ParamsFixture::getWorkingQuestionsApiParams();
@@ -195,6 +201,9 @@ public function testRequestWithTelemetryPreservesOtherMetaProps()
195201
$this->assertObjectHasProperty('sdk', $generatedObject->meta);
196202
}
197203

204+
/**
205+
* @requires PHPUnit >= 9.6
206+
*/
198207
public function testRequestWithoutTelemetryPreservesEmptyMeta()
199208
{
200209
// We disable telemetry to be able to reliably test signature generation. Added telemetry
@@ -210,6 +219,9 @@ public function testRequestWithoutTelemetryPreservesEmptyMeta()
210219
$this->assertObjectNotHasProperty('meta', $generatedObject);
211220
}
212221

222+
/**
223+
* @requires PHPUnit >= 9.6
224+
*/
213225
public function testRequestWithoutTelemetryPreservesFilledMeta()
214226
{
215227
// We disable telemetry to be able to reliably test signature generation. Added telemetry

tests/Services/LegacySignaturesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
class LegacySignaturesTest extends AbstractTestCase
1313
{
14-
private SignatureFactory $signatureFactory;
14+
private $signatureFactory;
1515

1616
public function setUp(): void
1717
{

0 commit comments

Comments
 (0)