Commit ade006e2 authored by jianghaiming's avatar jianghaiming

Merge branch 'test' of https://gitlab.yidian-inc.com/bp/goods into test

parents b18651ba 3f0bd12f
...@@ -15,11 +15,6 @@ class ColonelConfigValidate extends BaseValidate ...@@ -15,11 +15,6 @@ class ColonelConfigValidate extends BaseValidate
'marketing_id' => 'marketing_id 参数不能为空', 'marketing_id' => 'marketing_id 参数不能为空',
]; ];
public function sceneDate()
{
return $this->only(["date"])->append("date", "require");
}
public function sceneAdd() public function sceneAdd()
{ {
return $this->only(["date","config","marketing_id"])->append("marketing_id", "require"); return $this->only(["date","config","marketing_id"])->append("marketing_id", "require");
......
...@@ -20,6 +20,12 @@ class ColonelDistributorColonel extends MysqlBase ...@@ -20,6 +20,12 @@ class ColonelDistributorColonel extends MysqlBase
const DEFAULT_COLUMN = ['colonel_id','user_id','take_place_id','phone','contact_name','colonel_source']; const DEFAULT_COLUMN = ['colonel_id','user_id','take_place_id','phone','contact_name','colonel_source'];
public static function getColonelUserIds()
{
$colonelUserData = ColonelDistributorColonel::select(['user_id']);
return array_column((array)$colonelUserData, 'user_id');
}
public static function getRecord(array $where, $column = '*') public static function getRecord(array $where, $column = '*')
{ {
return self::get($column, $where); return self::get($column, $where);
......
...@@ -18,6 +18,11 @@ class ColonelDistributorInviteOrderNum extends MysqlBase ...@@ -18,6 +18,11 @@ class ColonelDistributorInviteOrderNum extends MysqlBase
return self::get($columns, $where, $options); return self::get($columns, $where, $options);
} }
public static function getRecords(array $where, $column = '*')
{
return (array)self::select($column, $where);
}
public static function getRecordMaster($where, $columns = [], $options = []) public static function getRecordMaster($where, $columns = [], $options = [])
{ {
if (empty($columns)) { if (empty($columns)) {
...@@ -48,4 +53,4 @@ class ColonelDistributorInviteOrderNum extends MysqlBase ...@@ -48,4 +53,4 @@ class ColonelDistributorInviteOrderNum extends MysqlBase
{ {
return self::delete($where); return self::delete($where);
} }
} }
\ No newline at end of file
...@@ -21,6 +21,11 @@ class ColonelDistributorPayInfo extends MysqlBase ...@@ -21,6 +21,11 @@ class ColonelDistributorPayInfo extends MysqlBase
self::TYPE_FINISH_TARGET => "完成目标单数", self::TYPE_FINISH_TARGET => "完成目标单数",
]; ];
public static function getRecords(array $where, $column = '*')
{
return (array)self::select($column, $where);
}
public static function getRecord($where, $columns = [], $options = []) public static function getRecord($where, $columns = [], $options = [])
{ {
if (empty($columns)) { if (empty($columns)) {
...@@ -44,7 +49,7 @@ class ColonelDistributorPayInfo extends MysqlBase ...@@ -44,7 +49,7 @@ class ColonelDistributorPayInfo extends MysqlBase
public static function updateRecord($columns, $where) public static function updateRecord($columns, $where)
{ {
return self::update($columns, $where); return (int)self::update($columns, $where);
} }
public static function save($data, $where = [], $options = []) public static function save($data, $where = [], $options = [])
...@@ -59,4 +64,4 @@ class ColonelDistributorPayInfo extends MysqlBase ...@@ -59,4 +64,4 @@ class ColonelDistributorPayInfo extends MysqlBase
{ {
return self::delete($where); return self::delete($where);
} }
} }
\ No newline at end of file
<?php <?php
/**
* Created by PhpStorm.
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 2:23 下午
*/
use App\Base\Job; use App\Base\Job;
use Api\PhpServices\Idgen\Idgen; use Api\PhpServices\Idgen\Idgen;
use Api\PhpUtils\Log\FileLog;
use App\Models\marketing\mysql\ColonelDistributorColonel; use App\Models\marketing\mysql\ColonelDistributorColonel;
use App\Models\marketing\mysql\ColonelDistributorConfig; use App\Models\marketing\mysql\ColonelDistributorConfig;
use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum; use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum;
...@@ -10,251 +14,268 @@ use App\Models\marketing\mysql\ColonelDistributorPayInfo; ...@@ -10,251 +14,268 @@ use App\Models\marketing\mysql\ColonelDistributorPayInfo;
use App\Exception\custom\InterfaceException; use App\Exception\custom\InterfaceException;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use App\Models\user\mysql\UserWechatBind; use App\Models\user\mysql\UserWechatBind;
use App\Services\marketing\PindanActivityColonelConfigService;
use Api\PhpUtils\Log\JobLog;
class ColonelorderController extends Job class ColonelorderController extends Job
{ {
const DEFAULT_USER_BATCH_SIZE = 100; const REWARD_UNIT = 100; // 奖励单位: 分
const INVITE_NEW_USER_REWARD = 3 * self::REWARD_UNIT; // 邀请新用户奖励
const DEFAULT_USER_BATCH_SIZE = 100; // 批量处理数据条数
public $today; public $colonelConfigList; // 活动配置
public $yesterday; public $settlementDate; // 活动结算日
public $colonelConfig; public $startTime; // 活动结算日-开始时间
public $colonelConfigList; public $endTime; // 活动结算日-结束时间
/**
* Notes: 初始化-读取配置
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:13 下午
*/
public function init() public function init()
{ {
parent::init(); parent::init();
$this->today = date("Y-m-d"); $timeRange = PindanActivityColonelConfigService::getSettlementTimeRange();
$this->yesterday = date("Y-m-d", strtotime("-1 day")); $this->settlementDate = $timeRange['date'];
$this->colonelConfig = $this->getColonelConfig($this->yesterday); $this->startTime = $timeRange['start_time'];
if (!empty($this->colonelConfig)) { $this->endTime = $timeRange['end_time'];
$this->colonelConfigList = json_decode($this->colonelConfig['data'], true); $this->colonelConfigList = $this->getColonelConfig($this->settlementDate);
}
} }
/**
* Notes: 计算奖励脚本
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:05 下午
* @throws InterfaceException
*/
public function indexAction() public function indexAction()
{ {
FileLog::info("colonel_distributor_order", '团长分销-计算奖励脚本:start'); $this->loggerInfo('start');
$userIdList = $this->getColonelUserIds(); if ($userIdList = ColonelDistributorColonel::getColonelUserIds()) {
if (!empty($userIdList)) {
$userIdList = array_chunk($userIdList, self::DEFAULT_USER_BATCH_SIZE); $userIdList = array_chunk($userIdList, self::DEFAULT_USER_BATCH_SIZE);
$colonelPayInfoData = []; $colonelPayInfoData = [];
foreach ($userIdList as $userIds) { foreach ($userIdList as $userIds) {
// 完成目标单数 $this->getInviteOrderData($userIds, $colonelPayInfoData); // 完成目标单数
if ($inviteOrderData = $this->getInviteOrderData($userIds)) { $this->getInviteNewUserData($userIds, $colonelPayInfoData); // 邀请新用户奖励
$colonelPayInfoData = array_merge($colonelPayInfoData,$inviteOrderData);
}
// 邀请新用户奖励
if ($inviteNewUserData = $this->getInviteNewUserData($userIds)) {
$colonelPayInfoData = array_merge($colonelPayInfoData,$inviteNewUserData);
}
} }
$this->handleSavePayInfo($colonelPayInfoData); $this->handleSavePayInfo($colonelPayInfoData);
} }
FileLog::info("colonel_distributor_order", '团长分销-计算奖励脚本:end'); $this->loggerInfo('end');
echo "success";
} }
/** /**
* 保存奖励信息 * Notes: 保存奖励信息
* @param $yesterday * User: pengfei@yidian-inc.com
* @return true * Date: 2021/9/3 4:34 下午
* @param $colonelPayInfoData
*/ */
public function handleSavePayInfo($colonelPayInfoData) private function handleSavePayInfo($colonelPayInfoData)
{ {
FileLog::info("colonel_distributor_order", '团长分销-计算奖励脚本:colonelPayInfoCount='.count($colonelPayInfoData)); $this->loggerInfo('colonelPayInfoCount=' . count($colonelPayInfoData));
if (!empty($colonelPayInfoData)) { if (!empty($colonelPayInfoData)) {
$data = $this->addIdgenId($colonelPayInfoData); $data = $this->getFormatPayInfoData($colonelPayInfoData);
try { try {
ColonelDistributorPayInfo::beginTransaction(); ColonelDistributorPayInfo::beginTransaction();
if (!$this->addColonelDistributorPayInfo($data)) { if (!$this->addColonelDistributorPayInfo($data)) {
throw new \Exception(sprintf("写入错误参数 %s", json_encode($data))); throw new Exception(sprintf("写入错误参数 %s", json_encode($data)));
} }
if (!ColonelDistributorPayInfo::commit()) { if (!ColonelDistributorPayInfo::commit()) {
throw new \Exception(sprintf("事务提交失败 %s", json_encode($data))); throw new Exception(sprintf("事务提交失败 %s", json_encode($data)));
} }
} catch (\Exception $e) { $this->loggerInfo('success');
} catch (Exception $e) {
ColonelDistributorPayInfo::rollback(); ColonelDistributorPayInfo::rollback();
FileLog::info("add_colonel_distributor_pay_info", $e->getMessage()); $this->loggerError('error=' . $e->getMessage());
} }
} }
return true;
} }
/** /**
* 获取新用户奖励 * Notes: 获取新用户奖励
* @param $yesterday * User: pengfei@yidian-inc.com
* @return array * Date: 2021/9/3 4:47 下午
* @param $userIds
* @param $colonelPayInfoData
* @throws InterfaceException
*/ */
public function getInviteNewUserData($userIds) private function getInviteNewUserData($userIds, &$colonelPayInfoData)
{ {
$inviteNewUserList = $this->getInviteNewUserList($userIds, $this->today); if ($inviteNewUserList = $this->getInviteNewUserList($userIds, $this->startTime, $this->endTime)) {
$inviteOrderData = []; $userNickList = $this->getUserList(array_column($inviteNewUserList, 'user_id'));
if (!empty($inviteNewUserList)) {
$userNickList = $this->getUserList(array_column($inviteNewUserList, "user_id"));
foreach ($inviteNewUserList as $newUser) { foreach ($inviteNewUserList as $newUser) {
$payInfo = [ $colonelPayInfoData[] = [
"colonel_user_id" => $newUser["inviter_user_id"], 'date' => $this->settlementDate,
"date" => $this->yesterday, 'type' => ColonelDistributorPayInfo::TYPE_NEW_USER,
"type" => ColonelDistributorPayInfo::TYPE_NEW_USER, 'reward' => self::INVITE_NEW_USER_REWARD,
"reward" => 3 * 100, 'finish_num' => 1,
"finish_num" => 1, 'invite_user_id' => $newUser['user_id'],
"invite_user_id" => $newUser["user_id"], 'invite_user_nick' => empty($userNickList[$newUser['user_id']]['user_nick']) ? '' : $userNickList[$newUser['user_id']]['user_nick'],
"invite_user_nick" => empty($userNickList[$newUser["user_id"]]["user_nick"]) ? "" : $userNickList[$newUser["user_id"]]["user_nick"], 'colonel_user_id' => $newUser['inviter_user_id'],
]; ];
$inviteOrderData[] = $payInfo;
} }
} }
return $inviteOrderData;
} }
/** /**
* 获取完成目标单数奖励 * Notes: 获取完成目标单数奖励
* @param $yesterday * User: pengfei@yidian-inc.com
* @return array * Date: 2021/9/3 4:47 下午
* @param $userIds
* @param $colonelPayInfoData
*/ */
public function getInviteOrderData($userIds) private function getInviteOrderData($userIds, &$colonelPayInfoData)
{ {
//完成目标单数 if (!empty($this->colonelConfigList)) {
$inviteOrderData = []; $inviteOrderNumList = $this->getInviteOrderNum($userIds, $this->settlementDate);
if (empty($this->colonelConfigList)) { foreach ($inviteOrderNumList as $orderNum) {
return $inviteOrderData; foreach ($this->colonelConfigList as $config) {
} if ($orderNum['num'] >= $config['assess_order_num']) {
$inviteOrderNumList = $this->getInviteOrderNum($userIds, $this->yesterday, $this->today); $colonelPayInfoData[] = [
foreach ($inviteOrderNumList as $orderNum) { 'date' => $this->settlementDate,
foreach ($this->colonelConfigList as $config) { 'type' => ColonelDistributorPayInfo::TYPE_FINISH_TARGET,
if (!empty($orderNum["num"]) && $orderNum["num"] >= $config["assess_order_num"]) { 'reward' => $config['reward_amount'] * self::REWARD_UNIT,
$payInfo = [ 'finish_num' => $config['assess_order_num'],
"colonel_user_id" => $orderNum["colonel_user_id"], 'invite_user_id' => 0,
"date" => $this->yesterday, 'invite_user_nick' => '',
"type" => ColonelDistributorPayInfo::TYPE_FINISH_TARGET, 'colonel_user_id' => $orderNum['colonel_user_id'],
"reward" => $config["reward_amount"] * 100, ];
"finish_num" => $config["assess_order_num"], }
"invite_user_id" => 0,
"invite_user_nick" => "",
];
$inviteOrderData[] = $payInfo;
} }
} }
} }
return $inviteOrderData;
} }
/** /**
* 团长任务配置 * 团长任务配置
* @param $yesterday * @param $settlementDate
* @return \Api\PhpUtils\Mysql\MysqlBase
*/
public function getColonelConfig($yesterday)
{
$type = empty($params["type"]) ? ColonelDistributorConfig::TYPE_COLONEL : $params["type"];
$config = ColonelDistributorConfig::getRecord(["date" => $yesterday, "type" => $type]);
if (empty($config)) {
$config = ColonelDistributorConfig::getRecord([
"date[<=]" => $yesterday,
"ORDER" => ["date" => "DESC"],
"LIMIT" => 1
]);
}
return $config;
}
/**
* 团长user_id
* @return array * @return array
*/ */
public function getColonelUserIds() private function getColonelConfig($settlementDate): array
{ {
$colonelRes = ColonelDistributorColonel::select(["user_id"], ["LIMIT" => 10000000]); $config = ColonelDistributorConfig::getRecord([
$userIds = []; 'date[<=]' => $settlementDate,
if (!empty($colonelRes)) { 'type' => ColonelDistributorConfig::TYPE_COLONEL,
$userIds = array_column($colonelRes, "user_id"); 'ORDER' => ['date' => 'DESC'],
'LIMIT' => 1
]);
$configData = [];
if (!empty($config['data'])) {
$configData = json_decode($config['data'], true);
} }
return $userIds; return $configData;
} }
/** /**
* 获取order num * 获取order num
* @param $colonelUserIds * @param $colonelUserIds
* @param $startTime * @param $date
* @param $endTime * @return array
* @return \Api\PhpUtils\Mysql\MysqlBase
*/ */
public function getInviteOrderNum($colonelUserIds, $startTime, $endTime) private function getInviteOrderNum($colonelUserIds, $date): array
{ {
return ColonelDistributorInviteOrderNum::select( return ColonelDistributorInviteOrderNum::getRecords(
["colonel_user_id", "num", "date"],
[ [
"colonel_user_id" => $colonelUserIds, 'colonel_user_id' => $colonelUserIds,
"date[>=]" => $startTime, 'date' => $date,
"date[<]" => $endTime,
], ],
[] ['colonel_user_id', 'num']
); );
} }
/** /**
* 获取有效新用户信息 * Notes: 获取有效新用户信息
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:03 下午
* @param $userIds * @param $userIds
* @param $date * @param $startTime
* @return array|mixed * @param $endTime
* @return array
* @throws InterfaceException * @throws InterfaceException
*/ */
public function getInviteNewUserList($userIds, $date) private function getInviteNewUserList($userIds, $startTime, $endTime): array
{ {
$url = config('interface', 'coupon.background.wx_invite_relation_list_by_user_ids'); $url = config('interface', 'coupon.background.wx_invite_relation_list_by_user_ids');
if (empty($url)) { if (empty($url)) {
throw new InterfaceException(['cus' => 0]); throw new InterfaceException(['cus' => 0]);
} }
$res = HttpUtil::get($url, ["user_ids" => $userIds, "date" => $date]); $res = HttpUtil::get($url,
if (!empty($res["response"]["result"])) { ['user_ids' => $userIds, 'start_time' => $startTime, 'end_time' => $endTime]);
$res = array_column($res["response"]["result"], null, "user_id"); if (!empty($res['response']['result'])) {
return array_values($res); return array_values(array_column($res['response']['result'], null, 'user_id'));
} }
return []; return [];
} }
/** /**
* 给数据整理 colonel_distributor_pay_info_id * Notes: 获取pay_info数据
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:07 下午
* @param $data * @param $data
* @param string $type * @return array
* @return mixed
*/ */
public function addIdgenId($data, $type = "goods") private function getFormatPayInfoData($data): array
{ {
$count = count($data); $count = count($data);
$res = Idgen::get(appConfig('idgen.partner'), appConfig('idgen.key'), [], [[ $res = Idgen::get(appConfig('idgen.partner'), appConfig('idgen.key'), [], [
"type" => $type, [
'number' => 00, 'type' => 'goods',
"count" => $count]]); 'number' => 00,
$ids = $res['id_datetime'][$type] ?? []; 'count' => $count
]
]);
$ids = $res['id_datetime']['goods'] ?? [];
foreach ($data as $key => $item) { foreach ($data as $key => $item) {
$data[$key]["colonel_distributor_pay_info_id"] = $ids[$key]; $data[$key]['pay_info_trade_id'] = $ids[$key];
} }
return $data; return $data;
} }
/** /**
* 用户信息,获取昵称 * Notes: 用户信息,获取昵称
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:09 下午
* @param $userIds * @param $userIds
* @return \Api\PhpUtils\Mysql\MysqlBase|array * @return array
*/ */
public function getUserList($userIds) private function getUserList($userIds): array
{ {
$list = UserWechatBind::select(["user_id", "user_nick"], ["user_id" => $userIds], []); $list = UserWechatBind::select(['user_id', 'user_nick'], ['user_id' => $userIds], []);
if (!empty($list)) { return array_column((array)$list, null, 'user_id');
$list = array_column($list, null, "user_id");
}
return $list;
} }
/** /**
* 写入数据 * Notes: 写入数据
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:10 下午
* @param $data * @param $data
* @return \Api\PhpUtils\Mysql\MysqlBase * @return bool
*/
private function addColonelDistributorPayInfo($data): bool
{
return (int)ColonelDistributorPayInfo::save($data);
}
/**
* Notes: 记录 info 日志
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:10 下午
* @param $log
*/
private function loggerInfo($log)
{
JobLog::getInstance()->info('colonel_distributor_order', $log)->output();
}
/**
* Notes: 记录 error 日志
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:10 下午
* @param $log
*/ */
public function addColonelDistributorPayInfo($data) private function loggerError($log)
{ {
return ColonelDistributorPayInfo::save($data); JobLog::getInstance()->error('colonel_distributor_order', $log, null, 'bp-server@yidian-inc.com')->output();
} }
} }
\ No newline at end of file
<?php <?php
/**
* Created by PhpStorm.
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 2:23 下午
*/
use App\Base\Job; use App\Base\Job;
use Api\PhpUtils\Log\FileLog;
use App\Models\marketing\mysql\ColonelDistributorPayInfo; use App\Models\marketing\mysql\ColonelDistributorPayInfo;
use App\Exception\custom\InterfaceException; use App\Exception\custom\InterfaceException;
use Api\PhpUtils\Http\HttpUtil; use Api\PhpUtils\Http\HttpUtil;
use Api\PhpUtils\Log\JobLog;
class ColonelwalletController extends Job class ColonelwalletController extends Job
{ {
const CAPITAL_POOL_ID = 2; // 资金池id
const CAPITAL_POOL_OP = 200; //200:团长奖励
const WALLET_SERVICE_NAME = 11; // 10生活圈优惠券,11营销活动
const WALLET_SOURCE_NAME = 1; //使用方名,1生活圈,2主端
/**
* Notes: 奖励结算脚本
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:03 下午
* @throws InterfaceException
*/
public function indexAction() public function indexAction()
{ {
FileLog::info("colonel_distributor_wallet", '团长分销-奖励钱包脚本:start'); $this->loggerInfo('start');
$yesterday = date("Y-m-d", strtotime("-1 day")); $payInfoList = $this->getPayInfoList();
$payInfoList = $this->getPayInfo($yesterday); $this->loggerInfo('payInfoCount=' . count($payInfoList));
FileLog::info("colonel_distributor_wallet", '团长分销-奖励钱包脚本:payInfoCount='.count($payInfoList));
if (!empty($payInfoList)) { if (!empty($payInfoList)) {
if ($this->deductingInventory($payInfoList)) { if ($this->deductingInventory($payInfoList)) {
if ($this->toWallet($payInfoList)) { if ($this->toWallet($payInfoList)) {
$this->handlePayInfoStatus(array_column($payInfoList, 'pay_info_id')); if ($this->handlePayInfoStatus(array_column($payInfoList, 'pay_info_id'))) {
$this->loggerInfo('success');
} else {
$this->loggerError('更新状态失败');
}
} }
} }
} }
FileLog::info("colonel_distributor_wallet", '团长分销-奖励钱包脚本:end'); $this->loggerInfo('end');
echo "success";
}
/**
* colonel_distributor_pay_info 数据
* @param $date
* @return array
*/
public function getPayInfo($date)
{
$list = ColonelDistributorPayInfo::select("*", ["date" => $date,'status' => ColonelDistributorPayInfo::STATUS_NOT_USE], []);
$data = [];
if (!empty($list)) {
foreach ($list as $item) {
//去重
$key = $item["colonel_user_id"].$item["date"].$item["type"].$item["finish_num"];
$data[$key] = $item;
}
$data = array_values($data);
}
return $data;
} }
/** /**
* 写入钱包 * Notes: 结算写入钱包
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:04 下午
* @param $payInfoList
* @return bool
* @throws InterfaceException
*/ */
public function toWallet($payInfoList) private function toWallet($payInfoList): bool
{ {
$url = config('interface', 'wallet.account.transfer'); if (!$url = config('interface', 'wallet.account.transfer')) {
if (empty($url)) {
throw new InterfaceException(['cus' => 0]); throw new InterfaceException(['cus' => 0]);
} }
$data = []; $httpParams = self::getWalletHttpParams();
$list = [];
foreach ($payInfoList as $payInfo) { foreach ($payInfoList as $payInfo) {
if ($payInfo["type"] == ColonelDistributorPayInfo::TYPE_NEW_USER) { $list[] = [
$desc = "邀请新用户(".$payInfo["invite_user_nick"].")完成下单奖励"; 'user_id' => $payInfo['colonel_user_id'],
} 'service_name' => self::WALLET_SERVICE_NAME,
if ($payInfo["type"] == ColonelDistributorPayInfo::TYPE_FINISH_TARGET) { 'source_name' => self::WALLET_SOURCE_NAME,
$desc = "完成".$payInfo["finish_num"]."单用户下单奖励"; 'third_order_id' => $payInfo['pay_info_trade_id'],
} 'third_order_id_type' => $payInfo['type'],
$tmp = []; 'third_order_desc' => self::getThirdOrderDesc($payInfo),
$tmp["user_id"] = $payInfo["colonel_user_id"]; 'amount' => $payInfo['reward'],
$tmp["service_name"] = 11; //服务名字,10生活圈优惠券,11营销活动 'extra' => $payInfo
$tmp["source_name"] = 1; //使用方名,1生活圈,2主端 ];
$tmp["third_order_id"] = $payInfo["colonel_distributor_pay_info_id"];
$tmp["third_order_id_type"] = $payInfo["type"];
$tmp["third_order_desc"] = $desc;
$tmp["amount"] = $payInfo["reward"];
$tmp["extra"] = $payInfo;
$data[] = $tmp;
} }
$httpParams['list'] = $list;
$res = HttpUtil::post($url, ["list" => $data]); $response = HttpUtil::post($url, $httpParams, 100000, 3);
if ($res['code'] == 0 && isset($res['response']["result"])) { $this->loggerInfo("url=$url,response:" . json_encode($response));
$date = date("Y-m-d H:i:s"); if (!empty($response['response']['result']) && $response['code'] == 0) {
FileLog::info("colonel_distributor_to_wallet", $date." 写入钱包成功"); $this->loggerInfo('调用钱包服务成功,count=' . count($payInfoList));
return true; return true;
} else { } else {
$msg = json_encode(["list" => $data]); $this->loggerError('调用钱包服务失败,httpParams=' . json_encode($httpParams));
FileLog::error("colonel_distributor_to_wallet", $msg, null, 'bp-server@yidian-inc.com');
return false; return false;
} }
} }
/** /**
* 资金池授予用户奖励 * Notes: 资金池授予用户奖励
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:04 下午
* @param $payInfoList
* @return bool
* @throws InterfaceException
*/ */
public function deductingInventory($payInfoList) private function deductingInventory($payInfoList): bool
{ {
$url = config('interface', 'coupon.capitalpool.grant_user_amount'); if (!$url = config('interface', 'coupon.capitalpool.grant_user_amount')) {
if (empty($url)) {
throw new InterfaceException(['cus' => 0]); throw new InterfaceException(['cus' => 0]);
} }
$httpParams = [
$data["capital_pool_id"] = 2; 'capital_pool_id' => self::CAPITAL_POOL_ID
];
$body = [];
foreach ($payInfoList as $payInfo) { foreach ($payInfoList as $payInfo) {
if ($payInfo["type"] == ColonelDistributorPayInfo::TYPE_NEW_USER) { $body[] = [
$desc = "邀请新用户(".$payInfo["invite_user_nick"].")完成下单奖励"; 'op' => self::CAPITAL_POOL_OP,
} 'user_id' => $payInfo['colonel_user_id'],
if ($payInfo["type"] == ColonelDistributorPayInfo::TYPE_FINISH_TARGET) { 'amount' => $payInfo['reward'],
$desc = "完成".$payInfo["finish_num"]."单用户下单奖励"; 'third_order_id' => $payInfo['pay_info_trade_id'],
} 'third_order_id_type' => $payInfo['type'],
$tmp = []; 'third_order_desc' => self::getThirdOrderDesc($payInfo),
$tmp["op"] = 200; //200:团长奖励 ];
$tmp["user_id"] = $payInfo["colonel_user_id"];
$tmp["amount"] = $payInfo["reward"];
$tmp["third_order_id"] = $payInfo["colonel_distributor_pay_info_id"];
$tmp["third_order_id_type"] = $payInfo["type"];
$tmp["third_order_desc"] = $desc;
$data["body"][] = $tmp;
} }
$res = HttpUtil::post($url, $data, 100000, 3); $httpParams['body'] = $body;
if ($res['code'] == 0 && isset($res['response']["result"])) { $res = HttpUtil::post($url, $httpParams, 100000, 3);
$date = date("Y-m-d H:i:s"); $this->loggerInfo("url=$url,response:" . json_encode($res));
FileLog::info("colonel_distributor_deducting_inventory", $date." 资金池授予用户奖励成功"); if ($res['code'] == 0 && isset($res['response']['result'])) {
$this->loggerInfo('调用资金池服务成功,count=' . count($payInfoList));
return true; return true;
} else { } else {
$msg = json_encode(["list" => $data]); $this->loggerError('调用资金池服务失败,httpParams=' . json_encode($httpParams));
FileLog::error("colonel_distributor_deducting_inventory", $msg, null, 'bp-server@yidian-inc.com');
return false; return false;
} }
} }
/** /**
* 修改状态 * Notes: 获取钱包服务请求参数
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 7:34 下午
* @return array
*/
private function getWalletHttpParams(): array
{
// TODO 此处看后期业务发展 看是否需要封装WalletSdk
$date = date('Y-m-d H:i:s');
return [
'transfer_service_id' => appConfig('colonel.wallet.transfer_service_id'),
'sign' => self::getWalletHttpSign($date),
'time' => $date
];
}
/**
* Notes: 获取钱包签名
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 7:34 下午
* @param $date
* @return string
*/
private function getWalletHttpSign($date): string
{
return md5($date . appConfig('colonel.wallet.transfer_service_secret'));
}
/**
* Notes: 获取待结算数据
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 7:23 下午
* @return array
*/
private function getPayInfoList(): array
{
return ColonelDistributorPayInfo::getRecords(['status' => ColonelDistributorPayInfo::STATUS_NOT_USE]);
}
/**
* Notes: 获取描述信息
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:10 下午
* @param $payInfo
* @return string
*/
private function getThirdOrderDesc($payInfo): string
{
$desc = '';
if ($payInfo['type'] == ColonelDistributorPayInfo::TYPE_NEW_USER) {
$desc = "邀请新用户(" . $payInfo["invite_user_nick"] . ")完成下单奖励";
} elseif ($payInfo['type'] == ColonelDistributorPayInfo::TYPE_FINISH_TARGET) {
$desc = "完成" . $payInfo["finish_num"] . "单用户下单奖励";
}
return $desc;
}
/**
* Notes: 修改状态
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 6:09 下午
* @param array $payInfoIds
* @return bool
*/
private function handlePayInfoStatus(array $payInfoIds): bool
{
return ColonelDistributorPayInfo::updateRecord(['status' => ColonelDistributorPayInfo::STATUS_USE],
['pay_info_id' => $payInfoIds]);
}
/**
* Notes: 记录 info 日志
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:10 下午
* @param $log
*/
private function loggerInfo($log)
{
JobLog::getInstance()->info('colonel_distributor_wallet', $log, false)->output();
}
/**
* Notes: 记录 error 日志
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 4:10 下午
* @param $log
*/ */
public function handlePayInfoStatus(array $payInfoIds) private function loggerError($log)
{ {
return ColonelDistributorPayInfo::updateRecord(['status' => ColonelDistributorPayInfo::STATUS_USE], ['pay_info_id' => $payInfoIds]); JobLog::getInstance()->error('colonel_distributor_wallet', $log, null, 'bp-server@yidian-inc.com')->output();
} }
} }
\ No newline at end of file
...@@ -68,8 +68,6 @@ class ColonelController extends Base ...@@ -68,8 +68,6 @@ class ColonelController extends Base
*/ */
public function colonel_configAction() public function colonel_configAction()
{ {
(new ColonelConfigValidate())->scene("date")->validate();
$params = $this->params; $params = $this->params;
$data = PindanActivityColonelConfigService::colonelConfig($params); $data = PindanActivityColonelConfigService::colonelConfig($params);
return $this->success(["result" => $data]); return $this->success(["result" => $data]);
......
...@@ -212,7 +212,7 @@ class MarketingController extends Base ...@@ -212,7 +212,7 @@ class MarketingController extends Base
$this->params['sort_field'] = 'end_time'; $this->params['sort_field'] = 'end_time';
$this->params['sort_type'] = 'desc'; $this->params['sort_type'] = 'desc';
$this->params['need_buy_num'] = false; $this->params['need_buy_num'] = false;
$this->params['online_status'] = [Marketing::ONLINE_STATUS_QIDONG,Marketing::ONLINE_STATUS_GUANBI];//状态 , 1启用,2关闭,3 到期 $this->params['online_status'] = [Marketing::ONLINE_STATUS_QIDONG, Marketing::ONLINE_STATUS_GUANBI, Marketing::ONLINE_STATUS_DAOQI];//状态 , 1启用,2关闭,3 到期
$this->params['activity_status'] = MarketingPindan::ACTIVITY_STATUS_FINISHED;//1 未开始,2进行中,3已结束, 4当日上新(即将开始) $this->params['activity_status'] = MarketingPindan::ACTIVITY_STATUS_FINISHED;//1 未开始,2进行中,3已结束, 4当日上新(即将开始)
$list['end'] = MarketingService::marketingList($this->params)['result']; $list['end'] = MarketingService::marketingList($this->params)['result'];
$list['end'] = $list['end'] ? array_column($list['end'], null, 'marketing_id') : []; $list['end'] = $list['end'] ? array_column($list['end'], null, 'marketing_id') : [];
......
...@@ -66,7 +66,8 @@ class ColonelService ...@@ -66,7 +66,8 @@ class ColonelService
*/ */
public static function isApply($userId): array public static function isApply($userId): array
{ {
$applyInfo = ColonelDistributorColonelApply::getRecord(['user_id' => $userId], ['colonel_apply_id','audit_status']); $applyInfo = ColonelDistributorColonelApply::getRecord(['user_id' => $userId],
['colonel_apply_id', 'audit_status']);
return [ return [
// -1.未申请 0.未审核 1.审核通过 2.审核未通过 // -1.未申请 0.未审核 1.审核通过 2.审核未通过
'apply_status' => isset($applyInfo['audit_status']) ? intval($applyInfo['audit_status']) : -1 'apply_status' => isset($applyInfo['audit_status']) ? intval($applyInfo['audit_status']) : -1
...@@ -83,12 +84,13 @@ class ColonelService ...@@ -83,12 +84,13 @@ class ColonelService
*/ */
public static function getManageApplyList(array $params): array public static function getManageApplyList(array $params): array
{ {
$params = self::getPageParams($params); $params = self::getPageParams($params);
$result = ColonelDistributorColonelApply::getPages([], ColonelDistributorColonelApply::DEFAULT_COLUMN, $params['page'], $params['page_size']); $result = ColonelDistributorColonelApply::getPages([], ColonelDistributorColonelApply::DEFAULT_COLUMN,
$params['page'], $params['page_size']);
if (empty($result['count'])) { if (empty($result['count'])) {
return $result; return $result;
} }
$userMap = self::getUserMap(array_column($result['result'], 'user_id')); $userMap = self::getUserMap(array_column($result['result'], 'user_id'));
$takePlaceMap = self::getColonelTakePlaceMap(array_column($result['result'], 'colonel_apply_id')); $takePlaceMap = self::getColonelTakePlaceMap(array_column($result['result'], 'colonel_apply_id'));
foreach ($result['result'] as &$applyVal) { foreach ($result['result'] as &$applyVal) {
$applyVal['user_avatar'] = !empty($userMap[$applyVal['user_id']]['user_avatar']) ? $userMap[$applyVal['user_id']]['user_avatar'] : ''; $applyVal['user_avatar'] = !empty($userMap[$applyVal['user_id']]['user_avatar']) ? $userMap[$applyVal['user_id']]['user_avatar'] : '';
...@@ -114,8 +116,9 @@ class ColonelService ...@@ -114,8 +116,9 @@ class ColonelService
*/ */
public static function getManageList(array $params): array public static function getManageList(array $params): array
{ {
$params = self::getPageParams($params); $params = self::getPageParams($params);
$result = ColonelDistributorColonel::getPages([], ColonelDistributorColonel::DEFAULT_COLUMN, $params['page'], $params['page_size']); $result = ColonelDistributorColonel::getPages([], ColonelDistributorColonel::DEFAULT_COLUMN, $params['page'],
$params['page_size']);
if (empty($result['count'])) { if (empty($result['count'])) {
return $result; return $result;
} }
...@@ -124,9 +127,9 @@ class ColonelService ...@@ -124,9 +127,9 @@ class ColonelService
$incomeMap = PindanActivityInviteOrderService::incomeStatistics(["user_ids" => $userIds]); $incomeMap = PindanActivityInviteOrderService::incomeStatistics(["user_ids" => $userIds]);
foreach ($result['result'] as &$colonelVal) { foreach ($result['result'] as &$colonelVal) {
$userId = $colonelVal['user_id']; $userId = $colonelVal['user_id'];
$colonelVal['user_avatar'] = !empty($userMap[$userId]['user_avatar']) ? $userMap[$userId]['user_avatar'] : ''; $colonelVal['user_avatar'] = !empty($userMap[$userId]['user_avatar']) ? $userMap[$userId]['user_avatar'] : '';
$colonelVal['yesterday_income'] = !empty($incomeMap[$userId]['yesterday_reward']) ? $incomeMap[$userId]['yesterday_reward'] : 0; $colonelVal['yesterday_income'] = !empty($incomeMap[$userId]['yesterday_reward']) ? $incomeMap[$userId]['yesterday_reward'] : 0;
$colonelVal['total_income'] = !empty($incomeMap[$userId]['all_reward']) ? $incomeMap[$userId]['all_reward'] : 0; $colonelVal['total_income'] = !empty($incomeMap[$userId]['all_reward']) ? $incomeMap[$userId]['all_reward'] : 0;
} }
unset($colonelVal); unset($colonelVal);
return $result; return $result;
...@@ -144,7 +147,8 @@ class ColonelService ...@@ -144,7 +147,8 @@ class ColonelService
public static function handleManageAudit($applyId, $auditStatus): bool public static function handleManageAudit($applyId, $auditStatus): bool
{ {
// 审核状态参数检测 // 审核状态参数检测
if (!in_array($auditStatus, [ColonelDistributorColonelApply::STATUS_PASS,ColonelDistributorColonelApply::STATUS_REJECT])) { if (!in_array($auditStatus,
[ColonelDistributorColonelApply::STATUS_PASS, ColonelDistributorColonelApply::STATUS_REJECT])) {
throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS); throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS);
} }
// 审核状态数据检测 // 审核状态数据检测
...@@ -155,7 +159,8 @@ class ColonelService ...@@ -155,7 +159,8 @@ class ColonelService
try { try {
ColonelDistributorColonelApply::beginTransaction(); ColonelDistributorColonelApply::beginTransaction();
// 修改申请状态 // 修改申请状态
$updateStatus = ColonelDistributorColonelApply::updateRecord(['audit_status' => $auditStatus], ['colonel_apply_id' => $applyId,'audit_status' => ColonelDistributorColonelApply::STATUS_AUDIT]); $updateStatus = ColonelDistributorColonelApply::updateRecord(['audit_status' => $auditStatus],
['colonel_apply_id' => $applyId, 'audit_status' => ColonelDistributorColonelApply::STATUS_AUDIT]);
if (empty($updateStatus)) { if (empty($updateStatus)) {
throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS_FAILED); throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS_FAILED);
} }
...@@ -265,7 +270,7 @@ class ColonelService ...@@ -265,7 +270,7 @@ class ColonelService
*/ */
private static function getUserMap(array $userIds): array private static function getUserMap(array $userIds): array
{ {
$userWechatList = UserWechatBind::getRecords(['user_id' => $userIds], ['user_id','user_nick','user_avatar']); $userWechatList = UserWechatBind::getRecords(['user_id' => $userIds], ['user_id', 'user_nick', 'user_avatar']);
return array_column((array)$userWechatList, null, 'user_id'); return array_column((array)$userWechatList, null, 'user_id');
} }
...@@ -278,7 +283,8 @@ class ColonelService ...@@ -278,7 +283,8 @@ class ColonelService
*/ */
private static function getColonelTakePlaceMap(array $colonelApplyIds): array private static function getColonelTakePlaceMap(array $colonelApplyIds): array
{ {
$colonels = ColonelDistributorColonel::getRecords(['colonel_apply_id' => $colonelApplyIds], ['colonel_apply_id','take_place_id']); $colonels = ColonelDistributorColonel::getRecords(['colonel_apply_id' => $colonelApplyIds],
['colonel_apply_id', 'take_place_id']);
return array_column((array)$colonels, 'take_place_id', 'colonel_apply_id'); return array_column((array)$colonels, 'take_place_id', 'colonel_apply_id');
} }
...@@ -291,8 +297,8 @@ class ColonelService ...@@ -291,8 +297,8 @@ class ColonelService
*/ */
private static function getPageParams(array $params = []): array private static function getPageParams(array $params = []): array
{ {
$params['page'] = !empty($params['page']) ? $params['page'] : 1; $params['page'] = !empty($params['page']) ? $params['page'] : 1;
$params['page_size'] = !empty($params['page_size']) ? $params['page_size'] : 20; $params['page_size'] = !empty($params['page_size']) ? $params['page_size'] : 20;
return $params; return $params;
} }
} }
...@@ -65,9 +65,16 @@ class PindanActivityColonelConfigService ...@@ -65,9 +65,16 @@ class PindanActivityColonelConfigService
*/ */
public static function colonelConfig($params = []) public static function colonelConfig($params = [])
{ {
$day = empty($params["date"]) ? date("Y-m-d") : $params["date"]; $day = $params["date"];
$type = empty($params["type"]) ? ColonelDistributorConfig::TYPE_COLONEL : $params["type"]; $type = empty($params["type"]) ? ColonelDistributorConfig::TYPE_COLONEL : $params["type"];
$config = ColonelDistributorConfig::getRecord(["date" => $day, "type" => $type]); if(empty($day)) {
//默认取最近更新的一条配置
$config = ColonelDistributorConfig::getRecord([
"type" => $type,"ORDER" => ["update_time" => "DESC"], "LIMIT" => 1
]);
}else {
$config = ColonelDistributorConfig::getRecord(["date" => $day, "type" => $type]);
}
if (empty($config)) { if (empty($config)) {
$config = ColonelDistributorConfig::getRecord([ $config = ColonelDistributorConfig::getRecord([
"date[<=]" => $day, "date[<=]" => $day,
...@@ -99,14 +106,8 @@ class PindanActivityColonelConfigService ...@@ -99,14 +106,8 @@ class PindanActivityColonelConfigService
*/ */
public static function getTaskData($params = []) public static function getTaskData($params = [])
{ {
$hour = date("H"); $timeRange = self::getActivityTimeRange();
if ($hour < 10 && $hour > 0) { $date = date("Y-m-d", strtotime($timeRange["start_time"]));
$date = date("Y-m-d", strtotime("-1 day"));
} elseif ($hour > 16) {
$date = date("Y-m-d");
} else {
$date = date("Y-m-d");
}
$configList = self::colonelConfig(["date" => $date, "type" => ColonelDistributorConfig::TYPE_COLONEL]); $configList = self::colonelConfig(["date" => $date, "type" => ColonelDistributorConfig::TYPE_COLONEL]);
$marketingId = empty($configList[0]["marketing_id"]) ? 0 : $configList[0]["marketing_id"]; $marketingId = empty($configList[0]["marketing_id"]) ? 0 : $configList[0]["marketing_id"];
...@@ -144,15 +145,38 @@ class PindanActivityColonelConfigService ...@@ -144,15 +145,38 @@ class PindanActivityColonelConfigService
public static function getActivityTimeRange() : array public static function getActivityTimeRange() : array
{ {
// 获取活动时间范围 例如活动时间(2021-09-03) --- 2021-09-03:12:00:00 - 2021-09-04:12:00:00 // 获取活动时间范围 例如活动时间(2021-09-03) --- 2021-09-03:12:00:00 - 2021-09-04:12:00:00
$hour = ' '.self::ACTIVITY_DEFAULT_HOUR . ":00:00"; $hour = ' '.self::ACTIVITY_DEFAULT_HOUR . ':00:00';
if (date("H") >= 12) { if (date('H') >= self::ACTIVITY_DEFAULT_HOUR) {
$startTime = date("Y-m-d").$hour; $startTime = date('Y-m-d').$hour;
$endTime = date("Y-m-d", strtotime("+1 day")).$hour; $endTime = date('Y-m-d', strtotime('+1 day')).$hour;
} else { } else {
$startTime = date("Y-m-d", strtotime("-1 day")).$hour; $startTime = date('Y-m-d', strtotime('-1 day')).$hour;
$endTime = date("Y-m-d").$hour; $endTime = date('Y-m-d').$hour;
} }
return ['start_time' => $startTime,'end_time' => $endTime]; return [
'start_time' => $startTime,
'end_time' => $endTime,
'date' => date('Y-m-d', strtotime($startTime))
];
}
/**
* Notes: 获取结算时间范围
* User: pengfei@yidian-inc.com
* Date: 2021/9/3 2:50 下午
* @return string[]
*/
public static function getSettlementTimeRange() : array
{
// 获取活动时间范围 例如当前时间(2021-09-03 12:00:00) 应结算时间为 2021-08-31-:12:00:00 - 2021-09-01:12:00:00
$hour = ' '.self::ACTIVITY_DEFAULT_HOUR . ':00:00';
$startTime = date('Y-m-d', strtotime('-3 day')).$hour;
$endTime = date('Y-m-d', strtotime('-2 day')).$hour;
return [
'start_time' => $startTime,
'end_time' => $endTime,
'date' => date('Y-m-d', strtotime($startTime))
];
} }
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ namespace App\Services\marketing; ...@@ -4,6 +4,7 @@ namespace App\Services\marketing;
use App\Exception\custom\MarketingException; use App\Exception\custom\MarketingException;
use App\Models\marketing\mysql\ColonelDistributorColonel; use App\Models\marketing\mysql\ColonelDistributorColonel;
use App\Models\marketing\mysql\ColonelDistributorConfig;
use App\Models\marketing\mysql\ColonelDistributorInviteOrder; use App\Models\marketing\mysql\ColonelDistributorInviteOrder;
use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum; use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum;
use App\Models\marketing\mysql\ColonelDistributorPayInfo; use App\Models\marketing\mysql\ColonelDistributorPayInfo;
...@@ -32,11 +33,9 @@ class PindanActivityInviteOrderService ...@@ -32,11 +33,9 @@ class PindanActivityInviteOrderService
return true; return true;
} }
$date = date("Y-m-d");
$inviteOrderNumData = [ $inviteOrderNumData = [
"colonel_user_id" => $params["colonel_user_id"], "colonel_user_id" => $params["colonel_user_id"],
"date" => $date, "date" => date("Y-m-d")
]; ];
$inviteOrderNum = ColonelDistributorInviteOrderNum::selectMaster("*", $inviteOrderNumData, []); $inviteOrderNum = ColonelDistributorInviteOrderNum::selectMaster("*", $inviteOrderNumData, []);
...@@ -75,10 +74,9 @@ class PindanActivityInviteOrderService ...@@ -75,10 +74,9 @@ class PindanActivityInviteOrderService
"order_id" => $orderId, "order_id" => $orderId,
]; ];
$date = date("Y-m-d");
$inviteOrderNumData = [ $inviteOrderNumData = [
"colonel_user_id" => $inviteOrder[0]["colonel_user_id"], "colonel_user_id" => $inviteOrder[0]["colonel_user_id"],
"date" => $date, "date" => date("Y-m-d"),
]; ];
ColonelDistributorInviteOrder::beginTransaction(); ColonelDistributorInviteOrder::beginTransaction();
...@@ -98,22 +96,13 @@ class PindanActivityInviteOrderService ...@@ -98,22 +96,13 @@ class PindanActivityInviteOrderService
} }
/** /**
* 团长分销,昨日收入,总收入 * 团长分销,总收入
* @param array $params * @param array $params
* @return array * @return array
*/ */
public static function incomeStatistics($params = []) public static function incomeStatistics($params = [])
{ {
$userIds = $params["user_ids"]; $userIds = $params["user_ids"];
$yesterday = date("Y-m-d", strtotime("-1 day"));
$yesterdayRewards = ColonelDistributorPayInfo::select(["colonel_user_id", "reward"], ["date" => $yesterday, "colonel_user_id" => $userIds], []);
$yesterdayData = [];
if (!empty($yesterdayRewards)) {
foreach ($yesterdayRewards as $item) {
$yesterdayData[$item["colonel_user_id"]][] = $item["reward"];
}
}
$allRewards = ColonelDistributorPayInfo::select(["colonel_user_id", "reward"], ["colonel_user_id" => $userIds], []); $allRewards = ColonelDistributorPayInfo::select(["colonel_user_id", "reward"], ["colonel_user_id" => $userIds], []);
$allData = []; $allData = [];
...@@ -125,11 +114,7 @@ class PindanActivityInviteOrderService ...@@ -125,11 +114,7 @@ class PindanActivityInviteOrderService
$data = []; $data = [];
foreach ($userIds as $userId) { foreach ($userIds as $userId) {
$data[$userId]["yesterday_reward"] = 0;
$data[$userId]["all_reward"] = 0; $data[$userId]["all_reward"] = 0;
if (!empty($yesterdayData[$userId])) {
$data[$userId]["yesterday_reward"] = sprintf("%.1f", array_sum($yesterdayData[$userId]) / 100);
}
if (!empty($allData[$userId])) { if (!empty($allData[$userId])) {
$data[$userId]["all_reward"] = sprintf("%.1f", array_sum($allData[$userId]) / 100); $data[$userId]["all_reward"] = sprintf("%.1f", array_sum($allData[$userId]) / 100);
} }
...@@ -138,6 +123,81 @@ class PindanActivityInviteOrderService ...@@ -138,6 +123,81 @@ class PindanActivityInviteOrderService
return $data; return $data;
} }
/**
* 未结算收益
* @param $userIds
*/
private static function noSettlementStatistics($userIds)
{
$timeRange = self::getNoSettlementTimeRange();
$inviteOrderNumList = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num", "date"], [
"create_time[>]" => $timeRange["start_time"],
"create_time[<]" => $timeRange["end_time"],
], []);
if (!empty($inviteOrderNumList)) {
foreach ($inviteOrderNumList as $inviteOrderNum) {
}
}
}
/**
* 获取未结算收益的时间段
* @return array|string[]
*/
public static function getNoSettlementTimeRange() : array
{
// 获取活动时间范围
// 例如当前时间(2021-09-03 11:00:00) 应结算时间为 2021-08-31 12:00:00 ~ 2021-09-03:12:00:00
// 例如当前时间(2021-09-03 13:00:00) 应结算时间为 2021-09-01 12:00:00 ~ 2021-09-03:12:00:00
$nowHour = date("H");
$hour = ' '.PindanActivityColonelConfigService::ACTIVITY_DEFAULT_HOUR . ':00:00';
if ($nowHour < 12) {
$startTime = date('Y-m-d', strtotime('-3 day')).$hour;
} else {
$startTime = date('Y-m-d', strtotime('-2 day')).$hour;
}
$endTime = date("Y-m-d").$hour;
return [
'start_time' => $startTime,
'end_time' => $endTime,
];
}
/**
* 指定日期的团长配置
* @param $date
* @return array|mixed
*/
private static function getColonelConfig($date)
{
$config = ColonelDistributorConfig::getRecord([
'date' => $date,
'type' => ColonelDistributorConfig::TYPE_COLONEL
]);
if (empty($config)) {
$config = ColonelDistributorConfig::getRecord([
'date[<=]' => $date,
'ORDER' => ['date' => 'DESC'],
'LIMIT' => 1
]);
}
$configData = [];
if (empty($config['data'])) {
$configData = json_decode($config['data'], true);
}
return $configData;
}
/** /**
* 团长分销,昨日转化单数,总转化单数 * 团长分销,昨日转化单数,总转化单数
* @param array $params * @param array $params
...@@ -146,22 +206,12 @@ class PindanActivityInviteOrderService ...@@ -146,22 +206,12 @@ class PindanActivityInviteOrderService
public static function inviteOrderNumberStatistics($params = []) public static function inviteOrderNumberStatistics($params = [])
{ {
$userIds = $params["user_ids"]; $userIds = $params["user_ids"];
$yesterday = date("Y-m-d", strtotime("-1 day"));
$yesterdayNums = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num"],
["date" => $yesterday, "colonel_user_id" => $userIds], []);
$yesterdayData = array_column($yesterdayNums, null, "colonel_user_id");
$allNums = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num"], ["colonel_user_id" => $userIds], []); $allNums = ColonelDistributorInviteOrderNum::select(["colonel_user_id", "num"], ["colonel_user_id" => $userIds], []);
$allData = array_column($allNums, null, "colonel_user_id"); $allData = array_column($allNums, null, "colonel_user_id");
$data = []; $data = [];
foreach ($userIds as $userId) { foreach ($userIds as $userId) {
$data[$userId]["yesterday_order_num"] = 0;
$data[$userId]["all_order_num"] = 0; $data[$userId]["all_order_num"] = 0;
if (!empty($yesterdayData[$userId])) {
$data[$userId]["yesterday_order_num"] = $yesterdayData[$userId]["num"];
}
if (!empty($allData[$userId])) { if (!empty($allData[$userId])) {
$data[$userId]["all_order_num"] = $allData[$userId]["num"]; $data[$userId]["all_order_num"] = $allData[$userId]["num"];
} }
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
"require": { "require": {
"php": "7.2.*", "php": "7.2.*",
"ext-json": "*", "ext-json": "*",
"api/php_utils":"1.0.14", "api/php_utils":"1.0.17",
"api/php_services":"1.0.13", "api/php_services":"1.0.13",
"ext-openssl": "*" "ext-openssl": "*"
}, },
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "27230da37f9a20daffbb900882abde53", "content-hash": "2ccd591433ba03459f132b1bc9aef07c",
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
...@@ -30,11 +30,11 @@ ...@@ -30,11 +30,11 @@
}, },
{ {
"name": "api/php_utils", "name": "api/php_utils",
"version": "v1.0.14", "version": "v1.0.17",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git", "url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "a7bc4caaaee7aa1650e3055630860699c7fbc506" "reference": "aa70ccdd545f3e421eaf717274954990f1805b87"
}, },
"require": { "require": {
"elasticsearch/elasticsearch": "~7.0", "elasticsearch/elasticsearch": "~7.0",
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
} }
}, },
"description": "bp api php_utils", "description": "bp api php_utils",
"time": "2021-09-01T03:11:17+00:00" "time": "2021-09-06T08:57:33+00:00"
}, },
{ {
"name": "bacon/bacon-qr-code", "name": "bacon/bacon-qr-code",
...@@ -67,7 +67,13 @@ ...@@ -67,7 +67,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"dasprid/enum": "^1.0.3", "dasprid/enum": "^1.0.3",
...@@ -120,7 +126,13 @@ ...@@ -120,7 +126,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2", "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
"reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2", "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9", "phpunit/phpunit": "^7 | ^8 | ^9",
...@@ -167,7 +179,13 @@ ...@@ -167,7 +179,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf", "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf", "reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": ">=1.3.7", "ext-json": ">=1.3.7",
...@@ -236,7 +254,13 @@ ...@@ -236,7 +254,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", "url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", "reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"bacon/bacon-qr-code": "^2.0", "bacon/bacon-qr-code": "^2.0",
...@@ -311,7 +335,13 @@ ...@@ -311,7 +335,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8", "url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8",
"reference": "abe3791d231167f14eb80d413420d1eab91163a8", "reference": "abe3791d231167f14eb80d413420d1eab91163a8",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0" "php": ">=5.4.0"
...@@ -365,7 +395,13 @@ ...@@ -365,7 +395,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b", "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b", "reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ezimuel/guzzlestreams": "^3.0.1", "ezimuel/guzzlestreams": "^3.0.1",
...@@ -420,7 +456,13 @@ ...@@ -420,7 +456,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"guzzlehttp/promises": "^1.0", "guzzlehttp/promises": "^1.0",
...@@ -483,13 +525,19 @@ ...@@ -483,13 +525,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", "url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.5" "php": ">=5.5"
...@@ -517,10 +565,25 @@ ...@@ -517,10 +565,25 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
} }
], ],
"description": "Guzzle promises library", "description": "Guzzle promises library",
...@@ -529,9 +592,23 @@ ...@@ -529,9 +592,23 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1" "source": "https://github.com/guzzle/promises/tree/master"
}, },
"time": "2021-03-07T09:25:29+00:00" "funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
"type": "tidelift"
}
],
"time": "2021-09-05T15:38:28+00:00"
}, },
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
...@@ -539,13 +616,19 @@ ...@@ -539,13 +616,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91" "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91", "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
...@@ -581,13 +664,34 @@ ...@@ -581,13 +664,34 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
}, },
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{ {
"name": "Tobias Schultze", "name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion" "homepage": "https://github.com/Tobion"
} }
], ],
...@@ -606,7 +710,7 @@ ...@@ -606,7 +710,7 @@
"issues": "https://github.com/guzzle/psr7/issues", "issues": "https://github.com/guzzle/psr7/issues",
"source": "https://github.com/guzzle/psr7/tree/1.x" "source": "https://github.com/guzzle/psr7/tree/1.x"
}, },
"time": "2021-04-26T09:17:50+00:00" "time": "2021-09-05T19:11:18+00:00"
}, },
{ {
"name": "khanamiryan/qrcode-detector-decoder", "name": "khanamiryan/qrcode-detector-decoder",
...@@ -620,7 +724,13 @@ ...@@ -620,7 +724,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1", "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1", "reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.6" "php": ">=5.6"
...@@ -675,7 +785,13 @@ ...@@ -675,7 +785,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96", "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96", "reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-hash": "*", "ext-hash": "*",
...@@ -739,7 +855,13 @@ ...@@ -739,7 +855,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7", "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7",
"reference": "d178027d1e679832db9f38248fcc7200647dc2b7", "reference": "d178027d1e679832db9f38248fcc7200647dc2b7",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
...@@ -799,7 +921,13 @@ ...@@ -799,7 +921,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae", "url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae", "reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
...@@ -861,7 +989,13 @@ ...@@ -861,7 +989,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
...@@ -915,7 +1049,13 @@ ...@@ -915,7 +1049,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
...@@ -965,7 +1105,13 @@ ...@@ -965,7 +1105,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822", "reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.6" "php": ">=5.6"
...@@ -1009,7 +1155,13 @@ ...@@ -1009,7 +1155,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31", "url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31", "reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0" "php": ">=5.4.0"
...@@ -1069,7 +1221,13 @@ ...@@ -1069,7 +1221,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1137,7 +1295,13 @@ ...@@ -1137,7 +1295,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1206,7 +1370,13 @@ ...@@ -1206,7 +1370,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1286,7 +1456,13 @@ ...@@ -1286,7 +1456,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1368,7 +1544,13 @@ ...@@ -1368,7 +1544,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1453,7 +1635,13 @@ ...@@ -1453,7 +1635,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1534,7 +1722,13 @@ ...@@ -1534,7 +1722,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1614,7 +1808,13 @@ ...@@ -1614,7 +1808,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1698,7 +1898,13 @@ ...@@ -1698,7 +1898,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212", "url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212",
"reference": "7831b0331b786db39026d190faa4914f94adb212", "reference": "7831b0331b786db39026d190faa4914f94adb212",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1779,7 +1985,13 @@ ...@@ -1779,7 +1985,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/3565216f9640b26b646855e39e7bfafc550c75db", "url": "https://api.github.com/repos/symfony/property-info/zipball/3565216f9640b26b646855e39e7bfafc550c75db",
"reference": "3565216f9640b26b646855e39e7bfafc550c75db", "reference": "3565216f9640b26b646855e39e7bfafc550c75db",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1869,7 +2081,13 @@ ...@@ -1869,7 +2081,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1953,5 +2171,5 @@ ...@@ -1953,5 +2171,5 @@
"ext-openssl": "*" "ext-openssl": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.0.0" "plugin-api-version": "2.1.0"
} }
...@@ -13,4 +13,8 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb" ...@@ -13,4 +13,8 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb"
[prod : common] [prod : common]
[perf : common ] [perf : common ]
[test: common ] [test: common ]
[dev : common ] colonel.wallet.transfer_service_id="21090614423333205002"
\ No newline at end of file colonel.wallet.transfer_service_secret="4916927cf3305292f5a524db592dfa95"
[dev : common ]
colonel.wallet.transfer_service_id="21090614322322205004"
colonel.wallet.transfer_service_secret="e24126c53d4507381ff800a6653611e4"
\ No newline at end of file
...@@ -61,7 +61,7 @@ class HttpUtil ...@@ -61,7 +61,7 @@ class HttpUtil
{ {
// 增加traceId // 增加traceId
if(is_array($headers)) { if(is_array($headers)) {
$headers['X-TRACE-ID'] = Tracer::getTraceId(); $headers[] = 'X-TRACE-ID: ' . Tracer::getTraceId();
} }
$url = $url ."?". http_build_query($params); $url = $url ."?". http_build_query($params);
return self::curl($url, $timeout, $retries, $headers, [], $proxy, 'GET', $curl_opts); return self::curl($url, $timeout, $retries, $headers, [], $proxy, 'GET', $curl_opts);
...@@ -97,7 +97,7 @@ class HttpUtil ...@@ -97,7 +97,7 @@ class HttpUtil
{ {
// 增加traceId // 增加traceId
if(is_array($headers)) { if(is_array($headers)) {
$headers['X-TRACE-ID'] = Tracer::getTraceId(); $headers[] = 'X-TRACE-ID: ' . Tracer::getTraceId();
} }
return self::curl($url, $timeout, $retries, $headers, $post, $proxy, 'POST', $curl_opts); return self::curl($url, $timeout, $retries, $headers, $post, $proxy, 'POST', $curl_opts);
} }
......
<?php
namespace Api\PhpUtils\Log;
/**
* @method JobLog info($signature, $detail_info = '', $with_access_log = false)
* @method JobLog waring($signature, $detail_info = '', $exception = null)
* @method JobLog error($signature, $detail_info = '', $exception = null, $mail_to = '')
*/
class JobLog
{
protected static $instance = null;
public $log = null;
protected function __construct()
{
}
protected function __clone()
{
}
public static function getInstance(): ?JobLog
{
if (is_null(self::$instance)) {
self::$instance = new static();
}
return self::$instance;
}
public function __call($name, $arguments)
{
$this->setLog($arguments);
if (in_array($name, get_class_methods(FileLog::class))) {
call_user_func_array([FileLog::class, $name], $arguments);
}
return $this;
}
private function setLog($arguments)
{
if (!empty($arguments[0]) && !empty($arguments[1])) {
$this->log = date('Y-m-d H:i:s') . ";$arguments[0]:$arguments[1]" . PHP_EOL;
}
}
public function output()
{
echo $this->log;
}
}
...@@ -338,7 +338,7 @@ class ClassLoader ...@@ -338,7 +338,7 @@ class ClassLoader
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return bool|null True if loaded, null otherwise * @return true|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
...@@ -347,6 +347,8 @@ class ClassLoader ...@@ -347,6 +347,8 @@ class ClassLoader
return true; return true;
} }
return null;
} }
/** /**
......
<?php <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer; namespace Composer;
use Composer\Autoload\ClassLoader; use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require it's presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions class InstalledVersions
{ {
private static $installed = array ( private static $installed;
'root' => private static $canGetVendors;
array ( private static $installedByVendor = array();
'pretty_version' => 'dev-develop',
'version' => 'dev-develop', /**
'aliases' => * Returns a list of all package names which are present, either by being installed, replaced or provided
array ( *
), * @return string[]
'reference' => '5b271e605f425df64cb7d8d019fa921c045caceb', * @psalm-return list<string>
'name' => 'yidian/yaf_demo', */
), public static function getInstalledPackages()
'versions' => {
array ( $packages = array();
'api/php_services' => foreach (self::getInstalled() as $installed) {
array ( $packages[] = array_keys($installed['versions']);
'pretty_version' => 'v1.0.13', }
'version' => '1.0.13.0',
'aliases' => if (1 === \count($packages)) {
array ( return $packages[0];
), }
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca',
), return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
'api/php_utils' => }
array (
'pretty_version' => 'v1.0.14', /**
'version' => '1.0.14.0', * Returns a list of all package names with a specific type e.g. 'library'
'aliases' => *
array ( * @param string $type
), * @return string[]
'reference' => 'a7bc4caaaee7aa1650e3055630860699c7fbc506', * @psalm-return list<string>
), */
'bacon/bacon-qr-code' => public static function getInstalledPackagesByType($type)
array ( {
'pretty_version' => '2.0.4', $packagesByType = array();
'version' => '2.0.4.0',
'aliases' => foreach (self::getInstalled() as $installed) {
array ( foreach ($installed['versions'] as $name => $package) {
), if (isset($package['type']) && $package['type'] === $type) {
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09', $packagesByType[] = $name;
), }
'dasprid/enum' => }
array ( }
'pretty_version' => '1.0.3',
'version' => '1.0.3.0', return $packagesByType;
'aliases' => }
array (
), /**
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2', * Checks whether the given package is installed
), *
'elasticsearch/elasticsearch' => * This also returns true if the package name is provided or replaced by another package
array ( *
'pretty_version' => '7.11.x-dev', * @param string $packageName
'version' => '7.11.9999999.9999999-dev', * @param bool $includeDevRequirements
'aliases' => * @return bool
array ( */
), public static function isInstalled($packageName, $includeDevRequirements = true)
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf', {
), foreach (self::getInstalled() as $installed) {
'endroid/qr-code' => if (isset($installed['versions'][$packageName])) {
array ( return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
'pretty_version' => '3.9.6', }
'version' => '3.9.6.0', }
'aliases' =>
array ( return false;
), }
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
), /**
'ezimuel/guzzlestreams' => * Checks whether the given package satisfies a version constraint
array ( *
'pretty_version' => 'dev-master', * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
'version' => 'dev-master', *
'aliases' => * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
array ( *
0 => '3.0.x-dev', * @param VersionParser $parser Install composer/semver to have access to this class and functionality
), * @param string $packageName
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8', * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
), * @return bool
'ezimuel/ringphp' => */
array ( public static function satisfies(VersionParser $parser, $packageName, $constraint)
'pretty_version' => 'dev-master', {
'version' => 'dev-master', $constraint = $parser->parseConstraints($constraint);
'aliases' => $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
array (
0 => '1.1.x-dev', return $provided->matches($constraint);
), }
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
), /**
'guzzlehttp/guzzle' => * Returns a version constraint representing all the range(s) which are installed for a given package
array ( *
'pretty_version' => '6.3.0', * It is easier to use this via isInstalled() with the $constraint argument if you need to check
'version' => '6.3.0.0', * whether a given version of a package is installed, and not just whether it exists
'aliases' => *
array ( * @param string $packageName
), * @return string Version constraint usable with composer/semver
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699', */
), public static function getVersionRanges($packageName)
'guzzlehttp/promises' => {
array ( foreach (self::getInstalled() as $installed) {
'pretty_version' => 'dev-master', if (!isset($installed['versions'][$packageName])) {
'version' => 'dev-master', continue;
'aliases' => }
array (
0 => '1.4.x-dev', $ranges = array();
), if (isset($installed['versions'][$packageName]['pretty_version'])) {
'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d', $ranges[] = $installed['versions'][$packageName]['pretty_version'];
), }
'guzzlehttp/psr7' => if (array_key_exists('aliases', $installed['versions'][$packageName])) {
array ( $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
'pretty_version' => '1.x-dev', }
'version' => '1.9999999.9999999.9999999-dev', if (array_key_exists('replaced', $installed['versions'][$packageName])) {
'aliases' => $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
array ( }
), if (array_key_exists('provided', $installed['versions'][$packageName])) {
'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91', $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
), }
'khanamiryan/qrcode-detector-decoder' =>
array ( return implode(' || ', $ranges);
'pretty_version' => '1.0.5.2', }
'version' => '1.0.5.2',
'aliases' => throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
array ( }
),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1', /**
), * @param string $packageName
'mongodb/mongodb' => * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
array ( */
'pretty_version' => '1.4.3', public static function getVersion($packageName)
'version' => '1.4.3.0', {
'aliases' => foreach (self::getInstalled() as $installed) {
array ( if (!isset($installed['versions'][$packageName])) {
), continue;
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96', }
),
'myclabs/php-enum' => if (!isset($installed['versions'][$packageName]['version'])) {
array ( return null;
'pretty_version' => '1.7.7', }
'version' => '1.7.7.0',
'aliases' => return $installed['versions'][$packageName]['version'];
array ( }
),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7', throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
), }
'perftools/php-profiler' =>
array ( /**
'pretty_version' => '0.18.0', * @param string $packageName
'version' => '0.18.0.0', * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
'aliases' => */
array ( public static function getPrettyVersion($packageName)
), {
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae', foreach (self::getInstalled() as $installed) {
), if (!isset($installed['versions'][$packageName])) {
'psr/http-message' => continue;
array ( }
'pretty_version' => 'dev-master',
'version' => 'dev-master', if (!isset($installed['versions'][$packageName]['pretty_version'])) {
'aliases' => return null;
array ( }
0 => '1.0.x-dev',
), return $installed['versions'][$packageName]['pretty_version'];
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4', }
),
'psr/http-message-implementation' => throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
array ( }
'provided' =>
array ( /**
0 => '1.0', * @param string $packageName
), * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
), */
'psr/log' => public static function getReference($packageName)
array ( {
'pretty_version' => '1.1.4', foreach (self::getInstalled() as $installed) {
'version' => '1.1.4.0', if (!isset($installed['versions'][$packageName])) {
'aliases' => continue;
array ( }
),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', if (!isset($installed['versions'][$packageName]['reference'])) {
), return null;
'ralouphie/getallheaders' => }
array (
'pretty_version' => '3.0.3', return $installed['versions'][$packageName]['reference'];
'version' => '3.0.3.0', }
'aliases' =>
array ( throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
), }
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
), /**
'react/promise' => * @param string $packageName
array ( * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
'pretty_version' => '2.x-dev', */
'version' => '2.9999999.9999999.9999999-dev', public static function getInstallPath($packageName)
'aliases' => {
array ( foreach (self::getInstalled() as $installed) {
), if (!isset($installed['versions'][$packageName])) {
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31', continue;
), }
'symfony/deprecation-contracts' =>
array ( return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
'pretty_version' => 'dev-main', }
'version' => 'dev-main',
'aliases' => throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
array ( }
0 => '2.5.x-dev',
), /**
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8', * @return array
), * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
'symfony/options-resolver' => */
array ( public static function getRootPackage()
'pretty_version' => '5.4.x-dev', {
'version' => '5.4.9999999.9999999-dev', $installed = self::getInstalled();
'aliases' =>
array ( return $installed[0]['root'];
), }
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
), /**
'symfony/polyfill-ctype' => * Returns the raw installed.php data for custom implementations
array ( *
'pretty_version' => 'dev-main', * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
'version' => 'dev-main', * @return array[]
'aliases' => * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}
array ( */
0 => '1.23.x-dev', public static function getRawData()
), {
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
),
'symfony/polyfill-intl-grapheme' => if (null === self::$installed) {
array ( // only require the installed.php file if this file is loaded from its dumped location,
'pretty_version' => 'dev-main', // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
'version' => 'dev-main', if (substr(__DIR__, -8, 1) !== 'C') {
'aliases' => self::$installed = include __DIR__ . '/installed.php';
array ( } else {
0 => '1.23.x-dev', self::$installed = array();
), }
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', }
),
'symfony/polyfill-intl-normalizer' => return self::$installed;
array ( }
'pretty_version' => 'dev-main',
'version' => 'dev-main', /**
'aliases' => * Returns the raw data of all installed.php which are currently loaded for custom implementations
array ( *
0 => '1.23.x-dev', * @return array[]
), * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', */
), public static function getAllRawData()
'symfony/polyfill-mbstring' => {
array ( return self::getInstalled();
'pretty_version' => 'dev-main', }
'version' => 'dev-main',
'aliases' => /**
array ( * Lets you reload the static array from another file
0 => '1.23.x-dev', *
), * This is only useful for complex integrations in which a project needs to use
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', * this class but then also needs to execute another project's autoloader in process,
), * and wants to ensure both projects have access to their version of installed.php.
'symfony/polyfill-php73' => *
array ( * A typical case would be PHPUnit, where it would need to make sure it reads all
'pretty_version' => 'dev-main', * the data it needs from this class, then call reload() with
'version' => 'dev-main', * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
'aliases' => * the project in which it runs can then also use this class safely, without
array ( * interference between PHPUnit's dependencies and the project's dependencies.
0 => '1.23.x-dev', *
), * @param array[] $data A vendor/composer/installed.php data set
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', * @return void
), *
'symfony/polyfill-php80' => * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data
array ( */
'pretty_version' => 'dev-main', public static function reload($data)
'version' => 'dev-main', {
'aliases' => self::$installed = $data;
array ( self::$installedByVendor = array();
0 => '1.23.x-dev', }
),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', /**
), * @return array[]
'symfony/property-access' => * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
array ( */
'pretty_version' => '5.4.x-dev', private static function getInstalled()
'version' => '5.4.9999999.9999999-dev', {
'aliases' => if (null === self::$canGetVendors) {
array ( self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
), }
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
), $installed = array();
'symfony/property-info' =>
array ( if (self::$canGetVendors) {
'pretty_version' => '5.4.x-dev', foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
'version' => '5.4.9999999.9999999-dev', if (isset(self::$installedByVendor[$vendorDir])) {
'aliases' => $installed[] = self::$installedByVendor[$vendorDir];
array ( } elseif (is_file($vendorDir.'/composer/installed.php')) {
), $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
'reference' => '3565216f9640b26b646855e39e7bfafc550c75db', if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
), self::$installed = $installed[count($installed) - 1];
'symfony/string' => }
array ( }
'pretty_version' => '5.4.x-dev', }
'version' => '5.4.9999999.9999999-dev', }
'aliases' =>
array ( if (null === self::$installed) {
), // only require the installed.php file if this file is loaded from its dumped location,
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b', // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
), if (substr(__DIR__, -8, 1) !== 'C') {
'yidian/yaf_demo' => self::$installed = require __DIR__ . '/installed.php';
array ( } else {
'pretty_version' => 'dev-develop', self::$installed = array();
'version' => 'dev-develop', }
'aliases' => }
array ( $installed[] = self::$installed;
),
'reference' => '5b271e605f425df64cb7d8d019fa921c045caceb', return $installed;
), }
),
);
private static $canGetVendors;
private static $installedByVendor = array();
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
public static function isInstalled($packageName)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return true;
}
}
return false;
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
}
}
}
$installed[] = self::$installed;
return $installed;
}
} }
...@@ -67,6 +67,7 @@ return array( ...@@ -67,6 +67,7 @@ return array(
'Api\\PhpUtils\\Lock\\FrequencyLockUtil' => $vendorDir . '/api/php_utils/src/Lock/FrequencyLockUtil.php', 'Api\\PhpUtils\\Lock\\FrequencyLockUtil' => $vendorDir . '/api/php_utils/src/Lock/FrequencyLockUtil.php',
'Api\\PhpUtils\\Log\\DaemonLog' => $vendorDir . '/api/php_utils/src/Log/DaemonLog.php', 'Api\\PhpUtils\\Log\\DaemonLog' => $vendorDir . '/api/php_utils/src/Log/DaemonLog.php',
'Api\\PhpUtils\\Log\\FileLog' => $vendorDir . '/api/php_utils/src/Log/FileLog.php', 'Api\\PhpUtils\\Log\\FileLog' => $vendorDir . '/api/php_utils/src/Log/FileLog.php',
'Api\\PhpUtils\\Log\\JobLog' => $vendorDir . '/api/php_utils/src/Log/JobLog.php',
'Api\\PhpUtils\\Log\\Tracer' => $vendorDir . '/api/php_utils/src/Log/Tracer.php', 'Api\\PhpUtils\\Log\\Tracer' => $vendorDir . '/api/php_utils/src/Log/Tracer.php',
'Api\\PhpUtils\\Message\\Email' => $vendorDir . '/api/php_utils/src/Message/Email.php', 'Api\\PhpUtils\\Message\\Email' => $vendorDir . '/api/php_utils/src/Message/Email.php',
'Api\\PhpUtils\\Mon\\MonUtil' => $vendorDir . '/api/php_utils/src/Mon/MonUtil.php', 'Api\\PhpUtils\\Mon\\MonUtil' => $vendorDir . '/api/php_utils/src/Mon/MonUtil.php',
......
...@@ -297,6 +297,7 @@ class ComposerStaticInit79ffc35c65c14e51408ef6c36a392383 ...@@ -297,6 +297,7 @@ class ComposerStaticInit79ffc35c65c14e51408ef6c36a392383
'Api\\PhpUtils\\Lock\\FrequencyLockUtil' => __DIR__ . '/..' . '/api/php_utils/src/Lock/FrequencyLockUtil.php', 'Api\\PhpUtils\\Lock\\FrequencyLockUtil' => __DIR__ . '/..' . '/api/php_utils/src/Lock/FrequencyLockUtil.php',
'Api\\PhpUtils\\Log\\DaemonLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/DaemonLog.php', 'Api\\PhpUtils\\Log\\DaemonLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/DaemonLog.php',
'Api\\PhpUtils\\Log\\FileLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/FileLog.php', 'Api\\PhpUtils\\Log\\FileLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/FileLog.php',
'Api\\PhpUtils\\Log\\JobLog' => __DIR__ . '/..' . '/api/php_utils/src/Log/JobLog.php',
'Api\\PhpUtils\\Log\\Tracer' => __DIR__ . '/..' . '/api/php_utils/src/Log/Tracer.php', 'Api\\PhpUtils\\Log\\Tracer' => __DIR__ . '/..' . '/api/php_utils/src/Log/Tracer.php',
'Api\\PhpUtils\\Message\\Email' => __DIR__ . '/..' . '/api/php_utils/src/Message/Email.php', 'Api\\PhpUtils\\Message\\Email' => __DIR__ . '/..' . '/api/php_utils/src/Message/Email.php',
'Api\\PhpUtils\\Mon\\MonUtil' => __DIR__ . '/..' . '/api/php_utils/src/Mon/MonUtil.php', 'Api\\PhpUtils\\Mon\\MonUtil' => __DIR__ . '/..' . '/api/php_utils/src/Mon/MonUtil.php',
......
...@@ -27,12 +27,12 @@ ...@@ -27,12 +27,12 @@
}, },
{ {
"name": "api/php_utils", "name": "api/php_utils",
"version": "v1.0.14", "version": "v1.0.17",
"version_normalized": "1.0.14.0", "version_normalized": "1.0.17.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git", "url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "a7bc4caaaee7aa1650e3055630860699c7fbc506" "reference": "aa70ccdd545f3e421eaf717274954990f1805b87"
}, },
"require": { "require": {
"elasticsearch/elasticsearch": "~7.0", "elasticsearch/elasticsearch": "~7.0",
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
"mongodb/mongodb": "1.4.3", "mongodb/mongodb": "1.4.3",
"php": "7.2.*" "php": "7.2.*"
}, },
"time": "2021-09-01T03:11:17+00:00", "time": "2021-09-06T08:57:33+00:00",
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
"autoload": { "autoload": {
...@@ -547,19 +547,13 @@ ...@@ -547,19 +547,13 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/promises.git", "url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d" "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d", "url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d", "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.5" "php": ">=5.5"
...@@ -567,7 +561,7 @@ ...@@ -567,7 +561,7 @@
"require-dev": { "require-dev": {
"symfony/phpunit-bridge": "^4.4 || ^5.1" "symfony/phpunit-bridge": "^4.4 || ^5.1"
}, },
"time": "2021-03-07T09:25:29+00:00", "time": "2021-09-05T15:38:28+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -589,10 +583,25 @@ ...@@ -589,10 +583,25 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
} }
], ],
"description": "Guzzle promises library", "description": "Guzzle promises library",
...@@ -601,8 +610,22 @@ ...@@ -601,8 +610,22 @@
], ],
"support": { "support": {
"issues": "https://github.com/guzzle/promises/issues", "issues": "https://github.com/guzzle/promises/issues",
"source": "https://github.com/guzzle/promises/tree/1.4.1" "source": "https://github.com/guzzle/promises/tree/master"
}, },
"funding": [
{
"url": "https://github.com/GrahamCampbell",
"type": "github"
},
{
"url": "https://github.com/Nyholm",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/guzzlehttp/promises",
"type": "tidelift"
}
],
"install-path": "../guzzlehttp/promises" "install-path": "../guzzlehttp/promises"
}, },
{ {
...@@ -612,19 +635,13 @@ ...@@ -612,19 +635,13 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/guzzle/psr7.git", "url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91" "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91", "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f",
"shasum": "", "shasum": ""
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
...@@ -641,7 +658,7 @@ ...@@ -641,7 +658,7 @@
"suggest": { "suggest": {
"laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses"
}, },
"time": "2021-04-26T09:17:50+00:00", "time": "2021-09-05T19:11:18+00:00",
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
...@@ -662,13 +679,34 @@ ...@@ -662,13 +679,34 @@
"MIT" "MIT"
], ],
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
}, },
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{ {
"name": "Tobias Schultze", "name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion" "homepage": "https://github.com/Tobion"
} }
], ],
......
<?php return array ( <?php return array(
'root' => 'root' => array(
array ( 'pretty_version' => 'dev-develop',
'pretty_version' => 'dev-develop', 'version' => 'dev-develop',
'version' => 'dev-develop', 'type' => 'project',
'aliases' => 'install_path' => __DIR__ . '/../../',
array ( 'aliases' => array(),
'reference' => '26f3230dd97d1da1840255c71dd2c03ec79c3fcf',
'name' => 'yidian/yaf_demo',
'dev' => true,
),
'versions' => array(
'api/php_services' => array(
'pretty_version' => 'v1.0.13',
'version' => '1.0.13.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_services',
'aliases' => array(),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca',
'dev_requirement' => false,
),
'api/php_utils' => array(
'pretty_version' => 'v1.0.17',
'version' => '1.0.17.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_utils',
'aliases' => array(),
'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87',
'dev_requirement' => false,
),
'bacon/bacon-qr-code' => array(
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../bacon/bacon-qr-code',
'aliases' => array(),
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09',
'dev_requirement' => false,
),
'dasprid/enum' => array(
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../dasprid/enum',
'aliases' => array(),
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2',
'dev_requirement' => false,
),
'elasticsearch/elasticsearch' => array(
'pretty_version' => '7.11.x-dev',
'version' => '7.11.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../elasticsearch/elasticsearch',
'aliases' => array(),
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf',
'dev_requirement' => false,
),
'endroid/qr-code' => array(
'pretty_version' => '3.9.6',
'version' => '3.9.6.0',
'type' => 'library',
'install_path' => __DIR__ . '/../endroid/qr-code',
'aliases' => array(),
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
'dev_requirement' => false,
),
'ezimuel/guzzlestreams' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../ezimuel/guzzlestreams',
'aliases' => array(
0 => '3.0.x-dev',
),
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8',
'dev_requirement' => false,
),
'ezimuel/ringphp' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../ezimuel/ringphp',
'aliases' => array(
0 => '1.1.x-dev',
),
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
'dev_requirement' => false,
),
'guzzlehttp/guzzle' => array(
'pretty_version' => '6.3.0',
'version' => '6.3.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
'aliases' => array(),
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699',
'dev_requirement' => false,
),
'guzzlehttp/promises' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(
0 => '1.4.x-dev',
),
'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa',
'dev_requirement' => false,
),
'guzzlehttp/psr7' => array(
'pretty_version' => '1.x-dev',
'version' => '1.9999999.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../guzzlehttp/psr7',
'aliases' => array(),
'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f',
'dev_requirement' => false,
),
'khanamiryan/qrcode-detector-decoder' => array(
'pretty_version' => '1.0.5.2',
'version' => '1.0.5.2',
'type' => 'library',
'install_path' => __DIR__ . '/../khanamiryan/qrcode-detector-decoder',
'aliases' => array(),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1',
'dev_requirement' => false,
),
'mongodb/mongodb' => array(
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../mongodb/mongodb',
'aliases' => array(),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
'dev_requirement' => false,
),
'myclabs/php-enum' => array(
'pretty_version' => '1.7.7',
'version' => '1.7.7.0',
'type' => 'library',
'install_path' => __DIR__ . '/../myclabs/php-enum',
'aliases' => array(),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7',
'dev_requirement' => false,
),
'perftools/php-profiler' => array(
'pretty_version' => '0.18.0',
'version' => '0.18.0.0',
'type' => 'library',
'install_path' => __DIR__ . '/../perftools/php-profiler',
'aliases' => array(),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
'dev_requirement' => false,
),
'psr/http-message' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(
0 => '1.0.x-dev',
),
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
'dev_requirement' => false,
),
'psr/http-message-implementation' => array(
'dev_requirement' => false,
'provided' => array(
0 => '1.0',
),
),
'psr/log' => array(
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'type' => 'library',
'install_path' => __DIR__ . '/../psr/log',
'aliases' => array(),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'dev_requirement' => false,
),
'ralouphie/getallheaders' => array(
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
'type' => 'library',
'install_path' => __DIR__ . '/../ralouphie/getallheaders',
'aliases' => array(),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'dev_requirement' => false,
),
'react/promise' => array(
'pretty_version' => '2.x-dev',
'version' => '2.9999999.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../react/promise',
'aliases' => array(),
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31',
'dev_requirement' => false,
),
'symfony/deprecation-contracts' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(
0 => '2.5.x-dev',
),
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
'dev_requirement' => false,
),
'symfony/options-resolver' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/options-resolver',
'aliases' => array(),
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
'dev_requirement' => false,
),
'symfony/polyfill-ctype' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
'dev_requirement' => false,
),
'symfony/polyfill-intl-grapheme' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
'dev_requirement' => false,
),
'symfony/polyfill-intl-normalizer' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
'dev_requirement' => false,
),
'symfony/polyfill-mbstring' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
'dev_requirement' => false,
),
'symfony/polyfill-php73' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010',
'dev_requirement' => false,
),
'symfony/polyfill-php80' => array(
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(
0 => '1.23.x-dev',
),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
'dev_requirement' => false,
),
'symfony/property-access' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/property-access',
'aliases' => array(),
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
'dev_requirement' => false,
),
'symfony/property-info' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/property-info',
'aliases' => array(),
'reference' => '3565216f9640b26b646855e39e7bfafc550c75db',
'dev_requirement' => false,
),
'symfony/string' => array(
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'type' => 'library',
'install_path' => __DIR__ . '/../symfony/string',
'aliases' => array(),
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b',
'dev_requirement' => false,
),
'yidian/yaf_demo' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '26f3230dd97d1da1840255c71dd2c03ec79c3fcf',
'dev_requirement' => false,
),
), ),
'reference' => '5b271e605f425df64cb7d8d019fa921c045caceb',
'name' => 'yidian/yaf_demo',
),
'versions' =>
array (
'api/php_services' =>
array (
'pretty_version' => 'v1.0.13',
'version' => '1.0.13.0',
'aliases' =>
array (
),
'reference' => 'c51c248e6e7aba33fd147993b5f61f140ccd56ca',
),
'api/php_utils' =>
array (
'pretty_version' => 'v1.0.14',
'version' => '1.0.14.0',
'aliases' =>
array (
),
'reference' => 'a7bc4caaaee7aa1650e3055630860699c7fbc506',
),
'bacon/bacon-qr-code' =>
array (
'pretty_version' => '2.0.4',
'version' => '2.0.4.0',
'aliases' =>
array (
),
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09',
),
'dasprid/enum' =>
array (
'pretty_version' => '1.0.3',
'version' => '1.0.3.0',
'aliases' =>
array (
),
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2',
),
'elasticsearch/elasticsearch' =>
array (
'pretty_version' => '7.11.x-dev',
'version' => '7.11.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf',
),
'endroid/qr-code' =>
array (
'pretty_version' => '3.9.6',
'version' => '3.9.6.0',
'aliases' =>
array (
),
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
),
'ezimuel/guzzlestreams' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '3.0.x-dev',
),
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8',
),
'ezimuel/ringphp' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '1.1.x-dev',
),
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
),
'guzzlehttp/guzzle' =>
array (
'pretty_version' => '6.3.0',
'version' => '6.3.0.0',
'aliases' =>
array (
),
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699',
),
'guzzlehttp/promises' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '1.4.x-dev',
),
'reference' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
),
'guzzlehttp/psr7' =>
array (
'pretty_version' => '1.x-dev',
'version' => '1.9999999.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'dc960a912984efb74d0a90222870c72c87f10c91',
),
'khanamiryan/qrcode-detector-decoder' =>
array (
'pretty_version' => '1.0.5.2',
'version' => '1.0.5.2',
'aliases' =>
array (
),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1',
),
'mongodb/mongodb' =>
array (
'pretty_version' => '1.4.3',
'version' => '1.4.3.0',
'aliases' =>
array (
),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
),
'myclabs/php-enum' =>
array (
'pretty_version' => '1.7.7',
'version' => '1.7.7.0',
'aliases' =>
array (
),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7',
),
'perftools/php-profiler' =>
array (
'pretty_version' => '0.18.0',
'version' => '0.18.0.0',
'aliases' =>
array (
),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
),
'psr/http-message' =>
array (
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'aliases' =>
array (
0 => '1.0.x-dev',
),
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
),
'psr/http-message-implementation' =>
array (
'provided' =>
array (
0 => '1.0',
),
),
'psr/log' =>
array (
'pretty_version' => '1.1.4',
'version' => '1.1.4.0',
'aliases' =>
array (
),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
),
'ralouphie/getallheaders' =>
array (
'pretty_version' => '3.0.3',
'version' => '3.0.3.0',
'aliases' =>
array (
),
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
),
'react/promise' =>
array (
'pretty_version' => '2.x-dev',
'version' => '2.9999999.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31',
),
'symfony/deprecation-contracts' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '2.5.x-dev',
),
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
),
'symfony/options-resolver' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
),
'symfony/polyfill-ctype' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
),
'symfony/polyfill-intl-grapheme' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
),
'symfony/polyfill-intl-normalizer' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
),
'symfony/polyfill-mbstring' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
),
'symfony/polyfill-php73' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010',
),
'symfony/polyfill-php80' =>
array (
'pretty_version' => 'dev-main',
'version' => 'dev-main',
'aliases' =>
array (
0 => '1.23.x-dev',
),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
),
'symfony/property-access' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
),
'symfony/property-info' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '3565216f9640b26b646855e39e7bfafc550c75db',
),
'symfony/string' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b',
),
'yidian/yaf_demo' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => '5b271e605f425df64cb7d8d019fa921c045caceb',
),
),
); );
Copyright (c) 2015-2016 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com> The MIT License (MIT)
Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com>
Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk>
Copyright (c) 2017 Tobias Schultze <webmaster@tubo-world.de>
Copyright (c) 2020 Tobias Nyholm <tobias.nyholm@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
...@@ -530,3 +530,18 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f ...@@ -530,3 +530,18 @@ A static API was first introduced in 1.4.0, in order to mitigate problems with f
| `is_rejected` | `Is::rejected` | | `is_rejected` | `Is::rejected` |
| `is_settled` | `Is::settled` | | `is_settled` | `Is::settled` |
| `coroutine` | `Coroutine::of` | | `coroutine` | `Coroutine::of` |
## Security
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/promises/security/policy) for more information.
## License
Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
## For Enterprise
Available as part of the Tidelift Subscription
The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-promises?utm_source=packagist-guzzlehttp-promises&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
...@@ -4,10 +4,25 @@ ...@@ -4,10 +4,25 @@
"keywords": ["promise"], "keywords": ["promise"],
"license": "MIT", "license": "MIT",
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
} }
], ],
"require": { "require": {
...@@ -35,5 +50,9 @@ ...@@ -35,5 +50,9 @@
"branch-alias": { "branch-alias": {
"dev-master": "1.4-dev" "dev-master": "1.4-dev"
} }
},
"config": {
"preferred-install": "dist",
"sort-packages": true
} }
} }
github: [Nyholm, GrahamCampbell]
tidelift: "packagist/guzzlehttp/psr7"
daysUntilStale: 120
daysUntilClose: 14
exemptLabels:
- lifecycle/keep-open
- lifecycle/ready-for-merge
# Label to use when marking an issue as stale
staleLabel: lifecycle/stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false
name: BC Check
on:
pull_request:
jobs:
roave-bc-check:
name: Roave BC Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Roave BC Check
uses: docker://nyholm/roave-bc-check-ga
...@@ -10,7 +10,7 @@ jobs: ...@@ -10,7 +10,7 @@ jobs:
strategy: strategy:
max-parallel: 10 max-parallel: 10
matrix: matrix:
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4'] php: ['5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
steps: steps:
- name: Set up PHP - name: Set up PHP
...@@ -23,8 +23,12 @@ jobs: ...@@ -23,8 +23,12 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Mimic PHP 8.0
run: composer config platform.php 8.0.999
if: matrix.php > 8
- name: Install dependencies - name: Install dependencies
run: composer update --no-interaction --no-progress --prefer-dist run: composer update --no-interaction --no-progress
- name: Run tests - name: Run tests
run: make test run: make test
...@@ -26,7 +26,7 @@ jobs: ...@@ -26,7 +26,7 @@ jobs:
- name: Download dependencies - name: Download dependencies
uses: ramsey/composer-install@v1 uses: ramsey/composer-install@v1
with: with:
composer-options: --no-interaction --prefer-dist --optimize-autoloader composer-options: --no-interaction --optimize-autoloader
- name: Start server - name: Start server
run: php -S 127.0.0.1:10002 tests/Integration/server.php & run: php -S 127.0.0.1:10002 tests/Integration/server.php &
......
Copyright (c) 2015 Michael Dowling, https://github.com/mtdowling <mtdowling@gmail.com> The MIT License (MIT)
Copyright (c) 2015 Michael Dowling <mtdowling@gmail.com>
Copyright (c) 2015 Márk Sági-Kazár <mark.sagikazar@gmail.com>
Copyright (c) 2015 Graham Campbell <hello@gjcampbell.co.uk>
Copyright (c) 2016 Tobias Schultze <webmaster@tubo-world.de>
Copyright (c) 2016 George Mponos <gmponos@gmail.com>
Copyright (c) 2018 Tobias Nyholm <tobias.nyholm@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
......
...@@ -807,3 +807,18 @@ Whether two URIs can be considered equivalent. Both URIs are normalized automati ...@@ -807,3 +807,18 @@ Whether two URIs can be considered equivalent. Both URIs are normalized automati
`$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent. `$normalizations` bitmask. The method also accepts relative URI references and returns true when they are equivalent.
This of course assumes they will be resolved against the same base URI. If this is not the case, determination of This of course assumes they will be resolved against the same base URI. If this is not the case, determination of
equivalence or difference of relative references does not mean anything. equivalence or difference of relative references does not mean anything.
## Security
If you discover a security vulnerability within this package, please send an email to security@tidelift.com. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. Please see [Security Policy](https://github.com/guzzle/psr7/security/policy) for more information.
## License
Guzzle is made available under the MIT License (MIT). Please see [License File](LICENSE) for more information.
## For Enterprise
Available as part of the Tidelift Subscription
The maintainers of Guzzle and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. [Learn more.](https://tidelift.com/subscription/pkg/packagist-guzzlehttp-psr7?utm_source=packagist-guzzlehttp-psr7&utm_medium=referral&utm_campaign=enterprise&utm_term=repo)
{ {
"name": "guzzlehttp/psr7", "name": "guzzlehttp/psr7",
"type": "library",
"description": "PSR-7 message implementation that also provides common utility methods", "description": "PSR-7 message implementation that also provides common utility methods",
"keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"], "keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
"license": "MIT", "license": "MIT",
"authors": [ "authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{ {
"name": "Michael Dowling", "name": "Michael Dowling",
"email": "mtdowling@gmail.com", "email": "mtdowling@gmail.com",
"homepage": "https://github.com/mtdowling" "homepage": "https://github.com/mtdowling"
}, },
{
"name": "George Mponos",
"email": "gmponos@gmail.com",
"homepage": "https://github.com/gmponos"
},
{
"name": "Tobias Nyholm",
"email": "tobias.nyholm@gmail.com",
"homepage": "https://github.com/Nyholm"
},
{
"name": "Márk Sági-Kazár",
"email": "mark.sagikazar@gmail.com",
"homepage": "https://github.com/sagikazarmark"
},
{ {
"name": "Tobias Schultze", "name": "Tobias Schultze",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion" "homepage": "https://github.com/Tobion"
} }
], ],
...@@ -45,5 +65,9 @@ ...@@ -45,5 +65,9 @@
"branch-alias": { "branch-alias": {
"dev-master": "1.7-dev" "dev-master": "1.7-dev"
} }
},
"config": {
"preferred-install": "dist",
"sort-packages": true
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment