Skip to content

Commit

Permalink
🐛 Get pretty version
Browse files Browse the repository at this point in the history
Otherwise we receive 3.0.5.0

Don't know why the zero appears in the version number

It should be 3.0.5
  • Loading branch information
hansott committed Oct 11, 2021
1 parent 6790306 commit 0da2837
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
namespace JournyIO\SDK;

use Buzz\Client\Curl;
use Composer\InstalledVersions;
use DateTimeInterface;
use InvalidArgumentException;
use Nyholm\Psr7\Factory\Psr17Factory;
Expand Down Expand Up @@ -47,7 +48,7 @@ public function __construct(
$this->streamFactory = $streamFactory;
$this->apiKey = $config["apiKey"];
$this->rootUrl = $config["rootUrl"] ?? "https://api.journy.io";
$this->version = \Composer\InstalledVersions::getVersion('journy-io/sdk');
$this->version = InstalledVersions::getPrettyVersion('journy-io/sdk');
}

public static function withDefaults(string $apiKey): Client
Expand Down

0 comments on commit 0da2837

Please sign in to comment.