Skip to content

Commit ff54d70

Browse files
committed
➕ Add new dependency for getting current version
1 parent d35f1e2 commit ff54d70

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
],
1919
"require": {
2020
"php": "^7.0 || ^8.0",
21-
"ocramius/package-versions": "^1.4",
21+
"composer-runtime-api": "^2.1",
2222
"psr/http-client": "^1.0",
2323
"psr/http-factory": "^1.0",
2424
"psr/http-message": "^1.0"

src/Client.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
use InvalidArgumentException;
1010
use Nyholm\Psr7\Factory\Psr17Factory;
1111
use Nyholm\Psr7\Uri;
12-
use PackageVersions\Versions;
1312
use Psr\Http\Client\ClientInterface;
1413
use Psr\Http\Message\RequestFactoryInterface;
1514
use Psr\Http\Message\RequestInterface;
@@ -48,7 +47,7 @@ public function __construct(
4847
$this->streamFactory = $streamFactory;
4948
$this->apiKey = $config["apiKey"];
5049
$this->rootUrl = $config["rootUrl"] ?? "https://api.journy.io";
51-
$this->version = explode("@", Versions::getVersion('journy-io/sdk'))[0];
50+
$this->version = \Composer\InstalledVersions::getVersion('journy-io/sdk');
5251
}
5352

5453
public static function withDefaults(string $apiKey): Client

0 commit comments

Comments
 (0)