/** * Get TyrService class to use depending on currently installed Guzzle version. * * @throws NotSupportedException when Guzzle vendor version is not supported. * * @return string */ public static function getTyrServiceClassName() { $guzzleVersion = VersionChecker::vendorGuzzleVersion(); if (5 === $guzzleVersion) { return 'CanalTP\\TyrComponent\\TyrService'; } elseif (3 === $guzzleVersion) { return 'CanalTP\\TyrComponent\\Guzzle3\\TyrService'; } }