Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
64aac67
PHP 8.0, 8.1, PHPUnit 9 support
27pchrisl Oct 11, 2021
5963c8c
Replace key-fixture in CloudFront-tests with generated keys
Zombaya May 17, 2022
73595b3
Additional changes to unittest for phpunit9-compatibility
Zombaya Mar 16, 2022
69e7187
Fix problems with non-fully-reset environment-variables after test
Zombaya Mar 18, 2022
22c3c77
Add changelog document
Zombaya Mar 18, 2022
3fa4d92
Small rewrites of unittests because of deprecation-warnings in phpuni…
Zombaya May 11, 2022
82715b9
Remove warnings from usage of arguments of wrong type in php 8.1
Zombaya May 11, 2022
bebfcc7
Solve failing unittest CloudFront\SignerTest::testBadPrivateKeyPath()
Zombaya Jun 7, 2022
eccd896
switch to double pipe
stobrien89 Jun 9, 2022
863a65a
Formatting fixes
Zombaya Jun 13, 2022
bce4721
Additional methods added to PHPUnitCompatibilitityTraits
Zombaya Jun 27, 2022
8f4b64e
PHP 8.0, 8.1, PHPUnit 9 support
27pchrisl Oct 11, 2021
1c4109d
Replace key-fixture in CloudFront-tests with generated keys
Zombaya May 17, 2022
7dd0db1
Additional changes to unittest for phpunit9-compatibility
Zombaya Mar 16, 2022
a129990
Fix problems with non-fully-reset environment-variables after test
Zombaya Mar 18, 2022
22374fc
Add changelog document
Zombaya Mar 18, 2022
991312f
Small rewrites of unittests because of deprecation-warnings in phpuni…
Zombaya May 11, 2022
a57b51f
Remove warnings from usage of arguments of wrong type in php 8.1
Zombaya May 11, 2022
f07ec26
Solve failing unittest CloudFront\SignerTest::testBadPrivateKeyPath()
Zombaya Jun 7, 2022
d6474a8
switch to double pipe
stobrien89 Jun 9, 2022
c2def67
Formatting fixes
Zombaya Jun 13, 2022
c6f3be2
Additional methods added to PHPUnitCompatibilitityTraits
Zombaya Jun 27, 2022
71f3ec5
fix conflicts/warnings
Jul 19, 2022
b7b6f7e
update tests
Jul 21, 2022
f49a0ef
refactor jsonbody getcontenttype
Jul 21, 2022
ceb60cc
add compattrait to endpointparametermiddlewaretest
Aug 4, 2022
7ce24b4
add compattrait to endpointparametermiddlewaretest
Aug 4, 2022
6d1e8aa
add update to instanceprofileprovider
Aug 4, 2022
e98701e
Merge branch 'master' into phpcompatibilityChecker
stobrien89 Aug 4, 2022
9634dfa
Replace PHPUnitCompatTrait with packages yoast/phpunit-polyfills and …
Zombaya Aug 11, 2022
661ac2f
Replace $this->expectNotToPerformAssertions() with $this->addToAssert…
Zombaya Aug 11, 2022
4c34478
Merge remote-tracking branch 'upstream/master' into phpcompatibilityC…
Zombaya Sep 2, 2022
e67a48e
fix spacing
stobrien89 Sep 12, 2022
06e01bf
Fix spacing
stobrien89 Sep 12, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Remove warnings from usage of arguments of wrong type in php 8.1
  • Loading branch information
Zombaya authored and Sean O'Brien committed Jul 18, 2022
commit a57b51f860cd9079e195d220f88864a6d79882c9
2 changes: 1 addition & 1 deletion src/Api/Parser/AbstractRestParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ private function extractHeaders(
// Check if the headers are prefixed by a location name
$result[$name] = [];
$prefix = $shape['locationName'];
$prefixLen = strlen($prefix);
$prefixLen = $prefix !== null ? strlen($prefix) : 0;

foreach ($response->getHeaders() as $k => $values) {
if (!$prefixLen) {
Expand Down
2 changes: 1 addition & 1 deletion src/Api/Serializer/JsonBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(Service $api)
public static function getContentType(Service $service)
{
return 'application/x-amz-json-'
. number_format($service->getMetadata('jsonVersion'), 1);
. number_format(($version = $service->getMetadata('jsonVersion')) !== null ? $version : 0.0, 1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you make this multiple lines?

}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Arn/ArnParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class ArnParser
*/
public static function isArn($string)
{
return strpos($string, 'arn:') === 0;
return $string !== null && strpos($string, 'arn:') === 0;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/S3/S3Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ public function __construct(array $args)
*/
public static function isBucketDnsCompatible($bucket)
{
$bucketLen = strlen($bucket);
$bucketLen = $bucket !== null ? strlen($bucket) : 0;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This check is not necessary if we are checking for is_string above; it will never be null and always be a string, right?


return ($bucketLen >= 3 && $bucketLen <= 63) &&
// Cannot look like an IP address
Expand Down
2 changes: 1 addition & 1 deletion tests/Integ/S3Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -411,7 +411,7 @@ private static function executeWithRetries(
throw $e;
}
$attempts++;
sleep(pow(1.2, $attempts));
sleep((int) pow(1.2, $attempts));
}
}
}
Expand Down