The user-agent default to the php library, but it might be better to be the calling application.
It'd be slightly easier to make that happen in the constructor rather than only via a separate call.
I can submit a PR.
If you do bump the minimum PHP version to only supported PHP, we can add types to many of the properties, too.