Skip to content

Commit 56ff280

Browse files
committed
DX-104 : Rollback on callback as it can be handled after the call
1 parent a4af16b commit 56ff280

Some content is hidden

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

41 files changed

+114
-152
lines changed

src/Api/AppCatalog/AppCatalogApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ 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): PromiseInterface
65+
public function upsertAsync(string $code, array $data = []): PromiseInterface
6666
{
67-
return $this->resourceClient->upsertAsyncAndReturnPromise(static::APP_CATALOG_URI, [$code], $data, $onSuccess, $onFail);
67+
return $this->resourceClient->upsertAsyncAndReturnPromise(static::APP_CATALOG_URI, [$code], $data);
6868
}
6969
}

src/Api/AppCatalog/AppCatalogApiInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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): PromiseInterface;
24+
public function upsertAsync(string $code, array $data = []): PromiseInterface;
2525
}

src/Api/AssetApi.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ 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): PromiseInterface
94+
public function upsertAsync(string $code, array $data = []): PromiseInterface
9595
{
96-
return $this->resourceClient->upsertAsyncResource(static::ASSET_URI, [$code], $data, $onSuccess, $onFail);
96+
return $this->resourceClient->upsertAsyncResource(static::ASSET_URI, [$code], $data);
9797
}
9898

9999
/**
@@ -104,8 +104,8 @@ 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): PromiseInterface
107+
public function upsertAsyncList(StreamInterface|array $resources): PromiseInterface
108108
{
109-
return $this->resourceClient->upsertAsyncStreamResourceList(self::ASSETS_URI, [], $resources, $onSuccess, $onFail);
109+
return $this->resourceClient->upsertAsyncStreamResourceList(self::ASSETS_URI, [], $resources);
110110
}
111111
}

src/Api/AssetCategoryApi.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,9 @@ 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): PromiseInterface
79+
public function upsertAsync(string $code, array $data = []): PromiseInterface
8080
{
81-
return $this->resourceClient->upsertAsyncResource(static::ASSET_CATEGORY_URI, [$code], $data, $onSuccess, $onFail);
81+
return $this->resourceClient->upsertAsyncResource(static::ASSET_CATEGORY_URI, [$code], $data);
8282
}
8383

8484
/**
@@ -103,8 +103,8 @@ 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): PromiseInterface
106+
public function upsertAsyncList(StreamInterface|array $resources): PromiseInterface
107107
{
108-
return $this->resourceClient->upsertAsyncStreamResourceList(static::ASSET_CATEGORIES_URI, [], $resources, $onSuccess, $onFail);
108+
return $this->resourceClient->upsertAsyncStreamResourceList(static::ASSET_CATEGORIES_URI, [], $resources);
109109
}
110110
}

src/Api/AssetManager/AssetApi.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,16 +75,16 @@ 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): PromiseInterface
78+
public function upsertAsync(string $assetFamilyCode, string $assetCode, array $data = []): PromiseInterface
7979
{
80-
return $this->resourceClient->upsertAsyncResource(static::ASSET_URI, [$assetFamilyCode, $assetCode], $data, $onSuccess, $onFail);
80+
return $this->resourceClient->upsertAsyncResource(static::ASSET_URI, [$assetFamilyCode, $assetCode], $data);
8181
}
8282

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

src/Api/AssetManager/AssetApiInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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): PromiseInterface;
67+
public function upsertAsync(string $assetFamilyCode, string $assetCode, array $data = []): 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): PromiseInterface;
79+
public function upsertAsyncList(string $assetFamilyCode, array $assets): 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
@@ -44,8 +44,8 @@ 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): PromiseInterface
47+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, array $data = []): PromiseInterface
4848
{
49-
return $this->resourceClient->upsertAsyncResource(static::ASSET_ATTRIBUTE_URI, [$assetFamilyCode, $attributeCode], $data, $onSuccess, $onFail);
49+
return $this->resourceClient->upsertAsyncResource(static::ASSET_ATTRIBUTE_URI, [$assetFamilyCode, $attributeCode], $data);
5050
}
5151
}

src/Api/AssetManager/AssetAttributeApiInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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): PromiseInterface;
43+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, array $data = []): PromiseInterface;
4444
}

src/Api/AssetManager/AssetAttributeOptionApiInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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): PromiseInterface;
43+
public function upsertAsync(string $assetFamilyCode, string $attributeCode, string $attributeOptionCode, array $data = []): PromiseInterface;
4444
}

src/Api/AssetManager/AssetFamilyApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ public function upsert(string $code, array $data = []): int
5959
/**
6060
* {@inheritdoc}
6161
*/
62-
public function upsertAsync(string $code, array $data = [], callable $onSuccess = null, callable $onFail = null): PromiseInterface
62+
public function upsertAsync(string $code, array $data = []): PromiseInterface
6363
{
64-
return $this->resourceClient->upsertAsyncResource(static::ASSET_FAMILY_URI, [$code], $data, $onSuccess, $onFail);
64+
return $this->resourceClient->upsertAsyncResource(static::ASSET_FAMILY_URI, [$code], $data);
6565
}
6666
}

0 commit comments

Comments
 (0)