Closed Pilskalns closed 11 months ago
Hi,
I got really confused at first that the User-Agent version is v2. Then found out it is hardcoded to mailgun-sdk-php/v2 ... while the major version now is v3 (3.6.)
mailgun-sdk-php/v2 ...
https://github.com/mailgun/mailgun-php/blob/02d8b5c7e082a64fb8e9bf9aea557501bf69fa41/src/HttpClient/HttpClientConfigurator.php#L73
Composer has this nice helper that could be used to retrieve the installed version on the fly without a need to patch code every major update:
\Composer\InstalledVersions::getVersion('mailgun/mailgun-php')
P.S. Might consider using some fallback value, in case someone runs code by direct download and includes it without Composer.
Thank you, we made those changes
Hi,
I got really confused at first that the User-Agent version is v2. Then found out it is hardcoded to
mailgun-sdk-php/v2 ...
while the major version now is v3 (3.6.)https://github.com/mailgun/mailgun-php/blob/02d8b5c7e082a64fb8e9bf9aea557501bf69fa41/src/HttpClient/HttpClientConfigurator.php#L73
Composer has this nice helper that could be used to retrieve the installed version on the fly without a need to patch code every major update:
P.S. Might consider using some fallback value, in case someone runs code by direct download and includes it without Composer.