v2.1.8
This commit is contained in:
parent
658eb9b4da
commit
476389b914
93 changed files with 1864 additions and 305 deletions
|
|
@ -1,5 +1,26 @@
|
|||
== Changelog ==
|
||||
|
||||
= 2.1.8 =
|
||||
|
||||
_Release date: 2026-08-24_
|
||||
|
||||
**Changed**
|
||||
|
||||
* Added the `Update URI` header pointing to https://www.robotstxt.software/plugins/robotstxt-smtp-amazonses/ so WordPress never offers conflicting updates from other channels (takes effect on WordPress 5.8+); updates continue to be delivered exclusively through the Manager (by ROBOTSTXT) plugin.
|
||||
* Updated bundled AWS SDK for PHP to 3.393.4 (now shipping Guzzle 8.1.0).
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 5.7 - 7.1
|
||||
* PHP: 8.2 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP_CodeSniffer: 3.13.6
|
||||
* WordPress Coding Standards: 3.4.1
|
||||
* PHPCompatibility: 9.3.5
|
||||
* PHPStan: 2.2.9
|
||||
|
||||
= 2.1.7 =
|
||||
|
||||
_Release date: 2026-08-17_
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,9 +1,9 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: SMTP Amazon SES (by ROBOTSTXT) 2.1.7\n"
|
||||
"Project-Id-Version: SMTP Amazon SES (by ROBOTSTXT) 2.1.8\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/robotstxt-smtp-"
|
||||
"amazonses\n"
|
||||
"POT-Creation-Date: 2026-08-17T20:18:50+00:00\n"
|
||||
"POT-Creation-Date: 2026-08-24T12:46:43+00:00\n"
|
||||
"PO-Revision-Date: 2026-08-17 19:30+0000\n"
|
||||
"Last-Translator: ROBOTSTXT <robotstxt@robotstxt.es>\n"
|
||||
"Language-Team: Catalan\n"
|
||||
|
|
@ -357,7 +357,7 @@ msgstr "L'ID de clau d'accés d'Amazon SES s'ha eliminat."
|
|||
msgid "The Amazon SES Secret Access Key has been cleared."
|
||||
msgstr "La clau d'accés secreta d'Amazon SES s'ha eliminat."
|
||||
|
||||
#: robotstxt-smtp-amazonses.php:83
|
||||
#: robotstxt-smtp-amazonses.php:84
|
||||
msgid ""
|
||||
"SMTP Amazon SES (by ROBOTSTXT) requires the SMTP (by ROBOTSTXT) plugin to be "
|
||||
"installed and active."
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1,9 +1,9 @@
|
|||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: SMTP Amazon SES (by ROBOTSTXT) 2.1.7\n"
|
||||
"Project-Id-Version: SMTP Amazon SES (by ROBOTSTXT) 2.1.8\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/robotstxt-smtp-"
|
||||
"amazonses\n"
|
||||
"POT-Creation-Date: 2026-08-17T20:18:50+00:00\n"
|
||||
"POT-Creation-Date: 2026-08-24T12:46:43+00:00\n"
|
||||
"PO-Revision-Date: 2026-08-17 19:30+0000\n"
|
||||
"Last-Translator: ROBOTSTXT <robotstxt@robotstxt.es>\n"
|
||||
"Language-Team: Spanish\n"
|
||||
|
|
@ -356,7 +356,7 @@ msgstr "El ID de clave de acceso de Amazon SES se ha eliminado."
|
|||
msgid "The Amazon SES Secret Access Key has been cleared."
|
||||
msgstr "La clave de acceso secreta de Amazon SES se ha eliminado."
|
||||
|
||||
#: robotstxt-smtp-amazonses.php:83
|
||||
#: robotstxt-smtp-amazonses.php:84
|
||||
msgid ""
|
||||
"SMTP Amazon SES (by ROBOTSTXT) requires the SMTP (by ROBOTSTXT) plugin to be "
|
||||
"installed and active."
|
||||
|
|
|
|||
|
|
@ -2,14 +2,14 @@
|
|||
# This file is distributed under the GPL-3.0-or-later.
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: SMTP Amazon SES (by ROBOTSTXT) 2.1.7\n"
|
||||
"Project-Id-Version: SMTP Amazon SES (by ROBOTSTXT) 2.1.8\n"
|
||||
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/robotstxt-smtp-amazonses\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"POT-Creation-Date: 2026-08-17T20:18:50+00:00\n"
|
||||
"POT-Creation-Date: 2026-08-24T12:46:43+00:00\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"X-Generator: WP-CLI 2.12.0\n"
|
||||
"X-Domain: robotstxt-smtp-amazonses\n"
|
||||
|
|
@ -339,6 +339,6 @@ msgstr ""
|
|||
msgid "The Amazon SES Secret Access Key has been cleared."
|
||||
msgstr ""
|
||||
|
||||
#: robotstxt-smtp-amazonses.php:83
|
||||
#: robotstxt-smtp-amazonses.php:84
|
||||
msgid "SMTP Amazon SES (by ROBOTSTXT) requires the SMTP (by ROBOTSTXT) plugin to be installed and active."
|
||||
msgstr ""
|
||||
|
|
|
|||
50
readme.txt
50
readme.txt
|
|
@ -3,9 +3,9 @@ Contributors: robotstxt, javiercasares
|
|||
Tags: amazon-ses, smtp, email, mail
|
||||
Requires at least: 5.7
|
||||
Tested up to: 7.1
|
||||
Stable tag: 2.1.7
|
||||
Stable tag: 2.1.8
|
||||
Requires PHP: 8.2
|
||||
Version: 2.1.7
|
||||
Version: 2.1.8
|
||||
License: GPL-3.0-or-later
|
||||
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
||||
|
||||
|
|
@ -57,6 +57,27 @@ Updates are delivered through the **Manager (by ROBOTSTXT)** plugin. The main SM
|
|||
|
||||
Only the 3 last versions. The full changelog will be at changelog.txt
|
||||
|
||||
= 2.1.8 =
|
||||
|
||||
_Release date: 2026-08-24_
|
||||
|
||||
**Changed**
|
||||
|
||||
* Added the `Update URI` header pointing to https://www.robotstxt.software/plugins/robotstxt-smtp-amazonses/ so WordPress never offers conflicting updates from other channels (takes effect on WordPress 5.8+); updates continue to be delivered exclusively through the Manager (by ROBOTSTXT) plugin.
|
||||
* Updated bundled AWS SDK for PHP to 3.393.4 (now shipping Guzzle 8.1.0).
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 5.7 - 7.1
|
||||
* PHP: 8.2 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP_CodeSniffer: 3.13.6
|
||||
* WordPress Coding Standards: 3.4.1
|
||||
* PHPCompatibility: 9.3.5
|
||||
* PHPStan: 2.2.9
|
||||
|
||||
= 2.1.7 =
|
||||
|
||||
_Release date: 2026-08-17_
|
||||
|
|
@ -100,31 +121,6 @@ _Release date: 2026-06-09_
|
|||
* PHPCompatibility: 9.3.5
|
||||
* PHPStan: 2.2.2
|
||||
|
||||
= 2.1.5 =
|
||||
|
||||
_Release date: 2026-06-09_
|
||||
|
||||
**Added**
|
||||
|
||||
* Runtime check at initialization: if the parent SMTP (by ROBOTSTXT) plugin is missing or inactive, the plugin skips initialization and displays an admin notice instead of producing a fatal error.
|
||||
|
||||
**Fixed**
|
||||
|
||||
* Credentials never saving on first entry: credential validation now only blocks saving for definitive authentication failures. All other AWS errors allow saving.
|
||||
* Reply-to email field cannot be cleared: submitting an empty value now explicitly removes the stored address.
|
||||
|
||||
**Compatibility**
|
||||
|
||||
* WordPress: 5.7 - 7.1
|
||||
* PHP: 8.2 - 8.5
|
||||
|
||||
**Tests**
|
||||
|
||||
* PHP_CodeSniffer: 3.13.5
|
||||
* WordPress Coding Standards: 3.3.0
|
||||
* PHPCompatibility: 9.3.5
|
||||
* PHPStan: 2.2.2
|
||||
|
||||
= Previous versions =
|
||||
|
||||
If you want to see the full changelog, visit the [changelog](https://www.robotstxt.software/plugins/robotstxt-smtp-amazonses/) page.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,8 @@
|
|||
* Plugin Name: SMTP Amazon SES (by ROBOTSTXT)
|
||||
* Plugin URI: https://www.robotstxt.software/plugins/robotstxt-smtp-amazonses/
|
||||
* Description: Adds Amazon SES configuration support to the ROBOTSTXT SMTP plugin.
|
||||
* Version: 2.1.7
|
||||
* Update URI: https://www.robotstxt.software/plugins/robotstxt-smtp-amazonses/
|
||||
* Version: 2.1.8
|
||||
* Requires at least: 5.7
|
||||
* Requires PHP: 8.2
|
||||
* Network: true
|
||||
|
|
@ -24,7 +25,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
}
|
||||
|
||||
if ( ! defined( 'ROBOTSTXT_SMTP_AMAZONSES_VERSION' ) ) {
|
||||
define( 'ROBOTSTXT_SMTP_AMAZONSES_VERSION', '2.1.7' );
|
||||
define( 'ROBOTSTXT_SMTP_AMAZONSES_VERSION', '2.1.8' );
|
||||
}
|
||||
|
||||
if ( ! defined( 'ROBOTSTXT_SMTP_AMAZONSES_FILE' ) ) {
|
||||
|
|
|
|||
28
update.json
28
update.json
|
|
@ -1,28 +0,0 @@
|
|||
{
|
||||
"name": "SMTP (by ROBOTSTXT) Amazon SES",
|
||||
"slug": "robotstxt-smtp-amazonses",
|
||||
"version": "2.1.7",
|
||||
"download_url": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-amazonses/releases/download/2.1.7/robotstxt-smtp-amazonses-2.1.7.zip",
|
||||
"requires": "5.7",
|
||||
"requires_php": "8.2",
|
||||
"tested": "7.1",
|
||||
"last_updated": "2026-06-09",
|
||||
"author": "ROBOTSTXT",
|
||||
"author_profile": "https://www.robotstxt.es/",
|
||||
"homepage": "https://git.robotstxt.es/ROBOTSTXT/robotstxt-smtp-amazonses",
|
||||
"requires_plugins": ["robotstxt-smtp"],
|
||||
"description": "Adds Amazon SES (Simple Email Service) configuration support to the ROBOTSTXT SMTP plugin. Integrates seamlessly with AWS SDK for PHP to send emails through Amazon SES infrastructure.",
|
||||
"changelog": "",
|
||||
"sections": {
|
||||
"description": "Adds Amazon SES (Simple Email Service) configuration support to the ROBOTSTXT SMTP plugin. Integrates seamlessly with AWS SDK for PHP to send emails through Amazon SES infrastructure.",
|
||||
"changelog": ""
|
||||
},
|
||||
"banners": {
|
||||
"low": "",
|
||||
"high": ""
|
||||
},
|
||||
"icons": {
|
||||
"1x": "",
|
||||
"2x": ""
|
||||
}
|
||||
}
|
||||
7
vendor/aws/aws-sdk-php/src/AwsClient.php
vendored
7
vendor/aws/aws-sdk-php/src/AwsClient.php
vendored
|
|
@ -204,6 +204,13 @@ class AwsClient implements AwsClientInterface
|
|||
* signature version to use with a service (e.g., v4). Note that
|
||||
* per/operation signature version MAY override this requested signature
|
||||
* version.
|
||||
* - transport_sharing: (string) Set to a transport sharing mode ("none",
|
||||
* "handler_prefer", "handler_require", "persistent_prefer", or
|
||||
* "persistent_require") to enable connection sharing on the default
|
||||
* HTTP handler. The "*_prefer" modes degrade gracefully when the
|
||||
* installed version of Guzzle or the runtime cannot honor them, and
|
||||
* the "*_require" modes throw. This option only applies when the SDK
|
||||
* creates the default HTTP handler.
|
||||
* - use_aws_shared_config_files: (bool, default=bool(true)) Set to false to
|
||||
* disable checking for shared config file in '~/.aws/config' and
|
||||
* '~/.aws/credentials'. This will override the AWS_CONFIG_FILE
|
||||
|
|
|
|||
24
vendor/aws/aws-sdk-php/src/ClientResolver.php
vendored
24
vendor/aws/aws-sdk-php/src/ClientResolver.php
vendored
|
|
@ -30,6 +30,7 @@ use Aws\EndpointV2\EndpointDefinitionProvider;
|
|||
use Aws\EndpointV2\EndpointProviderV2;
|
||||
use Aws\Exception\AwsException;
|
||||
use Aws\Exception\InvalidRegionException;
|
||||
use Aws\Handler\HttpTransportSharing;
|
||||
use Aws\Retry\ConfigurationInterface as RetryConfigInterface;
|
||||
use Aws\Retry\ConfigurationProvider as RetryConfigProvider;
|
||||
use Aws\Retry\V3\OptIn as NewRetriesOptIn;
|
||||
|
|
@ -293,6 +294,12 @@ class ClientResolver
|
|||
'default' => [],
|
||||
'doc' => 'Set to an array of SDK request options to apply to each request (e.g., proxy, verify, etc.).',
|
||||
],
|
||||
'transport_sharing' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['string'],
|
||||
'doc' => 'Set to a transport sharing mode ("none", "handler_prefer", "handler_require", "persistent_prefer", or "persistent_require") to enable connection sharing on the default HTTP handler. The "*_prefer" modes degrade gracefully when the installed version of Guzzle or the runtime cannot honor them, and the "*_require" modes throw. This option only applies when the SDK creates the default HTTP handler, and the "*_require" modes throw when combined with a custom "handler" or "http_handler" option.',
|
||||
'fn' => [__CLASS__, '_apply_transport_sharing'],
|
||||
],
|
||||
'http_handler' => [
|
||||
'type' => 'value',
|
||||
'valid' => ['callable'],
|
||||
|
|
@ -988,7 +995,7 @@ class ClientResolver
|
|||
public static function _default_handler(array &$args)
|
||||
{
|
||||
return new WrappedHttpHandler(
|
||||
default_http_handler(),
|
||||
default_http_handler($args['transport_sharing'] ?? null),
|
||||
$args['parser'],
|
||||
$args['error_parser'],
|
||||
$args['exception_class'],
|
||||
|
|
@ -1007,6 +1014,21 @@ class ClientResolver
|
|||
);
|
||||
}
|
||||
|
||||
public static function _apply_transport_sharing($value, array &$args)
|
||||
{
|
||||
HttpTransportSharing::validate($value);
|
||||
|
||||
if ((isset($args['http_handler']) || isset($args['handler']))
|
||||
&& HttpTransportSharing::isRequired($value)
|
||||
) {
|
||||
throw new IAE('The "transport_sharing" option can only'
|
||||
. ' require transport sharing when the SDK creates the'
|
||||
. ' default HTTP handler. Remove the "handler" or'
|
||||
. ' "http_handler" option, or configure transport sharing'
|
||||
. ' on the custom handler instead.');
|
||||
}
|
||||
}
|
||||
|
||||
public static function _apply_app_id($value, array &$args)
|
||||
{
|
||||
// AppId should not be longer than 50 chars
|
||||
|
|
|
|||
|
|
@ -95,6 +95,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise createEmailAddressAsync(array $args = [])
|
||||
* @method \Aws\Result createEvaluationForm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createEvaluationFormAsync(array $args = [])
|
||||
* @method \Aws\Result createExtractionDefinition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createExtractionDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result createHoursOfOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createHoursOfOperationAsync(array $args = [])
|
||||
* @method \Aws\Result createHoursOfOperationOverride(array $args = [])
|
||||
|
|
@ -175,6 +177,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise deleteEmailAddressAsync(array $args = [])
|
||||
* @method \Aws\Result deleteEvaluationForm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteEvaluationFormAsync(array $args = [])
|
||||
* @method \Aws\Result deleteExtractionDefinition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteExtractionDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteHoursOfOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteHoursOfOperationAsync(array $args = [])
|
||||
* @method \Aws\Result deleteHoursOfOperationOverride(array $args = [])
|
||||
|
|
@ -253,6 +257,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise describeEmailAddressAsync(array $args = [])
|
||||
* @method \Aws\Result describeEvaluationForm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeEvaluationFormAsync(array $args = [])
|
||||
* @method \Aws\Result describeExtractionDefinition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeExtractionDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result describeHoursOfOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeHoursOfOperationAsync(array $args = [])
|
||||
* @method \Aws\Result describeHoursOfOperationOverride(array $args = [])
|
||||
|
|
@ -421,6 +427,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise listEvaluationFormVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result listEvaluationForms(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listEvaluationFormsAsync(array $args = [])
|
||||
* @method \Aws\Result listExtractionDefinitions(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listExtractionDefinitionsAsync(array $args = [])
|
||||
* @method \Aws\Result listFlowAssociations(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listFlowAssociationsAsync(array $args = [])
|
||||
* @method \Aws\Result listHoursOfOperationOverrides(array $args = [])
|
||||
|
|
@ -687,6 +695,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise updateEmailAddressMetadataAsync(array $args = [])
|
||||
* @method \Aws\Result updateEvaluationForm(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateEvaluationFormAsync(array $args = [])
|
||||
* @method \Aws\Result updateExtractionDefinition(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateExtractionDefinitionAsync(array $args = [])
|
||||
* @method \Aws\Result updateHoursOfOperation(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise updateHoursOfOperationAsync(array $args = [])
|
||||
* @method \Aws\Result updateHoursOfOperationOverride(array $args = [])
|
||||
|
|
|
|||
10
vendor/aws/aws-sdk-php/src/EKS/EKSClient.php
vendored
10
vendor/aws/aws-sdk-php/src/EKS/EKSClient.php
vendored
|
|
@ -5,6 +5,8 @@ use Aws\AwsClient;
|
|||
|
||||
/**
|
||||
* This client is used to interact with the **Amazon Elastic Container Service for Kubernetes** service.
|
||||
* @method \Aws\Result activateCertificateAuthority(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise activateCertificateAuthorityAsync(array $args = [])
|
||||
* @method \Aws\Result associateAccessPolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise associateAccessPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result associateEncryptionConfig(array $args = [])
|
||||
|
|
@ -19,6 +21,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise createAddonAsync(array $args = [])
|
||||
* @method \Aws\Result createCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result createCertificateAuthority(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createCertificateAuthorityAsync(array $args = [])
|
||||
* @method \Aws\Result createCluster(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createClusterAsync(array $args = [])
|
||||
* @method \Aws\Result createEksAnywhereSubscription(array $args = [])
|
||||
|
|
@ -35,6 +39,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise deleteAddonAsync(array $args = [])
|
||||
* @method \Aws\Result deleteCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result deleteCertificateAuthority(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteCertificateAuthorityAsync(array $args = [])
|
||||
* @method \Aws\Result deleteCluster(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteClusterAsync(array $args = [])
|
||||
* @method \Aws\Result deleteEksAnywhereSubscription(array $args = [])
|
||||
|
|
@ -57,6 +63,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise describeAddonVersionsAsync(array $args = [])
|
||||
* @method \Aws\Result describeCapability(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeCapabilityAsync(array $args = [])
|
||||
* @method \Aws\Result describeCertificateAuthority(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeCertificateAuthorityAsync(array $args = [])
|
||||
* @method \Aws\Result describeCluster(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeClusterAsync(array $args = [])
|
||||
* @method \Aws\Result describeClusterVersions(array $args = [])
|
||||
|
|
@ -91,6 +99,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise listAssociatedAccessPoliciesAsync(array $args = [])
|
||||
* @method \Aws\Result listCapabilities(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCapabilitiesAsync(array $args = [])
|
||||
* @method \Aws\Result listCertificateAuthorities(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listCertificateAuthoritiesAsync(array $args = [])
|
||||
* @method \Aws\Result listClusters(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listClustersAsync(array $args = [])
|
||||
* @method \Aws\Result listEksAnywhereSubscriptions(array $args = [])
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
namespace Aws\Handler\Guzzle;
|
||||
|
||||
use Aws\Handler\HttpHandlerError;
|
||||
use Aws\Handler\HttpTransportSharing;
|
||||
use GuzzleHttp\Utils;
|
||||
use GuzzleHttp\Promise;
|
||||
use GuzzleHttp\Client;
|
||||
|
|
@ -18,11 +19,23 @@ class GuzzleHandler
|
|||
private $client;
|
||||
|
||||
/**
|
||||
* @param ClientInterface $client
|
||||
* @param ClientInterface|null $client
|
||||
* @param string|null $transportSharing
|
||||
*/
|
||||
public function __construct(?ClientInterface $client = null)
|
||||
{
|
||||
$this->client = $client ?: new Client();
|
||||
public function __construct(
|
||||
?ClientInterface $client = null,
|
||||
?string $transportSharing = null
|
||||
) {
|
||||
if ($client !== null && HttpTransportSharing::isRequired($transportSharing)) {
|
||||
throw new \InvalidArgumentException('The provided transport'
|
||||
. ' sharing mode cannot require sharing when a client is'
|
||||
. ' provided. Configure the "transport_sharing" option on'
|
||||
. ' the provided client instead.');
|
||||
}
|
||||
|
||||
$this->client = $client ?: new Client(
|
||||
HttpTransportSharing::toClientConfig($transportSharing)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
118
vendor/aws/aws-sdk-php/src/Handler/HttpTransportSharing.php
vendored
Normal file
118
vendor/aws/aws-sdk-php/src/Handler/HttpTransportSharing.php
vendored
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
<?php
|
||||
namespace Aws\Handler;
|
||||
|
||||
use GuzzleHttp\TransportSharing;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
final class HttpTransportSharing
|
||||
{
|
||||
private const NONE = 'none';
|
||||
private const HANDLER_PREFER = 'handler_prefer';
|
||||
private const HANDLER_REQUIRE = 'handler_require';
|
||||
private const PERSISTENT_PREFER = 'persistent_prefer';
|
||||
private const PERSISTENT_REQUIRE = 'persistent_require';
|
||||
|
||||
private const MODES = [
|
||||
self::NONE,
|
||||
self::HANDLER_PREFER,
|
||||
self::HANDLER_REQUIRE,
|
||||
self::PERSISTENT_PREFER,
|
||||
self::PERSISTENT_REQUIRE,
|
||||
];
|
||||
|
||||
public static function isRequired(?string $mode): bool
|
||||
{
|
||||
return $mode === self::HANDLER_REQUIRE
|
||||
|| $mode === self::PERSISTENT_REQUIRE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a requested transport sharing mode without resolving it
|
||||
* against the capabilities of the installed version of Guzzle.
|
||||
*/
|
||||
public static function validate(?string $mode): void
|
||||
{
|
||||
if ($mode !== null && !in_array($mode, self::MODES, true)) {
|
||||
throw new \InvalidArgumentException('The provided transport'
|
||||
. ' sharing mode "' . $mode . '" is invalid. Valid modes are:'
|
||||
. ' "none", "handler_prefer", "handler_require",'
|
||||
. ' "persistent_prefer", "persistent_require".');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a requested transport sharing mode to the mode that should be
|
||||
* passed to the installed version of Guzzle, or null when no mode should
|
||||
* be passed. The "*_prefer" modes degrade gracefully when the installed
|
||||
* version of Guzzle cannot honor them, and the "*_require" modes throw.
|
||||
*/
|
||||
public static function resolve(?string $mode): ?string
|
||||
{
|
||||
self::validate($mode);
|
||||
|
||||
if ($mode === null || $mode === self::NONE) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// Guzzle 8: all modes are understood, and Guzzle enforces the
|
||||
// runtime requirements of the "*_require" modes itself.
|
||||
if (self::supportsPersistentSharing()) {
|
||||
return $mode;
|
||||
}
|
||||
|
||||
// Guzzle 7.11+: handler-lifetime sharing only.
|
||||
if (self::supportsHandlerSharing()) {
|
||||
if ($mode === self::PERSISTENT_PREFER) {
|
||||
return self::HANDLER_PREFER;
|
||||
}
|
||||
|
||||
if ($mode === self::PERSISTENT_REQUIRE) {
|
||||
throw new \RuntimeException('The "persistent_require"'
|
||||
. ' transport sharing mode requires guzzlehttp/guzzle'
|
||||
. ' ^8.0.');
|
||||
}
|
||||
|
||||
return $mode;
|
||||
}
|
||||
|
||||
// Guzzle < 7.11: no transport sharing support.
|
||||
if ($mode === self::PERSISTENT_REQUIRE) {
|
||||
throw new \RuntimeException('The "persistent_require" transport'
|
||||
. ' sharing mode requires guzzlehttp/guzzle ^8.0.');
|
||||
}
|
||||
|
||||
if ($mode === self::HANDLER_REQUIRE) {
|
||||
throw new \RuntimeException('The "handler_require" transport'
|
||||
. ' sharing mode requires guzzlehttp/guzzle ^7.11 || ^8.0.');
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a requested transport sharing mode to a Guzzle client
|
||||
* constructor configuration array.
|
||||
*/
|
||||
public static function toClientConfig(?string $mode): array
|
||||
{
|
||||
$mode = self::resolve($mode);
|
||||
|
||||
return $mode === null ? [] : ['transport_sharing' => $mode];
|
||||
}
|
||||
|
||||
private static function supportsPersistentSharing(): bool
|
||||
{
|
||||
static $supported;
|
||||
|
||||
return $supported ??= defined(TransportSharing::class . '::PERSISTENT_PREFER');
|
||||
}
|
||||
|
||||
private static function supportsHandlerSharing(): bool
|
||||
{
|
||||
static $supported;
|
||||
|
||||
return $supported ??= class_exists(TransportSharing::class);
|
||||
}
|
||||
}
|
||||
|
|
@ -48,6 +48,8 @@ use Aws\Middleware;
|
|||
* @method \GuzzleHttp\Promise\Promise deleteLayerVersionAsync(array $args = [])
|
||||
* @method \Aws\Result deleteProvisionedConcurrencyConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteProvisionedConcurrencyConfigAsync(array $args = [])
|
||||
* @method \Aws\Result deleteResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getAccountSettings(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getAccountSettingsAsync(array $args = [])
|
||||
* @method \Aws\Result getAlias(array $args = [])
|
||||
|
|
@ -90,6 +92,8 @@ use Aws\Middleware;
|
|||
* @method \GuzzleHttp\Promise\Promise getPolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getProvisionedConcurrencyConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getProvisionedConcurrencyConfigAsync(array $args = [])
|
||||
* @method \Aws\Result getResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result getRuntimeManagementConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getRuntimeManagementConfigAsync(array $args = [])
|
||||
* @method \Aws\Result invoke(array $args = [])
|
||||
|
|
@ -144,6 +148,8 @@ use Aws\Middleware;
|
|||
* @method \GuzzleHttp\Promise\Promise putFunctionScalingConfigAsync(array $args = [])
|
||||
* @method \Aws\Result putProvisionedConcurrencyConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putProvisionedConcurrencyConfigAsync(array $args = [])
|
||||
* @method \Aws\Result putResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result putRuntimeManagementConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise putRuntimeManagementConfigAsync(array $args = [])
|
||||
* @method \Aws\Result removeLayerVersionPermission(array $args = [])
|
||||
|
|
|
|||
|
|
@ -11,12 +11,16 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise cancelChangeSetAsync(array $args = [])
|
||||
* @method \Aws\Result deleteResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise deleteResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result describeAssessment(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeAssessmentAsync(array $args = [])
|
||||
* @method \Aws\Result describeChangeSet(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeChangeSetAsync(array $args = [])
|
||||
* @method \Aws\Result describeEntity(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise describeEntityAsync(array $args = [])
|
||||
* @method \Aws\Result getResourcePolicy(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getResourcePolicyAsync(array $args = [])
|
||||
* @method \Aws\Result listAssessments(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listAssessmentsAsync(array $args = [])
|
||||
* @method \Aws\Result listChangeSets(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise listChangeSetsAsync(array $args = [])
|
||||
* @method \Aws\Result listEntities(array $args = [])
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise createOrderAsync(array $args = [])
|
||||
* @method \Aws\Result createOutpost(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createOutpostAsync(array $args = [])
|
||||
* @method \Aws\Result createPrivateConnectivityConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createPrivateConnectivityConfigAsync(array $args = [])
|
||||
* @method \Aws\Result createQuote(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise createQuoteAsync(array $args = [])
|
||||
* @method \Aws\Result createRenewal(array $args = [])
|
||||
|
|
@ -41,6 +43,8 @@ use Aws\AwsClient;
|
|||
* @method \GuzzleHttp\Promise\Promise getOutpostInstanceTypesAsync(array $args = [])
|
||||
* @method \Aws\Result getOutpostSupportedInstanceTypes(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getOutpostSupportedInstanceTypesAsync(array $args = [])
|
||||
* @method \Aws\Result getPrivateConnectivityConfig(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getPrivateConnectivityConfigAsync(array $args = [])
|
||||
* @method \Aws\Result getQuote(array $args = [])
|
||||
* @method \GuzzleHttp\Promise\Promise getQuoteAsync(array $args = [])
|
||||
* @method \Aws\Result getRenewalPricing(array $args = [])
|
||||
|
|
|
|||
7
vendor/aws/aws-sdk-php/src/Sdk.php
vendored
7
vendor/aws/aws-sdk-php/src/Sdk.php
vendored
|
|
@ -865,7 +865,7 @@ namespace Aws;
|
|||
*/
|
||||
class Sdk
|
||||
{
|
||||
const VERSION = '3.392.3';
|
||||
const VERSION = '3.393.4';
|
||||
|
||||
/** @var array Arguments for creating clients */
|
||||
private $args;
|
||||
|
|
@ -884,7 +884,10 @@ class Sdk
|
|||
$this->args = $args;
|
||||
|
||||
if (!isset($args['handler']) && !isset($args['http_handler'])) {
|
||||
$this->args['http_handler'] = default_http_handler();
|
||||
$this->args['http_handler'] = default_http_handler(
|
||||
$args['transport_sharing'] ?? null
|
||||
);
|
||||
unset($this->args['transport_sharing']);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue