mirror of
http://124.126.16.154:8888/singularity/hdk-pay.git
synced 2026-01-15 03:35:06 +08:00
build(hyperf): 迁移到 hyperf3.1
This commit is contained in:
@@ -14,24 +14,24 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.1",
|
"php": ">=8.2",
|
||||||
"composer/composer": ">=2.5.8",
|
"composer/composer": ">=2.5.8",
|
||||||
"hyperf/guzzle": "~3.0.0",
|
"hyperf/guzzle": "~3.0.0",
|
||||||
"moneyphp/money": "^4.1",
|
"moneyphp/money": "^4.1",
|
||||||
"singularity/hdk-core": "^1.0.0",
|
"singularity/hdk-core": "^1.0.0",
|
||||||
"hyperf/contract": "~3.0.0",
|
"hyperf/contract": "~3.1.0",
|
||||||
"hyperf/constants": "3.0.*",
|
"hyperf/constants": "3.1.*",
|
||||||
"hyperf/config": "~3.0.0",
|
"hyperf/config": "~3.1.0",
|
||||||
"hyperf/di": "~3.0.0",
|
"hyperf/di": "~3.1.0",
|
||||||
"hyperf/http-server": "3.0.*"
|
"hyperf/http-server": "3.1.*"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"cooper/hyperf-pest": "^1.1",
|
|
||||||
"firebase/php-jwt": "^6.8.0",
|
"firebase/php-jwt": "^6.8.0",
|
||||||
"phpunit/phpunit": "^9.6.9",
|
"hyperf/testing": "^3.1",
|
||||||
|
"friendsofhyperf/pest-plugin-hyperf": "3.1.*",
|
||||||
"swoole/ide-helper": "^4.8.13"
|
"swoole/ide-helper": "^4.8.13"
|
||||||
},
|
},
|
||||||
"minimum-stability": "alpha",
|
"minimum-stability": "beta",
|
||||||
"prefer-stable": true,
|
"prefer-stable": true,
|
||||||
"config": {
|
"config": {
|
||||||
"optimize-autoloader": true,
|
"optimize-autoloader": true,
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
"test": [
|
"test": [
|
||||||
"rm -rf runtime",
|
"rm -rf runtime",
|
||||||
"Composer\\Config::disableProcessTimeout",
|
"Composer\\Config::disableProcessTimeout",
|
||||||
"co-pest --prepend tests/bootstrap.php -c phpunit.xml --colors=always"
|
"APP_STATUS=false pest --coroutine --prepend=tests/bootstrap.php --colors=always $1"
|
||||||
],
|
],
|
||||||
"cs-fix": "php-cs-fixer fix $1",
|
"cs-fix": "php-cs-fixer fix $1",
|
||||||
"analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config"
|
"analyse": "phpstan analyse --memory-limit 300M -l 0 -c phpstan.neon ./app ./config"
|
||||||
|
|||||||
3609
composer.lock
generated
3609
composer.lock
generated
File diff suppressed because it is too large
Load Diff
10
phpunit.xml
10
phpunit.xml
@@ -1,10 +1,14 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php"
|
<phpunit
|
||||||
colors="true" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.5/phpunit.xsd">
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
<coverage/>
|
bootstrap="vendor/autoload.php"
|
||||||
|
colors="true"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
|
||||||
|
>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
<testsuite name="Pest">
|
<testsuite name="Pest">
|
||||||
<directory>./tests/</directory>
|
<directory>./tests/</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
</testsuites>
|
</testsuites>
|
||||||
|
<source/>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
|
||||||
docker run \
|
docker run \
|
||||||
--pull always \
|
--pull always \
|
||||||
-ti --rm --name "hdk-pay" \
|
-ti --rm --name "hdk-pay" \
|
||||||
-w "/srv/www" \
|
-w "/srv/www" \
|
||||||
-v "$(pwd)":/srv/www \
|
-v "$(pwd)":/srv/www \
|
||||||
-v ~/.ssh:/root/.ssh \
|
-v ~/.ssh:/root/.ssh \
|
||||||
harbor.luxcreo.cn/library/hyperf:8.1-swoole /bin/ash
|
harbor.luxcreo.cn/library/hyperf:8.2-swoole /bin/ash
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ test(
|
|||||||
* @throws GuzzleException
|
* @throws GuzzleException
|
||||||
*/
|
*/
|
||||||
function () {
|
function () {
|
||||||
$service = new GoodsRpc('http://192.168.2.218:9611');
|
$service = new GoodsRpc('http://192.168.2.246:9611');
|
||||||
$goods = $service->find(
|
$goods = $service->find(
|
||||||
1,
|
1,
|
||||||
[
|
[
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ use Singularity\HDK\Pay\Sdk\StripeRpc;
|
|||||||
|
|
||||||
test('能够正常创建 Stripe 订单', function () {
|
test('能够正常创建 Stripe 订单', function () {
|
||||||
/** @var StripeRpc $service */
|
/** @var StripeRpc $service */
|
||||||
$service = \Hyperf\Support\make(StripeRpc::class, ['baseUrl' => 'http://192.168.2.218:9611']);
|
$service = \Hyperf\Support\make(StripeRpc::class, ['baseUrl' => 'http://192.168.2.246:9611']);
|
||||||
$order = $service->createSession(
|
$order = $service->createSession(
|
||||||
money: Money::USD(51),
|
money: Money::USD(51),
|
||||||
uid: uniqid('NAT_'),
|
uid: uniqid('NAT_'),
|
||||||
@@ -33,7 +33,7 @@ test('能够正常创建 Stripe 订单', function () {
|
|||||||
|
|
||||||
test('能够正常获取 Stripe 配置信息', function () {
|
test('能够正常获取 Stripe 配置信息', function () {
|
||||||
/** @var StripeRpc $service */
|
/** @var StripeRpc $service */
|
||||||
$service = \Hyperf\Support\make(StripeRpc::class, ['baseUrl' => 'http://192.168.2.218:9611']);
|
$service = \Hyperf\Support\make(StripeRpc::class, ['baseUrl' => 'http://192.168.2.246:9611']);
|
||||||
$configures = $service->getConfigurations();
|
$configures = $service->getConfigurations();
|
||||||
|
|
||||||
expect($configures)
|
expect($configures)
|
||||||
|
|||||||
Reference in New Issue
Block a user