Skip to content

Commit a4af16b

Browse files
committed
DX-104 : Http/Promise => Guzzle/PromiseInterface
1 parent 8dd94a4 commit a4af16b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+117
-117
lines changed

src/Api/AppCatalog/AppCatalogApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Akeneo\Pim\ApiClient\Pagination\PageInterface;
1111
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface;
1212
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface;
13-
use Http\Promise\Promise;
13+
use GuzzleHttp\Promise\PromiseInterface;
1414

1515
/**
1616
* @copyright 2022 Akeneo SAS (https://www.akeneo.com)
@@ -62,7 +62,7 @@ public function delete(string $code): int
6262
return $this->resourceClient->deleteResource(static::APP_CATALOG_URI, [$code]);
6363
}
6464

65-
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise
65+
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface
6666
{
6767
return $this->resourceClient->upsertAsyncAndReturnPromise(static::APP_CATALOG_URI, [$code], $data, $onSuccess, $onFail);
6868
}

src/Api/AppCatalog/AppCatalogApiInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use Akeneo\Pim\ApiClient\Api\Operation\DeletableResourceInterface;
88
use Akeneo\Pim\ApiClient\Api\Operation\GettableResourceInterface;
99
use Akeneo\Pim\ApiClient\Api\Operation\ListableResourceInterface;
10-
use Http\Promise\Promise;
10+
use GuzzleHttp\Promise\PromiseInterface;
1111

1212
/**
1313
* @copyright 2022 Akeneo SAS (https://www.akeneo.com)
@@ -21,5 +21,5 @@ interface AppCatalogApiInterface extends
2121
public function create(array $data): array;
2222

2323
public function upsert(string $code, array $data = []): array;
24-
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise;
24+
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface;
2525
}

src/Api/AssetApi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Akeneo\Pim\ApiClient\Pagination\PageInterface;
1111
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface;
1212
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface;
13-
use Http\Promise\Promise;
13+
use GuzzleHttp\Promise\PromiseInterface;
1414
use Psr\Http\Message\StreamInterface;
1515

1616
/**
@@ -91,7 +91,7 @@ public function upsert(string $code, array $data = []): int
9191
return $this->resourceClient->upsertResource(static::ASSET_URI, [$code], $data);
9292
}
9393

94-
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise
94+
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface
9595
{
9696
return $this->resourceClient->upsertAsyncResource(static::ASSET_URI, [$code], $data, $onSuccess, $onFail);
9797
}
@@ -104,7 +104,7 @@ public function upsertList($resources): \Traversable
104104
return $this->resourceClient->upsertStreamResourceList(static::ASSETS_URI, [], $resources);
105105
}
106106

107-
public function upsertAsyncList(StreamInterface|array $resources, callable $onSuccess = null, callable $onFail = null): Promise
107+
public function upsertAsyncList(StreamInterface|array $resources, callable $onSuccess = null, callable $onFail = null): PromiseInterface
108108
{
109109
return $this->resourceClient->upsertAsyncStreamResourceList(self::ASSETS_URI, [], $resources, $onSuccess, $onFail);
110110
}

src/Api/AssetCategoryApi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Akeneo\Pim\ApiClient\Pagination\PageInterface;
1111
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface;
1212
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface;
13-
use Http\Promise\Promise;
13+
use GuzzleHttp\Promise\PromiseInterface;
1414
use Psr\Http\Message\StreamInterface;
1515

1616
/**
@@ -76,7 +76,7 @@ public function upsert(string $code, array $data = []): int
7676
return $this->resourceClient->upsertResource(static::ASSET_CATEGORY_URI, [$code], $data);
7777
}
7878

79-
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise
79+
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface
8080
{
8181
return $this->resourceClient->upsertAsyncResource(static::ASSET_CATEGORY_URI, [$code], $data, $onSuccess, $onFail);
8282
}
@@ -103,7 +103,7 @@ public function create(string $code, array $data = []): int
103103
return $this->resourceClient->createResource(static::ASSET_CATEGORIES_URI, [], $data);
104104
}
105105

106-
public function upsertAsyncList(StreamInterface|array $resources, callable $onSuccess = null, callable $onFail = null): Promise
106+
public function upsertAsyncList(StreamInterface|array $resources, callable $onSuccess = null, callable $onFail = null): PromiseInterface
107107
{
108108
return $this->resourceClient->upsertAsyncStreamResourceList(static::ASSET_CATEGORIES_URI, [], $resources, $onSuccess, $onFail);
109109
}

src/Api/AssetManager/AssetApi.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
use Akeneo\Pim\ApiClient\Pagination\PageFactoryInterface;
99
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorFactoryInterface;
1010
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface;
11-
use Http\Promise\Promise;
11+
use GuzzleHttp\Promise\PromiseInterface;
1212

1313
class AssetApi implements AssetApiInterface
1414
{
@@ -75,15 +75,15 @@ public function delete(string $assetFamilyCode, string $assetCode): int
7575
/**
7676
* {@inheritdoc}
7777
*/
78-
public function upsertAsync(string $assetFamilyCode, string $assetCode, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise
78+
public function upsertAsync(string $assetFamilyCode, string $assetCode, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface
7979
{
8080
return $this->resourceClient->upsertAsyncResource(static::ASSET_URI, [$assetFamilyCode, $assetCode], $data, $onSuccess, $onFail);
8181
}
8282

8383
/**
8484
* {@inheritdoc}
8585
*/
86-
public function upsertAsyncList(string $assetFamilyCode, array $assets, callable $onSuccess = null, callable $onFail = null): Promise
86+
public function upsertAsyncList(string $assetFamilyCode, array $assets, callable $onSuccess = null, callable $onFail = null): PromiseInterface
8787
{
8888
return $this->resourceClient->upsertAsyncJsonResourceList(static::ASSETS_URI, [$assetFamilyCode], $assets, $onSuccess, $onFail);
8989
}

src/Api/AssetManager/AssetApiInterface.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
use Akeneo\Pim\ApiClient\Exception\HttpException;
88
use Akeneo\Pim\ApiClient\Pagination\ResourceCursorInterface;
9-
use Http\Promise\Promise;
9+
use GuzzleHttp\Promise\PromiseInterface;
1010

1111
interface AssetApiInterface
1212
{
@@ -64,7 +64,7 @@ public function upsertList(string $assetFamilyCode, array $assets): array;
6464
*
6565
* @return Promise
6666
*/
67-
public function upsertAsync(string $assetFamilyCode, string $assetCode, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise;
67+
public function upsertAsync(string $assetFamilyCode, string $assetCode, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface;
6868

6969
/**
7070
* Updates or creates several assets.
@@ -76,7 +76,7 @@ public function upsertAsync(string $assetFamilyCode, string $assetCode, array $d
7676
*
7777
* @return Promise
7878
*/
79-
public function upsertAsyncList(string $assetFamilyCode, array $assets, callable $onSuccess = null, callable $onFail = null): Promise;
79+
public function upsertAsyncList(string $assetFamilyCode, array $assets, callable $onSuccess = null, callable $onFail = null): PromiseInterface;
8080

8181
/**
8282
* Deletes an asset.

src/Api/AssetManager/AssetAttributeApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Akeneo\Pim\ApiClient\Api\AssetManager;
66

77
use Akeneo\Pim\ApiClient\Client\ResourceClientInterface;
8-
use Http\Promise\Promise;
8+
use GuzzleHttp\Promise\PromiseInterface;
99

1010
class AssetAttributeApi implements AssetAttributeApiInterface
1111
{
@@ -44,7 +44,7 @@ public function upsert(string $assetFamilyCode, string $attributeCode, array $da
4444
/**
4545
* {@inheritdoc}
4646
*/
47-
public function upsertAsync(string $assetFamilyCode, string $attributeCode, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise
47+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface
4848
{
4949
return $this->resourceClient->upsertAsyncResource(static::ASSET_ATTRIBUTE_URI, [$assetFamilyCode, $attributeCode], $data, $onSuccess, $onFail);
5050
}

src/Api/AssetManager/AssetAttributeApiInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Akeneo\Pim\ApiClient\Api\AssetManager;
66

77
use Akeneo\Pim\ApiClient\Exception\HttpException;
8-
use Http\Promise\Promise;
8+
use GuzzleHttp\Promise\PromiseInterface;
99

1010
interface AssetAttributeApiInterface
1111
{
@@ -40,5 +40,5 @@ public function upsert(string $assetFamilyCode, string $attributeCode, array $da
4040
*
4141
* @return Promise
4242
*/
43-
public function upsertAsync(string $assetFamilyCode, string $attributeCode, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise;
43+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface;
4444
}

src/Api/AssetManager/AssetAttributeOptionApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Akeneo\Pim\ApiClient\Api\AssetManager;
66

77
use Akeneo\Pim\ApiClient\Client\ResourceClientInterface;
8-
use Http\Promise\Promise;
8+
use GuzzleHttp\Promise\PromiseInterface;
99

1010
class AssetAttributeOptionApi implements AssetAttributeOptionApiInterface
1111
{
@@ -51,7 +51,7 @@ public function upsert(string $assetFamilyCode, string $attributeCode, string $a
5151
);
5252
}
5353

54-
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = [], ?callable $onSuccess = null, ?callable $onFail = null): Promise
54+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = [], ?callable $onSuccess = null, ?callable $onFail = null): PromiseInterface
5555
{
5656
return $this->resourceClient->upsertAsyncResource(
5757
static::ASSET_ATTRIBUTE_OPTION_URI,

src/Api/AssetManager/AssetAttributeOptionApiInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Akeneo\Pim\ApiClient\Api\AssetManager;
66

77
use Akeneo\Pim\ApiClient\Exception\HttpException;
8-
use Http\Promise\Promise;
8+
use GuzzleHttp\Promise\PromiseInterface;
99

1010
interface AssetAttributeOptionApiInterface
1111
{
@@ -40,5 +40,5 @@ public function upsert(string $assetFamilyCode, string $attributeCode, string $a
4040
*
4141
* @return Promise
4242
*/
43-
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = [], callable $onSuccess = null, callable $onFail = null): Promise;
43+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface;
4444
}

0 commit comments

Comments
 (0)