Skip to content

Commit b461ecf

Browse files
authored
Merge pull request #518 from jsquyres/pr/geshi-php-8
Upgrades required for PHP 8
2 parents 405fec4 + ab5057e commit b461ecf

File tree

2,935 files changed

+85885
-10589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,935 files changed

+85885
-10589
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<?php
2+
namespace Aws\ACMPCA;
3+
4+
use Aws\AwsClient;
5+
6+
/**
7+
* This client is used to interact with the **AWS Certificate Manager Private Certificate Authority** service.
8+
* @method \Aws\Result createCertificateAuthority(array $args = [])
9+
* @method \GuzzleHttp\Promise\Promise createCertificateAuthorityAsync(array $args = [])
10+
* @method \Aws\Result createCertificateAuthorityAuditReport(array $args = [])
11+
* @method \GuzzleHttp\Promise\Promise createCertificateAuthorityAuditReportAsync(array $args = [])
12+
* @method \Aws\Result createPermission(array $args = [])
13+
* @method \GuzzleHttp\Promise\Promise createPermissionAsync(array $args = [])
14+
* @method \Aws\Result deleteCertificateAuthority(array $args = [])
15+
* @method \GuzzleHttp\Promise\Promise deleteCertificateAuthorityAsync(array $args = [])
16+
* @method \Aws\Result deletePermission(array $args = [])
17+
* @method \GuzzleHttp\Promise\Promise deletePermissionAsync(array $args = [])
18+
* @method \Aws\Result deletePolicy(array $args = [])
19+
* @method \GuzzleHttp\Promise\Promise deletePolicyAsync(array $args = [])
20+
* @method \Aws\Result describeCertificateAuthority(array $args = [])
21+
* @method \GuzzleHttp\Promise\Promise describeCertificateAuthorityAsync(array $args = [])
22+
* @method \Aws\Result describeCertificateAuthorityAuditReport(array $args = [])
23+
* @method \GuzzleHttp\Promise\Promise describeCertificateAuthorityAuditReportAsync(array $args = [])
24+
* @method \Aws\Result getCertificate(array $args = [])
25+
* @method \GuzzleHttp\Promise\Promise getCertificateAsync(array $args = [])
26+
* @method \Aws\Result getCertificateAuthorityCertificate(array $args = [])
27+
* @method \GuzzleHttp\Promise\Promise getCertificateAuthorityCertificateAsync(array $args = [])
28+
* @method \Aws\Result getCertificateAuthorityCsr(array $args = [])
29+
* @method \GuzzleHttp\Promise\Promise getCertificateAuthorityCsrAsync(array $args = [])
30+
* @method \Aws\Result getPolicy(array $args = [])
31+
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
32+
* @method \Aws\Result importCertificateAuthorityCertificate(array $args = [])
33+
* @method \GuzzleHttp\Promise\Promise importCertificateAuthorityCertificateAsync(array $args = [])
34+
* @method \Aws\Result issueCertificate(array $args = [])
35+
* @method \GuzzleHttp\Promise\Promise issueCertificateAsync(array $args = [])
36+
* @method \Aws\Result listCertificateAuthorities(array $args = [])
37+
* @method \GuzzleHttp\Promise\Promise listCertificateAuthoritiesAsync(array $args = [])
38+
* @method \Aws\Result listPermissions(array $args = [])
39+
* @method \GuzzleHttp\Promise\Promise listPermissionsAsync(array $args = [])
40+
* @method \Aws\Result listTags(array $args = [])
41+
* @method \GuzzleHttp\Promise\Promise listTagsAsync(array $args = [])
42+
* @method \Aws\Result putPolicy(array $args = [])
43+
* @method \GuzzleHttp\Promise\Promise putPolicyAsync(array $args = [])
44+
* @method \Aws\Result restoreCertificateAuthority(array $args = [])
45+
* @method \GuzzleHttp\Promise\Promise restoreCertificateAuthorityAsync(array $args = [])
46+
* @method \Aws\Result revokeCertificate(array $args = [])
47+
* @method \GuzzleHttp\Promise\Promise revokeCertificateAsync(array $args = [])
48+
* @method \Aws\Result tagCertificateAuthority(array $args = [])
49+
* @method \GuzzleHttp\Promise\Promise tagCertificateAuthorityAsync(array $args = [])
50+
* @method \Aws\Result untagCertificateAuthority(array $args = [])
51+
* @method \GuzzleHttp\Promise\Promise untagCertificateAuthorityAsync(array $args = [])
52+
* @method \Aws\Result updateCertificateAuthority(array $args = [])
53+
* @method \GuzzleHttp\Promise\Promise updateCertificateAuthorityAsync(array $args = [])
54+
*/
55+
class ACMPCAClient extends AwsClient {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Aws\ACMPCA\Exception;
3+
4+
use Aws\Exception\AwsException;
5+
6+
/**
7+
* Represents an error interacting with the **AWS Certificate Manager Private Certificate Authority** service.
8+
*/
9+
class ACMPCAException extends AwsException {}
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
namespace Aws\ARCZonalShift;
3+
4+
use Aws\AwsClient;
5+
6+
/**
7+
* This client is used to interact with the **AWS ARC - Zonal Shift** service.
8+
* @method \Aws\Result cancelZonalShift(array $args = [])
9+
* @method \GuzzleHttp\Promise\Promise cancelZonalShiftAsync(array $args = [])
10+
* @method \Aws\Result createPracticeRunConfiguration(array $args = [])
11+
* @method \GuzzleHttp\Promise\Promise createPracticeRunConfigurationAsync(array $args = [])
12+
* @method \Aws\Result deletePracticeRunConfiguration(array $args = [])
13+
* @method \GuzzleHttp\Promise\Promise deletePracticeRunConfigurationAsync(array $args = [])
14+
* @method \Aws\Result getAutoshiftObserverNotificationStatus(array $args = [])
15+
* @method \GuzzleHttp\Promise\Promise getAutoshiftObserverNotificationStatusAsync(array $args = [])
16+
* @method \Aws\Result getManagedResource(array $args = [])
17+
* @method \GuzzleHttp\Promise\Promise getManagedResourceAsync(array $args = [])
18+
* @method \Aws\Result listAutoshifts(array $args = [])
19+
* @method \GuzzleHttp\Promise\Promise listAutoshiftsAsync(array $args = [])
20+
* @method \Aws\Result listManagedResources(array $args = [])
21+
* @method \GuzzleHttp\Promise\Promise listManagedResourcesAsync(array $args = [])
22+
* @method \Aws\Result listZonalShifts(array $args = [])
23+
* @method \GuzzleHttp\Promise\Promise listZonalShiftsAsync(array $args = [])
24+
* @method \Aws\Result startZonalShift(array $args = [])
25+
* @method \GuzzleHttp\Promise\Promise startZonalShiftAsync(array $args = [])
26+
* @method \Aws\Result updateAutoshiftObserverNotificationStatus(array $args = [])
27+
* @method \GuzzleHttp\Promise\Promise updateAutoshiftObserverNotificationStatusAsync(array $args = [])
28+
* @method \Aws\Result updatePracticeRunConfiguration(array $args = [])
29+
* @method \GuzzleHttp\Promise\Promise updatePracticeRunConfigurationAsync(array $args = [])
30+
* @method \Aws\Result updateZonalAutoshiftConfiguration(array $args = [])
31+
* @method \GuzzleHttp\Promise\Promise updateZonalAutoshiftConfigurationAsync(array $args = [])
32+
* @method \Aws\Result updateZonalShift(array $args = [])
33+
* @method \GuzzleHttp\Promise\Promise updateZonalShiftAsync(array $args = [])
34+
*/
35+
class ARCZonalShiftClient extends AwsClient {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Aws\ARCZonalShift\Exception;
3+
4+
use Aws\Exception\AwsException;
5+
6+
/**
7+
* Represents an error interacting with the **AWS ARC - Zonal Shift** service.
8+
*/
9+
class ARCZonalShiftException extends AwsException {}
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
<?php
2+
namespace Aws;
3+
4+
use GuzzleHttp\Promise;
5+
6+
/**
7+
* A configuration provider is a function that returns a promise that is
8+
* fulfilled with a configuration object. This class provides base functionality
9+
* usable by specific configuration provider implementations
10+
*/
11+
abstract class AbstractConfigurationProvider
12+
{
13+
const ENV_PROFILE = 'AWS_PROFILE';
14+
const ENV_CONFIG_FILE = 'AWS_CONFIG_FILE';
15+
16+
public static $cacheKey;
17+
18+
protected static $interfaceClass;
19+
protected static $exceptionClass;
20+
21+
/**
22+
* Wraps a config provider and saves provided configuration in an
23+
* instance of Aws\CacheInterface. Forwards calls when no config found
24+
* in cache and updates cache with the results.
25+
*
26+
* @param callable $provider Configuration provider function to wrap
27+
* @param CacheInterface $cache Cache to store configuration
28+
* @param string|null $cacheKey (optional) Cache key to use
29+
*
30+
* @return callable
31+
*/
32+
public static function cache(
33+
callable $provider,
34+
CacheInterface $cache,
35+
$cacheKey = null
36+
) {
37+
$cacheKey = $cacheKey ?: static::$cacheKey;
38+
39+
return function () use ($provider, $cache, $cacheKey) {
40+
$found = $cache->get($cacheKey);
41+
if ($found instanceof static::$interfaceClass) {
42+
return Promise\Create::promiseFor($found);
43+
}
44+
45+
return $provider()
46+
->then(function ($config) use (
47+
$cache,
48+
$cacheKey
49+
) {
50+
$cache->set($cacheKey, $config);
51+
return $config;
52+
});
53+
};
54+
}
55+
56+
/**
57+
* Creates an aggregate configuration provider that invokes the provided
58+
* variadic providers one after the other until a provider returns
59+
* configuration.
60+
*
61+
* @return callable
62+
*/
63+
public static function chain()
64+
{
65+
$links = func_get_args();
66+
if (empty($links)) {
67+
throw new \InvalidArgumentException('No providers in chain');
68+
}
69+
70+
return function () use ($links) {
71+
/** @var callable $parent */
72+
$parent = array_shift($links);
73+
$promise = $parent();
74+
while ($next = array_shift($links)) {
75+
$promise = $promise->otherwise($next);
76+
}
77+
return $promise;
78+
};
79+
}
80+
81+
/**
82+
* Gets the environment's HOME directory if available.
83+
*
84+
* @return null|string
85+
*/
86+
protected static function getHomeDir()
87+
{
88+
// On Linux/Unix-like systems, use the HOME environment variable
89+
if ($homeDir = getenv('HOME')) {
90+
return $homeDir;
91+
}
92+
93+
// Get the HOMEDRIVE and HOMEPATH values for Windows hosts
94+
$homeDrive = getenv('HOMEDRIVE');
95+
$homePath = getenv('HOMEPATH');
96+
97+
return ($homeDrive && $homePath) ? $homeDrive . $homePath : null;
98+
}
99+
100+
/**
101+
* Gets default config file location from environment, falling back to aws
102+
* default location
103+
*
104+
* @return string
105+
*/
106+
protected static function getDefaultConfigFilename()
107+
{
108+
if ($filename = getenv(self::ENV_CONFIG_FILE)) {
109+
return $filename;
110+
}
111+
return self::getHomeDir() . '/.aws/config';
112+
}
113+
114+
/**
115+
* Wraps a config provider and caches previously provided configuration.
116+
*
117+
* @param callable $provider Config provider function to wrap.
118+
*
119+
* @return callable
120+
*/
121+
public static function memoize(callable $provider)
122+
{
123+
return function () use ($provider) {
124+
static $result;
125+
static $isConstant;
126+
127+
// Constant config will be returned constantly.
128+
if ($isConstant) {
129+
return $result;
130+
}
131+
132+
// Create the initial promise that will be used as the cached value
133+
if (null === $result) {
134+
$result = $provider();
135+
}
136+
137+
// Return config and set flag that provider is already set
138+
return $result
139+
->then(function ($config) use (&$isConstant) {
140+
$isConstant = true;
141+
return $config;
142+
});
143+
};
144+
}
145+
146+
/**
147+
* Reject promise with standardized exception.
148+
*
149+
* @param $msg
150+
* @return Promise\RejectedPromise
151+
*/
152+
protected static function reject($msg)
153+
{
154+
$exceptionClass = static::$exceptionClass;
155+
return new Promise\RejectedPromise(new $exceptionClass($msg));
156+
}
157+
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
<?php
2+
namespace Aws\AccessAnalyzer;
3+
4+
use Aws\AwsClient;
5+
6+
/**
7+
* This client is used to interact with the **Access Analyzer** service.
8+
* @method \Aws\Result applyArchiveRule(array $args = [])
9+
* @method \GuzzleHttp\Promise\Promise applyArchiveRuleAsync(array $args = [])
10+
* @method \Aws\Result cancelPolicyGeneration(array $args = [])
11+
* @method \GuzzleHttp\Promise\Promise cancelPolicyGenerationAsync(array $args = [])
12+
* @method \Aws\Result checkAccessNotGranted(array $args = [])
13+
* @method \GuzzleHttp\Promise\Promise checkAccessNotGrantedAsync(array $args = [])
14+
* @method \Aws\Result checkNoNewAccess(array $args = [])
15+
* @method \GuzzleHttp\Promise\Promise checkNoNewAccessAsync(array $args = [])
16+
* @method \Aws\Result checkNoPublicAccess(array $args = [])
17+
* @method \GuzzleHttp\Promise\Promise checkNoPublicAccessAsync(array $args = [])
18+
* @method \Aws\Result createAccessPreview(array $args = [])
19+
* @method \GuzzleHttp\Promise\Promise createAccessPreviewAsync(array $args = [])
20+
* @method \Aws\Result createAnalyzer(array $args = [])
21+
* @method \GuzzleHttp\Promise\Promise createAnalyzerAsync(array $args = [])
22+
* @method \Aws\Result createArchiveRule(array $args = [])
23+
* @method \GuzzleHttp\Promise\Promise createArchiveRuleAsync(array $args = [])
24+
* @method \Aws\Result deleteAnalyzer(array $args = [])
25+
* @method \GuzzleHttp\Promise\Promise deleteAnalyzerAsync(array $args = [])
26+
* @method \Aws\Result deleteArchiveRule(array $args = [])
27+
* @method \GuzzleHttp\Promise\Promise deleteArchiveRuleAsync(array $args = [])
28+
* @method \Aws\Result generateFindingRecommendation(array $args = [])
29+
* @method \GuzzleHttp\Promise\Promise generateFindingRecommendationAsync(array $args = [])
30+
* @method \Aws\Result getAccessPreview(array $args = [])
31+
* @method \GuzzleHttp\Promise\Promise getAccessPreviewAsync(array $args = [])
32+
* @method \Aws\Result getAnalyzedResource(array $args = [])
33+
* @method \GuzzleHttp\Promise\Promise getAnalyzedResourceAsync(array $args = [])
34+
* @method \Aws\Result getAnalyzer(array $args = [])
35+
* @method \GuzzleHttp\Promise\Promise getAnalyzerAsync(array $args = [])
36+
* @method \Aws\Result getArchiveRule(array $args = [])
37+
* @method \GuzzleHttp\Promise\Promise getArchiveRuleAsync(array $args = [])
38+
* @method \Aws\Result getFinding(array $args = [])
39+
* @method \GuzzleHttp\Promise\Promise getFindingAsync(array $args = [])
40+
* @method \Aws\Result getFindingRecommendation(array $args = [])
41+
* @method \GuzzleHttp\Promise\Promise getFindingRecommendationAsync(array $args = [])
42+
* @method \Aws\Result getFindingV2(array $args = [])
43+
* @method \GuzzleHttp\Promise\Promise getFindingV2Async(array $args = [])
44+
* @method \Aws\Result getGeneratedPolicy(array $args = [])
45+
* @method \GuzzleHttp\Promise\Promise getGeneratedPolicyAsync(array $args = [])
46+
* @method \Aws\Result listAccessPreviewFindings(array $args = [])
47+
* @method \GuzzleHttp\Promise\Promise listAccessPreviewFindingsAsync(array $args = [])
48+
* @method \Aws\Result listAccessPreviews(array $args = [])
49+
* @method \GuzzleHttp\Promise\Promise listAccessPreviewsAsync(array $args = [])
50+
* @method \Aws\Result listAnalyzedResources(array $args = [])
51+
* @method \GuzzleHttp\Promise\Promise listAnalyzedResourcesAsync(array $args = [])
52+
* @method \Aws\Result listAnalyzers(array $args = [])
53+
* @method \GuzzleHttp\Promise\Promise listAnalyzersAsync(array $args = [])
54+
* @method \Aws\Result listArchiveRules(array $args = [])
55+
* @method \GuzzleHttp\Promise\Promise listArchiveRulesAsync(array $args = [])
56+
* @method \Aws\Result listFindings(array $args = [])
57+
* @method \GuzzleHttp\Promise\Promise listFindingsAsync(array $args = [])
58+
* @method \Aws\Result listFindingsV2(array $args = [])
59+
* @method \GuzzleHttp\Promise\Promise listFindingsV2Async(array $args = [])
60+
* @method \Aws\Result listPolicyGenerations(array $args = [])
61+
* @method \GuzzleHttp\Promise\Promise listPolicyGenerationsAsync(array $args = [])
62+
* @method \Aws\Result listTagsForResource(array $args = [])
63+
* @method \GuzzleHttp\Promise\Promise listTagsForResourceAsync(array $args = [])
64+
* @method \Aws\Result startPolicyGeneration(array $args = [])
65+
* @method \GuzzleHttp\Promise\Promise startPolicyGenerationAsync(array $args = [])
66+
* @method \Aws\Result startResourceScan(array $args = [])
67+
* @method \GuzzleHttp\Promise\Promise startResourceScanAsync(array $args = [])
68+
* @method \Aws\Result tagResource(array $args = [])
69+
* @method \GuzzleHttp\Promise\Promise tagResourceAsync(array $args = [])
70+
* @method \Aws\Result untagResource(array $args = [])
71+
* @method \GuzzleHttp\Promise\Promise untagResourceAsync(array $args = [])
72+
* @method \Aws\Result updateAnalyzer(array $args = [])
73+
* @method \GuzzleHttp\Promise\Promise updateAnalyzerAsync(array $args = [])
74+
* @method \Aws\Result updateArchiveRule(array $args = [])
75+
* @method \GuzzleHttp\Promise\Promise updateArchiveRuleAsync(array $args = [])
76+
* @method \Aws\Result updateFindings(array $args = [])
77+
* @method \GuzzleHttp\Promise\Promise updateFindingsAsync(array $args = [])
78+
* @method \Aws\Result validatePolicy(array $args = [])
79+
* @method \GuzzleHttp\Promise\Promise validatePolicyAsync(array $args = [])
80+
*/
81+
class AccessAnalyzerClient extends AwsClient {}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<?php
2+
namespace Aws\AccessAnalyzer\Exception;
3+
4+
use Aws\Exception\AwsException;
5+
6+
/**
7+
* Represents an error interacting with the **Access Analyzer** service.
8+
*/
9+
class AccessAnalyzerException extends AwsException {}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?php
2+
namespace Aws\Account;
3+
4+
use Aws\AwsClient;
5+
6+
/**
7+
* This client is used to interact with the **AWS Account** service.
8+
* @method \Aws\Result acceptPrimaryEmailUpdate(array $args = [])
9+
* @method \GuzzleHttp\Promise\Promise acceptPrimaryEmailUpdateAsync(array $args = [])
10+
* @method \Aws\Result deleteAlternateContact(array $args = [])
11+
* @method \GuzzleHttp\Promise\Promise deleteAlternateContactAsync(array $args = [])
12+
* @method \Aws\Result disableRegion(array $args = [])
13+
* @method \GuzzleHttp\Promise\Promise disableRegionAsync(array $args = [])
14+
* @method \Aws\Result enableRegion(array $args = [])
15+
* @method \GuzzleHttp\Promise\Promise enableRegionAsync(array $args = [])
16+
* @method \Aws\Result getAlternateContact(array $args = [])
17+
* @method \GuzzleHttp\Promise\Promise getAlternateContactAsync(array $args = [])
18+
* @method \Aws\Result getContactInformation(array $args = [])
19+
* @method \GuzzleHttp\Promise\Promise getContactInformationAsync(array $args = [])
20+
* @method \Aws\Result getPrimaryEmail(array $args = [])
21+
* @method \GuzzleHttp\Promise\Promise getPrimaryEmailAsync(array $args = [])
22+
* @method \Aws\Result getRegionOptStatus(array $args = [])
23+
* @method \GuzzleHttp\Promise\Promise getRegionOptStatusAsync(array $args = [])
24+
* @method \Aws\Result listRegions(array $args = [])
25+
* @method \GuzzleHttp\Promise\Promise listRegionsAsync(array $args = [])
26+
* @method \Aws\Result putAlternateContact(array $args = [])
27+
* @method \GuzzleHttp\Promise\Promise putAlternateContactAsync(array $args = [])
28+
* @method \Aws\Result putContactInformation(array $args = [])
29+
* @method \GuzzleHttp\Promise\Promise putContactInformationAsync(array $args = [])
30+
* @method \Aws\Result startPrimaryEmailUpdate(array $args = [])
31+
* @method \GuzzleHttp\Promise\Promise startPrimaryEmailUpdateAsync(array $args = [])
32+
*/
33+
class AccountClient extends AwsClient {}

0 commit comments

Comments
 (0)