diff --git a/.github/workflows/bin/refresh b/.github/workflows/bin/refresh index 57c04e4d1..3b6156641 100755 --- a/.github/workflows/bin/refresh +++ b/.github/workflows/bin/refresh @@ -179,7 +179,7 @@ foreach ($services as $service => $hasChange) { $changeLog = explode("\n", file_get_contents($changeLogPath)); $nrSection = false; $fixSection = false; - $fixSectionLabel = $hasChange ? '### Added' : '### Changed'; + $fixSectionLabel = $hasChange ? '### Added' : '### Fixed'; foreach ($changeLog as $index => $line) { if ($line === '## NOT RELEASED') { diff --git a/src/Core/CHANGELOG.md b/src/Core/CHANGELOG.md index 364412989..fcdb3771a 100644 --- a/src/Core/CHANGELOG.md +++ b/src/Core/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -16,7 +16,7 @@ - Support for SSO credentials - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -36,7 +36,7 @@ ## 1.18.1 -### Changed +### Fixed - AWS enhancement: Documentation updates. - Fix deprecation by adding return type on reset methods @@ -73,7 +73,7 @@ - Added an AwsHttpClientFactory to help people creating retryable clients - Add 403 errors in the list of potential retryiable operations -### Changed +### Fixed - Set default value to `false` for the `sendChunkedBody` option. @@ -165,6 +165,8 @@ ## 1.7.2 +### Fixed + - Make sure we can get credentials even if the cache storage fails - Clear `realpath` cache to make sure we get the latest credentials token @@ -239,9 +241,6 @@ ### Fixed - Allows non-AWS regions when using custom endpoints - -### Changed - - Add more context to error logs - Log level for 404 responses changed to "info". @@ -255,9 +254,6 @@ - Add a `Credential::adjustExpireDate` method for adjusting the time according to the time difference with AWS clock - Support for global and regional endpoints - Add a `Configuration::optionExists` to allow third parties to check if an option is available (needed by libraries supporting several versions of core) - -### Deprecation - - Clients extending `AbstractApi` should override `getEndpointMetata`. The method will be abstract in 2.0 - Custom endpoints should not contain `%region%` and `%service` placeholder. They won't be replaced anymore in 2.0 - Protected methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` of AbstractApi are deprecated and will be removed in 2.0 @@ -334,14 +330,14 @@ - Internal `AsyncAws\Core\RequestContext`. - Internal `AsyncAws\Core\Stream\RewindableStream`. -### Removed +### BC-BREAK - The input's `validate()` function was merged with the `request()` function. - `Configuration::isDefault()`. - Protected property `AbstractApi::$logger`. - `AsyncAws\Core\StreamableBody` in favor of `AsyncAws\Core\Stream\ResponseBodyStream`. -### Changed +### Fixed - Exceptions will contain more information from the HTTP response. - Moved STS value objects to a dedicated namespace. @@ -353,9 +349,6 @@ - Renamed `AsyncAws\Core\Stream\Stream` to `AsyncAws\Core\Stream\RequestStream`. - Renamed `AsyncAws\Core\StreamableBodyInterface` to `AsyncAws\Core\Stream\ResultStream`. - The `ResultStream::getChunks()` now returns a iterable of string. - -### Fixed - - Bugfix in `WebIdentityProvider` ## 0.4.0 @@ -364,23 +357,20 @@ - Test class `AsyncAws\Core\Test\SimpleStreamableBody` -### Changed +### Fixed - Moved `AsyncAws\Core\Signer\Request` to `AsyncAws\Core\Request`. - Added constructor argument to `AsyncAws\Core\Request::__construct()` to support query parameters. - Renamed `AsyncAws\Core\Request::getUrl()` to `AsyncAws\Core\Request::getEndpoint()` - Class `AsyncAws\Core\Stream\StreamFactory` is not internal anymore. - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. +- Fix Instance Provider Role fetching -### Removed +### BC-BREAK - Public `AbstractApi::request()` was removed. - Protected function `AbstractApi::getEndpoint()` was made private. -### Fixed - -- Fix Instance Provider Role fetching - ## 0.3.3 ### Added @@ -415,7 +405,7 @@ - Streamable request accepts iterable alongside string, callable, resource - Support for getting credentials from Web Identity or OpenID Connect Federation. (`WebIdentityProvider`) -### Changed +### Fixed - Rename namespace `Signers` into `Signer`. @@ -428,7 +418,7 @@ - Protected methods `Result::registerPrefetch()` and `Result::unregisterPrefetch()` - Timeout parameter to `InstanceProvider::__construct()` -### Changed +### Fixed - Removed `AwsClient` and replaced it with `AwsClientFactory` - Class `AsyncAws\Core\Signer\Request` is marked as internal diff --git a/src/Integration/Aws/DynamoDbSession/CHANGELOG.md b/src/Integration/Aws/DynamoDbSession/CHANGELOG.md index db3e77e8f..f6b9ecc7f 100644 --- a/src/Integration/Aws/DynamoDbSession/CHANGELOG.md +++ b/src/Integration/Aws/DynamoDbSession/CHANGELOG.md @@ -4,24 +4,21 @@ ## 1.0.2 -### Changed +### Fixed - Improve parameter type and return type in phpdoc ## 1.0.1 -### Updated +### Fixed - Fix deprecations triggered by php 8.1 ## 1.0.0 -### Updated - -- Use async-aws/dynamo-db: ^1.0 - ### Fixed +- Use async-aws/dynamo-db: ^1.0 - Make sure we throw exception from async-aws/core ## 0.1.2 diff --git a/src/Integration/Aws/SimpleS3/CHANGELOG.md b/src/Integration/Aws/SimpleS3/CHANGELOG.md index ccb274ed1..ed8358a53 100644 --- a/src/Integration/Aws/SimpleS3/CHANGELOG.md +++ b/src/Integration/Aws/SimpleS3/CHANGELOG.md @@ -4,13 +4,13 @@ ## 2.0.0 -### BC Break +### BC-BREAK - Upgrade to `async-aws/s3` 2.0 ## 1.1.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -22,7 +22,7 @@ ## 1.0.0 -No changes since 0.1.2. +- Empty release ## 0.1.2 diff --git a/src/Integration/Laravel/Cache/CHANGELOG.md b/src/Integration/Laravel/Cache/CHANGELOG.md index a26d70dd2..33783055a 100644 --- a/src/Integration/Laravel/Cache/CHANGELOG.md +++ b/src/Integration/Laravel/Cache/CHANGELOG.md @@ -4,7 +4,7 @@ ## 0.2.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Integration/Laravel/Queue/CHANGELOG.md b/src/Integration/Laravel/Queue/CHANGELOG.md index 43a77acf4..901e3b371 100644 --- a/src/Integration/Laravel/Queue/CHANGELOG.md +++ b/src/Integration/Laravel/Queue/CHANGELOG.md @@ -4,7 +4,7 @@ ## 0.2.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -22,7 +22,7 @@ ## 0.1.2 -### Changed +### Fixed - Let `SqsClient` choose the right HttpClient. diff --git a/src/Integration/Monolog/CloudWatch/CHANGELOG.md b/src/Integration/Monolog/CloudWatch/CHANGELOG.md index 339bd057f..e5e47c0c9 100644 --- a/src/Integration/Monolog/CloudWatch/CHANGELOG.md +++ b/src/Integration/Monolog/CloudWatch/CHANGELOG.md @@ -4,24 +4,21 @@ ## 1.0.2 -### Changed +### Fixed - Improve parameter type and return type in phpdoc ## 1.0.1 -### Updated +### Fixed - Remove unnecessary sequenceToken from log events ## 1.0.0 -### Updated - -- Use async-aws/cloud-watch-logs: ^1.0 - ### Fixed +- Use async-aws/cloud-watch-logs: ^1.0 - Make sure we throw exception from async-aws/core ## 0.2.1 @@ -32,7 +29,7 @@ ## 0.2.0 -### Deprecation +### Fixed - `CloudWatchLogsHandler` constructor arguments changed diff --git a/src/Integration/Symfony/Bundle/CHANGELOG.md b/src/Integration/Symfony/Bundle/CHANGELOG.md index fbcf4631f..79994ff55 100644 --- a/src/Integration/Symfony/Bundle/CHANGELOG.md +++ b/src/Integration/Symfony/Bundle/CHANGELOG.md @@ -9,7 +9,7 @@ - Support for LocationService - Support for SSO -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -85,7 +85,7 @@ - Support for ECR client. -### Changed +### Fixed - Added channel "async_aws" to Monolog logger. @@ -130,7 +130,7 @@ ## 0.2.3 -### Changed +### Fixed - Support only version 1.0 of async-aws/core diff --git a/src/Service/AppSync/CHANGELOG.md b/src/Service/AppSync/CHANGELOG.md index c62ccf5e9..277c39afc 100644 --- a/src/Service/AppSync/CHANGELOG.md +++ b/src/Service/AppSync/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -21,7 +21,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Athena/CHANGELOG.md b/src/Service/Athena/CHANGELOG.md index 5b6621156..c27ce8f05 100644 --- a/src/Service/Athena/CHANGELOG.md +++ b/src/Service/Athena/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -28,7 +28,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/CloudFormation/CHANGELOG.md b/src/Service/CloudFormation/CHANGELOG.md index 3935433d4..5f4a4ac1c 100644 --- a/src/Service/CloudFormation/CHANGELOG.md +++ b/src/Service/CloudFormation/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - AWS enhancement: Documentation updates. @@ -14,7 +14,7 @@ - AWS enhancement: Documentation updates. - AWS api-change: This SDK release is for the feature launch of AWS CloudFormation RetainExceptOnCreate. It adds a new parameter retainExceptOnCreate in the following APIs: CreateStack, UpdateStack, RollbackStack, ExecuteChangeSet. -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -68,7 +68,7 @@ ## 0.5.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. @@ -78,20 +78,20 @@ ## 0.4.1 -### Changed +### Fixed - Support only version 1.0 of async-aws/core ## 0.4.0 -### Changed +### Fixed - Moved value objects to a dedicated namespace. - Results' `populateResult()` has only one argument. It takes a `AsyncAws\Core\Response`. - Using `DateTimeImmutable` instead of `DateTimeInterface` - The `AsyncAws\CloudFormation\Enum\*`, `AsyncAws\CloudFormation\Input\*` and `AsyncAws\CloudFormation\ValueObject*` classes are marked final. -### Removed +### BC-BREAK - Dependency on `symfony/http-client-contracts` - All `validate()` methods on the inputs. They are merged with `request()`. @@ -102,14 +102,14 @@ - Enums; `Capability`, `ResourceStatus`, `StackDriftStatus`, `StackStatus` -### Changed +### Fixed - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. - Using async-aws/core: 0.4.0 ## 0.2.0 -### Changed +### Fixed - Using async-aws/core: 0.3.0 diff --git a/src/Service/CloudFront/CHANGELOG.md b/src/Service/CloudFront/CHANGELOG.md index df9536f89..7735dc8cb 100644 --- a/src/Service/CloudFront/CHANGELOG.md +++ b/src/Service/CloudFront/CHANGELOG.md @@ -4,7 +4,7 @@ ## 1.0.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/CloudWatch/CHANGELOG.md b/src/Service/CloudWatch/CHANGELOG.md index 362cfd715..c9368fab6 100644 --- a/src/Service/CloudWatch/CHANGELOG.md +++ b/src/Service/CloudWatch/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -14,7 +14,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/CloudWatchLogs/CHANGELOG.md b/src/Service/CloudWatchLogs/CHANGELOG.md index 8658eb8ee..bbfc0b9c8 100644 --- a/src/Service/CloudWatchLogs/CHANGELOG.md +++ b/src/Service/CloudWatchLogs/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - AWS enhancement: Documentation updates. @@ -16,7 +16,7 @@ - The return type for `\AsyncAws\CloudWatchLogs\ValueObject\InputLogEvent::getTimestamp` uses `int` instead of `string` to reflect the AWS type. - The return type for the methods `getCreationTime`, `getFirstEventTimestamp`, `getLastEventTimestamp`, `getLastIngestionTime` and `getStoredBytes` of `\AsyncAws\CloudWatchLogs\ValueObject\LogStream` uses `int` instead of `string` to reflect the AWS type. -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -88,7 +88,7 @@ ## 0.2.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. diff --git a/src/Service/CodeBuild/CHANGELOG.md b/src/Service/CodeBuild/CHANGELOG.md index db220ea8a..d52240588 100644 --- a/src/Service/CodeBuild/CHANGELOG.md +++ b/src/Service/CodeBuild/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -17,7 +17,7 @@ - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/CodeCommit/CHANGELOG.md b/src/Service/CodeCommit/CHANGELOG.md index 9e46722d0..5b130dcc0 100644 --- a/src/Service/CodeCommit/CHANGELOG.md +++ b/src/Service/CodeCommit/CHANGELOG.md @@ -2,14 +2,14 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - AWS enhancement: Documentation updates. ## 1.0.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/CodeDeploy/CHANGELOG.md b/src/Service/CodeDeploy/CHANGELOG.md index 5092d65c5..1fb84549e 100644 --- a/src/Service/CodeDeploy/CHANGELOG.md +++ b/src/Service/CodeDeploy/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - AWS enhancement: Documentation updates. @@ -17,7 +17,7 @@ - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -70,7 +70,7 @@ ## 0.2.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. diff --git a/src/Service/CognitoIdentityProvider/CHANGELOG.md b/src/Service/CognitoIdentityProvider/CHANGELOG.md index 29e2fff97..308fb2da9 100644 --- a/src/Service/CognitoIdentityProvider/CHANGELOG.md +++ b/src/Service/CognitoIdentityProvider/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - AWS enhancement: Documentation updates. @@ -14,7 +14,7 @@ - AWS enhancement: Documentation updates. - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -108,7 +108,7 @@ ## 0.2.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. diff --git a/src/Service/Comprehend/CHANGELOG.md b/src/Service/Comprehend/CHANGELOG.md index 9f775b3c3..f1b2703ea 100644 --- a/src/Service/Comprehend/CHANGELOG.md +++ b/src/Service/Comprehend/CHANGELOG.md @@ -8,7 +8,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/DynamoDb/CHANGELOG.md b/src/Service/DynamoDb/CHANGELOG.md index c7df49e32..353cdde64 100644 --- a/src/Service/DynamoDb/CHANGELOG.md +++ b/src/Service/DynamoDb/CHANGELOG.md @@ -8,7 +8,7 @@ - The value returned by `AttributeValue::getB` and `AttributeValue::getBS` is now base64 decoded. -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -30,7 +30,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -110,7 +110,7 @@ - Added operation `UpdateTimeToLiveInput` -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. @@ -124,7 +124,7 @@ - Support for async-aws/core 1.0 -### Changed +### Fixed - DTO classes are final diff --git a/src/Service/Ecr/CHANGELOG.md b/src/Service/Ecr/CHANGELOG.md index 878c079c9..03b7d40a7 100644 --- a/src/Service/Ecr/CHANGELOG.md +++ b/src/Service/Ecr/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -11,15 +11,12 @@ ### Added - Avoid overriding the exception message with the raw message +- AWS api-change: Add support for the `il-central-1` region -### Changed +### Fixed - Improve parameter type and return type in phpdoc -### Added - -- AWS api-change: Add support for the `il-central-1` region - ## 1.4.0 ### Added @@ -69,9 +66,6 @@ ### Fixed - AWS api-change: Added us-isob-east-1 region - -### Deprecated - - AWS api-change: `GetAuthorizationTokenRequest::$registryIds` has been deprecated ## 0.1.0 diff --git a/src/Service/ElastiCache/CHANGELOG.md b/src/Service/ElastiCache/CHANGELOG.md index 8b6efa550..f35b177b8 100644 --- a/src/Service/ElastiCache/CHANGELOG.md +++ b/src/Service/ElastiCache/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -12,7 +12,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/EventBridge/CHANGELOG.md b/src/Service/EventBridge/CHANGELOG.md index 8d2f77e00..a354ca833 100644 --- a/src/Service/EventBridge/CHANGELOG.md +++ b/src/Service/EventBridge/CHANGELOG.md @@ -2,13 +2,13 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects ## 1.5.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -71,7 +71,7 @@ ## 0.2.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. diff --git a/src/Service/Firehose/CHANGELOG.md b/src/Service/Firehose/CHANGELOG.md index 2e91eb310..f2e9c5312 100644 --- a/src/Service/Firehose/CHANGELOG.md +++ b/src/Service/Firehose/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - AWS enhancement: Documentation updates. @@ -12,7 +12,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Iam/CHANGELOG.md b/src/Service/Iam/CHANGELOG.md index 6c0ed008a..ee2ac4e34 100644 --- a/src/Service/Iam/CHANGELOG.md +++ b/src/Service/Iam/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -13,7 +13,7 @@ - AWS enhancement: Documentation updates. - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -80,7 +80,7 @@ ## 0.2.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. diff --git a/src/Service/Iot/CHANGELOG.md b/src/Service/Iot/CHANGELOG.md index 46d94b4e7..8a7a30ba6 100644 --- a/src/Service/Iot/CHANGELOG.md +++ b/src/Service/Iot/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -19,7 +19,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/IotData/CHANGELOG.md b/src/Service/IotData/CHANGELOG.md index 21d0b04eb..d8370089c 100644 --- a/src/Service/IotData/CHANGELOG.md +++ b/src/Service/IotData/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -12,7 +12,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Kinesis/CHANGELOG.md b/src/Service/Kinesis/CHANGELOG.md index fcc84fd24..d9c17b939 100644 --- a/src/Service/Kinesis/CHANGELOG.md +++ b/src/Service/Kinesis/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -17,7 +17,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Kms/CHANGELOG.md b/src/Service/Kms/CHANGELOG.md index ed0d05d05..2de7e7da5 100644 --- a/src/Service/Kms/CHANGELOG.md +++ b/src/Service/Kms/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -14,7 +14,7 @@ - AWS api-change: Add support for the `il-central-1` region - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Lambda/CHANGELOG.md b/src/Service/Lambda/CHANGELOG.md index 035e685a2..264b3620c 100644 --- a/src/Service/Lambda/CHANGELOG.md +++ b/src/Service/Lambda/CHANGELOG.md @@ -8,7 +8,7 @@ - Added operation `getFunctionConfiguration` and `updateFunctionConfiguration`. -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -32,7 +32,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -82,9 +82,6 @@ ### Fixed - Assert the provided Input can be json-encoded. - -### Changed - - AWS enhancement: Documentation updates for Amazon Lambda. ### Added @@ -137,7 +134,7 @@ ## 0.5.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. @@ -148,20 +145,20 @@ ## 0.4.1 -### Changed +### Fixed - Support only version 1.0 of async-aws/core ## 0.4.0 -### Changed +### Fixed - Moved value objects to a dedicated namespace. - Results' `populateResult()` has only one argument. It takes a `AsyncAws\Core\Response`. - Using `DateTimeImmutable` instead of `DateTimeInterface` - The `AsyncAws\Lambda\Enum\*`, `AsyncAws\Lambda\Input\*` and `AsyncAws\Lambda\ValueObject*` classes are marked final. -### Removed +### BC-BREAK - Dependency on `symfony/http-client-contracts` - All `validate()` methods on the inputs. They are merged with `request()`. @@ -172,18 +169,15 @@ - Enums; `InvocationType`, `LogType`, `Runtime` -### Changed +### Fixed - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. - Using async-aws/core: 0.4.0 - -### Fixed - - `Action` and `Version` do not need to be part of every body. ## 0.2.0 -### Changed +### Fixed - Using async-aws/core: 0.3.0 diff --git a/src/Service/LocationService/CHANGELOG.md b/src/Service/LocationService/CHANGELOG.md index 9451197f4..28428abce 100644 --- a/src/Service/LocationService/CHANGELOG.md +++ b/src/Service/LocationService/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -15,15 +15,12 @@ ### Added - Avoid overriding the exception message with the raw message +- AWS api-change: This release adds support for authenticating with Amazon Location Service's Places & Routes APIs with an API Key. Also, with this release developers can publish tracked device position updates to Amazon EventBridge. -### Changed +### Fixed - Improve parameter type and return type in phpdoc -### Added - -- AWS api-change: This release adds support for authenticating with Amazon Location Service's Places & Routes APIs with an API Key. Also, with this release developers can publish tracked device position updates to Amazon EventBridge. - ## 0.1.0 First version diff --git a/src/Service/MediaConvert/CHANGELOG.md b/src/Service/MediaConvert/CHANGELOG.md index 8327495ac..fd5fc4d7e 100644 --- a/src/Service/MediaConvert/CHANGELOG.md +++ b/src/Service/MediaConvert/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - Change the way `AudioSelectorGroup` and `AudioSelector` are populated @@ -18,16 +18,13 @@ ### Added - Avoid overriding the exception message with the raw message +- AWS api-change: This release introduces the bandwidth reduction filter for the HEVC encoder, increases the limits of outputs per job, and updates support for the Nagra SDK to version 1.14.7. +- AWS enhancement: Documentation updates. -### Changed +### Fixed - Improve parameter type and return type in phpdoc -### Added - -- AWS api-change: This release introduces the bandwidth reduction filter for the HEVC encoder, increases the limits of outputs per job, and updates support for the Nagra SDK to version 1.14.7. -- AWS enhancement: Documentation updates. - ## 0.1.0 First version diff --git a/src/Service/RdsDataService/CHANGELOG.md b/src/Service/RdsDataService/CHANGELOG.md index b610753ab..8269f131f 100644 --- a/src/Service/RdsDataService/CHANGELOG.md +++ b/src/Service/RdsDataService/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -20,7 +20,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Rekognition/CHANGELOG.md b/src/Service/Rekognition/CHANGELOG.md index 40b61b2c8..26c6d4a43 100644 --- a/src/Service/Rekognition/CHANGELOG.md +++ b/src/Service/Rekognition/CHANGELOG.md @@ -2,17 +2,14 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects - -### Changed - - AWS enhancement: Documentation updates. ## 1.0.1 -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Route53/CHANGELOG.md b/src/Service/Route53/CHANGELOG.md index f856233ba..6ee9a15d6 100644 --- a/src/Service/Route53/CHANGELOG.md +++ b/src/Service/Route53/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -20,7 +20,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -32,6 +32,8 @@ ## 1.0.0 +### Added + - AWS api-change: Add new APIs to support Route 53 IP Based Routing - AWS enhancement: SDK doc update for Route 53 to update some parameters with new information. - AWS enhancement: Documentation updates. @@ -40,7 +42,7 @@ - AWS api-change: Amazon Route 53 now supports the Europe (Spain) Region (eu-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. - AWS api-change: Amazon Route 53 now supports the Asia Pacific (Hyderabad) Region (ap-south-2) for latency records, geoproximity records, and private DNS for Amazon VPCs in that region. -### 0.1.2 +## 0.1.2 ### Added diff --git a/src/Service/S3/CHANGELOG.md b/src/Service/S3/CHANGELOG.md index 98c350612..4e7bb8f3b 100644 --- a/src/Service/S3/CHANGELOG.md +++ b/src/Service/S3/CHANGELOG.md @@ -5,9 +5,6 @@ ### Fixed - Fix the format of the `objectLockRetainUntilDate` field in requests - -### Changed - - Allow passing explicit null values for optional fields of input objects - AWS enhancement: Documentation updates. @@ -33,7 +30,7 @@ - AWS api-change: Add support for the `il-central-1` region - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -59,9 +56,6 @@ - Format datetime with `RFC7231` to provide a workaround for unsupported `RFC822` format. - Broken path to host when operation's URL contains a query string. - -### Changed - - Set default value to `false` for the `sendChunkedBody` option. ## 1.11.0 @@ -105,15 +99,12 @@ - AWS api-change: Adding ID element to the CORSRule schema - AWS api-change: Adding many more regions -### Changed +### Fixed - AWS api-change: Reword docblocks - AWS enhancement: Amazon S3 Documentation updates - AWS api-change: Improve documentation - AWS enhancement: Documentation updates for Amazon S3 - -### Fixed - - Wrong custom encoding on chunked stream ## 1.8.0 @@ -140,12 +131,9 @@ - Added `S3Client::putBucketNotificationConfiguration()` - AWS api-change: S3 Intelligent-Tiering adds support for Archive and Deep Archive Access tiers -### Changed - -- Removed deprecation warning on Content-MD5 headers. - ### Fixed +- Removed deprecation warning on Content-MD5 headers. - Make sure we throw exception from async-aws/core ## 1.5.1 @@ -178,11 +166,8 @@ - Fixed an issue in Metadata not beeing sent to AWS in `PutObject`, `CopyObject` and `CreateMultipartUpload` - Internal AWS prefix were added to Metadata's name in `GetObject` and `HeadObject`. - -### Deprecated by AWS - -- `PutObjectAclRequest::getContentMD5()` -- `PutObjectAclRequest::setContentMD5()` +- `PutObjectAclRequest::getContentMD5()` has been deprecated by AWS +- `PutObjectAclRequest::setContentMD5()` has been deprecated by AWS ## 1.2.0 @@ -193,9 +178,6 @@ ### Fixed - Fixed issue when Bucket or Object's Key contained a special char like `#` - -### Deprecation - - Protected methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` of `S3Client` are deprecated and will be removed in 2.0 ## 1.1.0 @@ -223,13 +205,13 @@ - Waiters: `S3Client::bucketExists()` and `S3Client::objectExists()` - The `AsyncAws\S3\Enum\*`, `AsyncAws\S3\Input\*` and `AsyncAws\S3\ValueObject*` classes are marked final. -### Changed +### Fixed - Moved value objects to a dedicated namespace. - Results' `populateResult()` has only one argument. It takes a `AsyncAws\Core\Response`. - Using `DateTimeImmutable` instead of `DateTimeInterface` -### Removed +### BC-BREAK - Dependency on `symfony/http-client-contracts` - All `validate()` methods on the inputs. They are merged with `request()`. @@ -242,18 +224,15 @@ `ObjectLockMode`, `ObjectStorageClass`, `Permission`, `ReplicationStatus`, `RequestCharged`, `RequestPayer`, `ServerSideEncryption` `StorageClass`, `TaggingDirective`, `Type` -### Changed +### Fixed - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. - Using async-aws/core: 0.4.0 - -### Fixed - - Dont generate a request body when no body is needed. ## 0.2.0 -### Changed +### Fixed - Using async-aws/core: 0.3.0 diff --git a/src/Service/Scheduler/CHANGELOG.md b/src/Service/Scheduler/CHANGELOG.md index b1612b6b9..96228f99e 100644 --- a/src/Service/Scheduler/CHANGELOG.md +++ b/src/Service/Scheduler/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -13,7 +13,7 @@ - AWS api-change: This release introduces automatic deletion of schedules in EventBridge Scheduler. If configured, EventBridge Scheduler automatically deletes a schedule after the schedule has completed its last invocation. - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/SecretsManager/CHANGELOG.md b/src/Service/SecretsManager/CHANGELOG.md index cd9d8d461..07ac66ab9 100644 --- a/src/Service/SecretsManager/CHANGELOG.md +++ b/src/Service/SecretsManager/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -23,7 +23,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Ses/CHANGELOG.md b/src/Service/Ses/CHANGELOG.md index 96820b84e..49e6ff597 100644 --- a/src/Service/Ses/CHANGELOG.md +++ b/src/Service/Ses/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -16,7 +16,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc - Avoid overriding the exception message with the raw message @@ -70,7 +70,7 @@ ## 1.1.0 -### Deprecation +### Fixed - Protected methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` of `SesClient` are deprecated and will be removed in 2.0 @@ -82,31 +82,28 @@ ## 0.4.0 -### Changed +### Fixed - Moved value objects to a dedicated namespace. - Results' `populateResult()` has only one argument. It takes a `AsyncAws\Core\Response`. - The `AsyncAws\Ses\Input\*` and `AsyncAws\Ses\ValueObject*` classes are marked final. -### Removed +### BC-BREAK - Dependency on `symfony/http-client-contracts` - All `validate()` methods on the inputs. They are merged with `request()`. ## 0.3.0 -### Changed +### Fixed - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. - Using async-aws/core: 0.4.0 - -### Fixed - - `Action` and `Version` do not need to be part of every body. ## 0.2.0 -### Changed +### Fixed - Using async-aws/core: 0.3.0 diff --git a/src/Service/Sns/CHANGELOG.md b/src/Service/Sns/CHANGELOG.md index 8648da565..7c13b44fb 100644 --- a/src/Service/Sns/CHANGELOG.md +++ b/src/Service/Sns/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -16,7 +16,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -86,7 +86,7 @@ ## 0.5.0 -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. @@ -102,33 +102,33 @@ - Added operations `CreateTopic`, `DeleteTopic`, `ListSubscriptionsByTopic`, `Subscribe` and `Unsubscribe`. -### Changed +### Fixed - Support only version 1.0 of async-aws/core ## 0.4.0 -### Changed +### Fixed - Moved value objects to a dedicated namespace. - Results' `populateResult()` has only one argument. It takes a `AsyncAws\Core\Response`. - The `AsyncAws\Sns\Input\*` and `AsyncAws\Sns\ValueObject*` classes are marked final. -### Removed +### BC-BREAK - Dependency on `symfony/http-client-contracts` - All `validate()` methods on the inputs. They are merged with `request()`. ## 0.3.0 -### Changed +### Fixed - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. - Using async-aws/core: 0.4.0 ## 0.2.0 -### Changed +### Fixed - Using async-aws/core: 0.3.0 diff --git a/src/Service/Sqs/CHANGELOG.md b/src/Service/Sqs/CHANGELOG.md index 2a3e0afe9..b986d1c4e 100644 --- a/src/Service/Sqs/CHANGELOG.md +++ b/src/Service/Sqs/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -12,7 +12,7 @@ - AWS enhancement: Documentation updates. -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -80,7 +80,7 @@ ## 1.2.0 -### Deprecation +### Fixed - Protected methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` of `SqsClient` are deprecated and will be removed in 2.0 @@ -105,13 +105,13 @@ ## 0.4.0 -### Changed +### Fixed - Moved value objects to a dedicated namespace. - Results' `populateResult()` has only one argument. It takes a `AsyncAws\Core\Response`. - The `AsyncAws\Sqs\Enum\*`, `AsyncAws\Sqs\Input\*` and `AsyncAws\Sqs\ValueObject*` classes are marked final. -### Removed +### BC-BREAK - Dependency on `symfony/http-client-contracts` - All `validate()` methods on the inputs. They are merged with `request()`. @@ -122,14 +122,14 @@ - Enums; `QueueAttributeName` -### Changed +### Fixed - Removed `requestBody()`, `requestHeaders()`, `requestQuery()` and `requestUri()` input classes. They are replaced with `request()`. - Using async-aws/core: 0.4.0 ## 0.2.0 -### Changed +### Fixed - Using async-aws/core: 0.3.0 diff --git a/src/Service/Ssm/CHANGELOG.md b/src/Service/Ssm/CHANGELOG.md index 86b53b107..403a8492b 100644 --- a/src/Service/Ssm/CHANGELOG.md +++ b/src/Service/Ssm/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -18,7 +18,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -68,11 +68,11 @@ - AWS api-change: Added region `fips-ca-central-1` -### Removed +### BC-BREAK -The following regions are no longer supported by AWS and has been remove from -the client: `ssm-facade-fips-us-east-1`, `ssm-facade-fips-us-east-2`, `ssm-facade-fips-us-gov-east-1`, -`ssm-facade-fips-us-gov-west-1`, `ssm-facade-fips-us-west-1`, `ssm-facade-fips-us-west-2`. +- The following regions are no longer supported by AWS and has been remove from + the client: `ssm-facade-fips-us-east-1`, `ssm-facade-fips-us-east-2`, `ssm-facade-fips-us-gov-east-1`, + `ssm-facade-fips-us-gov-west-1`, `ssm-facade-fips-us-west-1`, `ssm-facade-fips-us-west-2`. ## 1.0.0 @@ -82,11 +82,11 @@ the client: `ssm-facade-fips-us-east-1`, `ssm-facade-fips-us-east-2`, `ssm-facad ## 0.2.0 -### Changed +### Fixed - parameter `type` of `putParameter` is optional. -### Removed +### BC-BREAK - Removes methods `getServiceCode`, `getSignatureVersion` and `getSignatureScopeName` from Client. @@ -98,7 +98,7 @@ the client: `ssm-facade-fips-us-east-1`, `ssm-facade-fips-us-east-2`, `ssm-facad ## 0.1.1 -### Changed +### Fixed - Support only version 1.0 of async-aws/core diff --git a/src/Service/StepFunctions/CHANGELOG.md b/src/Service/StepFunctions/CHANGELOG.md index 82deb8864..3fdd76163 100644 --- a/src/Service/StepFunctions/CHANGELOG.md +++ b/src/Service/StepFunctions/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -13,7 +13,7 @@ - AWS api-change: Adding `INVALID_ROUTING_CONFIGURATION` reason to ValidationExceptionReason enum - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc @@ -39,11 +39,12 @@ ## 0.1.1 -## Added +### Added - Added operation `sendTaskFailure` - Added operation `sendTaskHeartbeat` - Added operation `sendTaskSuccess` + ## 0.1.0 First version diff --git a/src/Service/TimestreamQuery/CHANGELOG.md b/src/Service/TimestreamQuery/CHANGELOG.md index 7dff3cb3b..28613ca25 100644 --- a/src/Service/TimestreamQuery/CHANGELOG.md +++ b/src/Service/TimestreamQuery/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -17,7 +17,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/TimestreamWrite/CHANGELOG.md b/src/Service/TimestreamWrite/CHANGELOG.md index 69a102aa5..b20f8c146 100644 --- a/src/Service/TimestreamWrite/CHANGELOG.md +++ b/src/Service/TimestreamWrite/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -18,7 +18,7 @@ - Avoid overriding the exception message with the raw message - Use int as the PHP representation of long fields in generated code -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/Translate/CHANGELOG.md b/src/Service/Translate/CHANGELOG.md index b30af3ac0..0256ffc4e 100644 --- a/src/Service/Translate/CHANGELOG.md +++ b/src/Service/Translate/CHANGELOG.md @@ -2,7 +2,7 @@ ## NOT RELEASED -### Changed +### Fixed - Allow passing explicit null values for optional fields of input objects @@ -13,7 +13,7 @@ - AWS enhancement: Documentation updates. - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/src/Service/XRay/CHANGELOG.md b/src/Service/XRay/CHANGELOG.md index a04119351..3ddc3e35f 100644 --- a/src/Service/XRay/CHANGELOG.md +++ b/src/Service/XRay/CHANGELOG.md @@ -8,7 +8,7 @@ - Avoid overriding the exception message with the raw message -### Changed +### Fixed - Improve parameter type and return type in phpdoc diff --git a/tests/Unit/ChangelogTest.php b/tests/Unit/ChangelogTest.php new file mode 100644 index 000000000..f5308efeb --- /dev/null +++ b/tests/Unit/ChangelogTest.php @@ -0,0 +1,251 @@ + $line) { + if ($needEmptyLine) { + self::assertSame('', $line, 'CHANGELOG line ' . $index . ' MUST be empty'); + $needEmptyLine = false; + $wasEmptyLine = true; + + continue; + } + self::assertFalse($finalWords, 'CHANGELOG line ' . $index . ' MUST not contains anything after "First version"'); + if ('' === $line) { + $wasEmptyLine = true; + + continue; + } + + if (0 === strpos($line, '# ')) { + self::assertFalse($inTitle1, 'CHANGELOG line ' . $index . ' MUST contain a single Title'); + $inTitle1 = true; + $needEmptyLine = true; + $wasEmptyLine = false; + + continue; + } + + if (0 === strpos($line, '## ')) { + self::assertTrue($wasEmptyLine, 'CHANGELOG line ' . ($index - 1) . ' MUST be empty'); + self::assertTrue($inTitle1, 'CHANGELOG line ' . $index . ' MUST have title2 inside a title1'); + self::assertFalse($title2Empty, 'CHANGELOG line ' . $index . ' MUST not have empty title2'); + self::assertFalse($title3Empty, 'CHANGELOG line ' . $index . ' MUST not have empty title3'); + $inTitle2 = true; + $inTitle3 = false; + $title3s = []; + $title2Empty = '## NOT RELEASED' !== $line; // allows having empty section for `## NOT RELEASED` + $title3Empty = false; + $wasEmptyLine = false; + + $needEmptyLine = true; + + continue; + } + + if (0 === strpos($line, '### ')) { + self::assertTrue($wasEmptyLine, 'CHANGELOG line ' . ($index - 1) . ' MUST be empty'); + self::assertTrue($inTitle2, 'CHANGELOG line ' . $index . ' MUST have title2 inside a title2'); + self::assertFalse($title3Empty, 'CHANGELOG line ' . $index . ' MUST not have empty title3'); + self::assertMatchesRegularExpression('/^### (Fixed|Added|BC-BREAK)$/', $line, 'CHANGELOG line ' . $index . ' MUST be "Fixed", "Added" OR "BC-BREAK"'); + self::assertNotContains($line, $title3s, 'CHANGELOG line ' . $index . ' MUST have unique title3'); + $title3s[] = $line; + $title2Empty = false; + $inTitle3 = true; + $title3Empty = true; + $wasEmptyLine = false; + + $needEmptyLine = true; + + continue; + } + + $wasEmptyLine = false; + if ($inTitle3) { + self::assertMatchesRegularExpression('/^[ -] /', $line, 'CHANGELOG entry at line ' . $index . ' MUST start with "- " or " " for multiline content'); + $title3Empty = false; + + continue; + } + + if ('- Empty release' === $line) { + $needEmptyLine = true; + $inTitle3 = false; + $title2Empty = false; + + continue; + } + + if ('First version' === $line) { + $finalWords = true; + $needEmptyLine = true; + + continue; + } + + self::assertFalse('CHANGELOG entry at line ' . $index . ' is not expected'); + } + + self::assertTrue($finalWords, 'CHANGELOG MUST contains "First version"'); + } + + /** + * @dataProvider provideChangedServicesWithoutChangelog + */ + public function testChangelogEntryForService(string $service, string $base, $isCommentOnly) + { + if (!$isCommentOnly) { + self::fail('Missing CHANGELOG entry for package ' . $service); + } + + $changelog = explode("\n", file_get_contents($base . '/CHANGELOG.md')); + $nrSection = false; + + foreach ($changelog as $line) { + if ('## NOT RELEASED' === $line) { + $nrSection = true; + + continue; + } + if (!$nrSection) { + continue; + } + if (0 === strpos($line, '## ')) { + break; + } + + if ('- AWS enhancement: Documentation updates.' === $line) { + $this->expectNotToPerformAssertions(); + + return; + } + } + + self::fail('Missing CHANGELOG entry for package ' . $service); + } + + public function provideChangedlogFiles(): iterable + { + $finder = (new Finder()) + ->in(\dirname(__DIR__, 2) . '/src') + ->name('CHANGELOG.md'); + + /** @var \SplFileInfo $file */ + foreach ($finder as $file) { + yield [$file->getRealPath()]; + } + } + + public function provideChangedServicesWithoutChangelog(): iterable + { + $output = array_merge( + $this->call('git diff --numstat HEAD src/'), + $this->call('git diff --numstat master...HEAD src/') + ); + + $changedServices = []; + foreach ($output as $line) { + $file = explode("\t", $line)[2]; + $parts = explode('/', $file); + if ('src' !== $parts[0]) { + continue; + } + if (!isset($parts[1])) { + continue; + } + + if ('Service' === $parts[1]) { + $service = $parts[2]; + $base = 'src/Service/' . $service; + } elseif ('Integration' === $parts[1]) { + $service = $parts[2] . '/' . $parts[3]; + $base = 'src/Integration/' . $service; + } elseif ('CodeGenerator' === $parts[1] || 'Core' === $parts[1]) { + $service = $parts[1]; + $base = 'src/' . $service; + } else { + continue; + } + if (!isset($changedServices[$service])) { + $changedServices[$service] = ['base' => $base, 'files' => []]; + } + $changedServices[$service]['files'][] = substr($file, \strlen($base)); + } + + foreach ($changedServices as $service => $changesService) { + $changedFiles = $changesService['files']; + if (\in_array('/CHANGELOG.md', $changedFiles, true)) { + continue; + } + + $isCommentOnly = true; + foreach ($changedFiles as $changedFile) { + $changedLines = $this->call('git diff --no-color -U0 ' . escapeshellarg($changesService['base'] . $changedFile)); + foreach ($changedLines as $changedLine) { + if (!$changedLine) { + continue; + } + if ('-' !== $changedLine[0] && '+' !== $changedLine[0]) { + continue; + } + if (\in_array(substr($changedLine, 0, 3), ['---', '+++'], true)) { + continue; + } + $changedLine = trim(substr($changedLine, 1)); + if ('' === $changedLine || '*' !== $changedLine[0] ?? null) { + $isCommentOnly = false; + + break 2; + } + } + } + + yield [$service, $changesService['base'], $isCommentOnly]; + } + } + + private function call(string $command): array + { + $output = []; + exec($command, $output, $return); + if (0 !== $return) { + throw new \Exception('Command "' . $command . '" failed.'); + } + + return $output; + } +}