Skip to content

Commit ac128f2

Browse files
authored
Merge pull request #50 from Kucoin/release/2025.05.29
Release/2025.05.29
2 parents 29e3646 + a90560c commit ac128f2

27 files changed

+174
-150
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ API documentation [Changelog](https://www.kucoin.com/docs-new/change-log)
44

55
Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313)
66

7+
## 2025-05-29(PHP 0.1.1-alpha)
8+
- Fix compatibility issues on non-macOS systems by enforcing case-sensitive PSR-4 autoloading.
9+
710
## 2025-05-27(GO 1.2.1)
811
- Fix the Golang type mapping: map OpenAPI number type to float64 to prevent overflow
912

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ generate: setup-logs
102102
$(call generate-code,golang,/pkg/generate,1.2.1)
103103
$(call generate-code,python,/kucoin_universal_sdk/generate)
104104
$(call generate-code,node,/src/generate)
105-
$(call generate-code,php,/src/Generate,0.1.0-alpha)
105+
$(call generate-code,php,/src/Generate,0.1.1-alpha)
106106

107107
.PHONY: gen-postman
108108
gen-postman: preprocessor

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ go mod tidy
5252
npm install kucoin-universal-sdk
5353
```
5454

55-
### PHP Installation(0.1.0-alpha)
55+
### PHP Installation(0.1.1-alpha)
5656
**Note**: This SDK is currently in the Alpha phase. We are actively iterating and improving its features, stability, and documentation. Feedback and contributions are highly encouraged to help us refine the SDK.
5757
```bash
58-
composer require kucoin/kucoin-universal-sdk=0.1.0-alpha
58+
composer require kucoin/kucoin-universal-sdk=0.1.1-alpha
5959
```
6060

6161
### Postman Installation

generator/plugin/src/main/java/com/kucoin/universal/sdk/plugin/generator/PhpSdkGenerator.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -434,10 +434,11 @@ public OperationsMap postProcessOperationsWithModels(OperationsMap objs, List<Mo
434434
Map<String, String> kv = new HashMap<>();
435435
kv.put("method", formatMethodName(k));
436436
kv.put("methodUppercase", camelize(formatMethodName(k)));
437-
kv.put("target_service", formatService(k + "API"));
437+
kv.put("target_service", formatService(k + "Api"));
438438
entryValue.add(kv);
439-
imports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%s;", v.getService(), v.getSubService(), formatService(k + "API")));
440-
implImports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%sImpl;", v.getService(), v.getSubService(), formatService(k + "API")));
439+
String servicePath = camelize(v.getSubService().toLowerCase(), CamelizeOption.UPPERCASE_FIRST_CHAR);
440+
imports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%s;", v.getService(), servicePath, formatService(k + "Api")));
441+
implImports.add(String.format("use KuCoin\\UniversalSDK\\Generate\\%s\\%s\\%sImpl;", v.getService(), servicePath, formatService(k + "Api")));
441442
}
442443
});
443444
Map<String, Object> apiEntryInfo = new HashMap<>();

generator/plugin/src/test/java/com/kucoin/universal/sdk/plugin/SdkGeneratorTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
public class SdkGeneratorTest {
99

1010
private static final String SDK_NAME = "php-sdk";
11-
private static final String SPEC_NAME = "../../spec/rest/api/openapi-account-fee.json";
12-
private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-spot.json";
11+
private static final String SPEC_NAME = "../../spec/rest/api/openapi-account-subaccount.json";
12+
private static final String SPEC_ENTRY_NAME = "../../spec/rest/entry/openapi-account.json";
1313
private static final String WS_SPEC_NAME = "../../spec/ws/openapi-margin-private.json";
1414
private static final String OUTPUT_DIR = "./out";
1515
private static final String CSV_PATH = "../../spec";

sdk/php/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ API documentation [Changelog](https://www.kucoin.com/docs-new/change-log)
44

55
Current synchronized API documentation version [20250313](https://www.kucoin.com/docs-new/change-log#20250313)
66

7+
## 2025-05-29(PHP 0.1.1-alpha)
8+
- Fix compatibility issues on non-macOS systems by enforcing case-sensitive PSR-4 autoloading.
9+
10+
## 2025-05-27(GO 1.2.1)
11+
- Fix the Golang type mapping: map OpenAPI number type to float64 to prevent overflow
12+
713
## 2025-05-26(PHP 0.1.0-alpha)
814
- Release PHP implementation
915

sdk/php/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM php:8.1-cli
2+
3+
RUN apt-get update && apt-get install -y unzip git \
4+
&& curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
5+
6+
WORKDIR /app
7+
COPY src ./src
8+
COPY composer.json ./
9+
COPY example ./example
10+
RUN composer install
11+
12+
WORKDIR /app/example
13+
#CMD ["php", "ExampleGetStarted.php"]
14+
CMD ["php", "ExampleWs.php"]

sdk/php/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ For an overview of the project and SDKs in other languages, refer to the [Main R
1313

1414
## 📦 Installation
1515

16-
### Latest Version: `0.1.0-alpha`
16+
### Latest Version: `0.1.1-alpha`
1717

1818
**Note**: This SDK is currently in the Alpha phase. We are actively iterating and improving its features, stability, and documentation. Feedback and contributions are highly encouraged to help us refine the SDK.
1919

2020
Install the SDK using `composer`:
2121

2222
```bash
23-
composer require kucoin/kucoin-universal-sdk=0.1.0-alpha
23+
composer require kucoin/kucoin-universal-sdk=0.1.1-alpha
2424
```
2525

2626
## 📖 Getting Started

sdk/php/src/Generate/Service/AccountService.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33

44
namespace KuCoin\UniversalSDK\Generate\Service;
55

6-
use KuCoin\UniversalSDK\Generate\Account\Account\AccountAPI;
7-
use KuCoin\UniversalSDK\Generate\Account\Deposit\DepositAPI;
8-
use KuCoin\UniversalSDK\Generate\Account\Fee\FeeAPI;
9-
use KuCoin\UniversalSDK\Generate\Account\SubAccount\SubAccountAPI;
10-
use KuCoin\UniversalSDK\Generate\Account\Transfer\TransferAPI;
11-
use KuCoin\UniversalSDK\Generate\Account\Withdrawal\WithdrawalAPI;
6+
use KuCoin\UniversalSDK\Generate\Account\Account\AccountApi;
7+
use KuCoin\UniversalSDK\Generate\Account\Deposit\DepositApi;
8+
use KuCoin\UniversalSDK\Generate\Account\Fee\FeeApi;
9+
use KuCoin\UniversalSDK\Generate\Account\Subaccount\SubAccountApi;
10+
use KuCoin\UniversalSDK\Generate\Account\Transfer\TransferApi;
11+
use KuCoin\UniversalSDK\Generate\Account\Withdrawal\WithdrawalApi;
1212

1313
interface AccountService
1414
{
15-
public function getAccountApi(): AccountAPI;
15+
public function getAccountApi(): AccountApi;
1616

17-
public function getDepositApi(): DepositAPI;
17+
public function getDepositApi(): DepositApi;
1818

19-
public function getWithdrawalApi(): WithdrawalAPI;
19+
public function getWithdrawalApi(): WithdrawalApi;
2020

21-
public function getFeeApi(): FeeAPI;
21+
public function getFeeApi(): FeeApi;
2222

23-
public function getSubAccountApi(): SubAccountAPI;
23+
public function getSubAccountApi(): SubAccountApi;
2424

25-
public function getTransferApi(): TransferAPI;
25+
public function getTransferApi(): TransferApi;
2626
}

sdk/php/src/Generate/Service/AccountServiceImpl.php

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@
33

44
namespace KuCoin\UniversalSDK\Generate\Service;
55

6-
use KuCoin\UniversalSDK\Generate\Account\Account\AccountAPI;
7-
use KuCoin\UniversalSDK\Generate\Account\Deposit\DepositAPI;
8-
use KuCoin\UniversalSDK\Generate\Account\Fee\FeeAPI;
9-
use KuCoin\UniversalSDK\Generate\Account\SubAccount\SubAccountAPI;
10-
use KuCoin\UniversalSDK\Generate\Account\Transfer\TransferAPI;
11-
use KuCoin\UniversalSDK\Generate\Account\Withdrawal\WithdrawalAPI;
12-
use KuCoin\UniversalSDK\Generate\Account\Account\AccountAPIImpl;
13-
use KuCoin\UniversalSDK\Generate\Account\Deposit\DepositAPIImpl;
14-
use KuCoin\UniversalSDK\Generate\Account\Fee\FeeAPIImpl;
15-
use KuCoin\UniversalSDK\Generate\Account\SubAccount\SubAccountAPIImpl;
16-
use KuCoin\UniversalSDK\Generate\Account\Transfer\TransferAPIImpl;
17-
use KuCoin\UniversalSDK\Generate\Account\Withdrawal\WithdrawalAPIImpl;
6+
use KuCoin\UniversalSDK\Generate\Account\Account\AccountApi;
7+
use KuCoin\UniversalSDK\Generate\Account\Deposit\DepositApi;
8+
use KuCoin\UniversalSDK\Generate\Account\Fee\FeeApi;
9+
use KuCoin\UniversalSDK\Generate\Account\Subaccount\SubAccountApi;
10+
use KuCoin\UniversalSDK\Generate\Account\Transfer\TransferApi;
11+
use KuCoin\UniversalSDK\Generate\Account\Withdrawal\WithdrawalApi;
12+
use KuCoin\UniversalSDK\Generate\Account\Account\AccountApiImpl;
13+
use KuCoin\UniversalSDK\Generate\Account\Deposit\DepositApiImpl;
14+
use KuCoin\UniversalSDK\Generate\Account\Fee\FeeApiImpl;
15+
use KuCoin\UniversalSDK\Generate\Account\Subaccount\SubAccountApiImpl;
16+
use KuCoin\UniversalSDK\Generate\Account\Transfer\TransferApiImpl;
17+
use KuCoin\UniversalSDK\Generate\Account\Withdrawal\WithdrawalApiImpl;
1818

1919
class AccountServiceImpl implements AccountService
2020
{
@@ -29,40 +29,40 @@ class AccountServiceImpl implements AccountService
2929
public function __construct($transport)
3030
{
3131
$this->transport = $transport;
32-
$this->account = new AccountAPIImpl($transport);
33-
$this->deposit = new DepositAPIImpl($transport);
34-
$this->withdrawal = new WithdrawalAPIImpl($transport);
35-
$this->fee = new FeeAPIImpl($transport);
36-
$this->subAccount = new SubAccountAPIImpl($transport);
37-
$this->transfer = new TransferAPIImpl($transport);
32+
$this->account = new AccountApiImpl($transport);
33+
$this->deposit = new DepositApiImpl($transport);
34+
$this->withdrawal = new WithdrawalApiImpl($transport);
35+
$this->fee = new FeeApiImpl($transport);
36+
$this->subAccount = new SubAccountApiImpl($transport);
37+
$this->transfer = new TransferApiImpl($transport);
3838
}
3939

40-
public function getAccountApi(): AccountAPI
40+
public function getAccountApi(): AccountApi
4141
{
4242
return $this->account;
4343
}
4444

45-
public function getDepositApi(): DepositAPI
45+
public function getDepositApi(): DepositApi
4646
{
4747
return $this->deposit;
4848
}
4949

50-
public function getWithdrawalApi(): WithdrawalAPI
50+
public function getWithdrawalApi(): WithdrawalApi
5151
{
5252
return $this->withdrawal;
5353
}
5454

55-
public function getFeeApi(): FeeAPI
55+
public function getFeeApi(): FeeApi
5656
{
5757
return $this->fee;
5858
}
5959

60-
public function getSubAccountApi(): SubAccountAPI
60+
public function getSubAccountApi(): SubAccountApi
6161
{
6262
return $this->subAccount;
6363
}
6464

65-
public function getTransferApi(): TransferAPI
65+
public function getTransferApi(): TransferApi
6666
{
6767
return $this->transfer;
6868
}

0 commit comments

Comments
 (0)