Detect region endpoint changes in the refresh script
The PHP SDK does not register region endpoint changes in its .changes folder. As our changelog updates in the refresh script are those .changes files, we have to add those changes manually each time. It would be great to be able to detect those changes automatically.
definitely agree.
Also, the code contains optimisation that merges together similar region and provide a default case.
I feel like this optimisation triggers big changes when one region is update with a different pattern, as a result the diff is unreadable. Maybe we should revamps this part to always list explicitly all région to minimize the diff.
Removing this optimization would increase a lot the size of the method, given that most services have the same naming pattern for all "normal" AWS regions. AFAICT, the special cases are for FIPS regions, China and US Gov regions (which are probably always FIPS one even when they don't have fips in the name).
Maybe we could limit the diff by sorting region groups based on some alphabetical order instead of being based on the discovery order in the upstream endpoints file. This would have avoided diffs like https://github.com/async-aws/aws/pull/1964/files#diff-7b652e8d9a69a20faf545100b4156a504155e8faf436d14f4cdee0ad45d494c7R400
Actually, we already have such sorting in place in https://github.com/async-aws/aws/blob/5bf5e4984ae5aa27f7155d26dd46d35c54fd9240/src/CodeGenerator/src/Generator/ClientGenerator.php#L216-L229
However, the current sorting involves the number of regions in a group, which is why adding a new one often changes the sorting. I think removing that part (going directly for alphabetical sorting after the grouping by iso, fips and gov) would be enough to reduce such diff.