mailgun/mailgun-php

Improvement: SDK version headers v2 vs v3

Pilskalns opened this issue · 1 comments

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.)

'User-Agent' => 'mailgun-sdk-php/v2 (https://github.com/mailgun/mailgun-php)',

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