donatj / PhpUserAgent

Lightning Fast, Minimalist PHP User Agent String Parser.
https://donatstudios.com/PHP-Parser-HTTP_USER_AGENT
MIT License
559 stars 129 forks source link

Add version number to header? #48

Closed AllAstronauts closed 5 years ago

AllAstronauts commented 6 years ago

I see this included in places and wonder which version it actually is. Just dropping the version up top would be a major help, rather than me staring at it/diffing/etc...

/**
 * Parses a user agent string into its important parts
 *
 * @version 306.2.97 or whatever...
 * @author Jesse G. Donat <donatj@gmail.com>
 * @link https://github.com/donatj/PhpUserAgent
 * @link http://donatstudios.com/PHP-Parser-HTTP_USER_AGENT
 * @param string|null $u_agent User agent string to parse or null. Uses $_SERVER['HTTP_USER_AGENT'] on NULL
 * @throws \InvalidArgumentException on not having a proper user agent to parse.
 * @return string[] an array with browser, version and platform keys
 */
donatj commented 5 years ago

While I could see the usefulness for this, the odds of me forgetting to change it before I merge are too high to make this practical.