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
'marketing_id' => 'marketing_id 参数不能为空',
];
public function sceneDate()
{
return $this->only(["date"])->append("date", "require");
}
public function sceneAdd()
{
return $this->only(["date","config","marketing_id"])->append("marketing_id", "require");
......
......@@ -20,6 +20,12 @@ class ColonelDistributorColonel extends MysqlBase
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 = '*')
{
return self::get($column, $where);
......
......@@ -18,6 +18,11 @@ class ColonelDistributorInviteOrderNum extends MysqlBase
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 = [])
{
if (empty($columns)) {
......@@ -48,4 +53,4 @@ class ColonelDistributorInviteOrderNum extends MysqlBase
{
return self::delete($where);
}
}
\ No newline at end of file
}
......@@ -21,6 +21,11 @@ class ColonelDistributorPayInfo extends MysqlBase
self::TYPE_FINISH_TARGET => "完成目标单数",
];
public static function getRecords(array $where, $column = '*')
{
return (array)self::select($column, $where);
}
public static function getRecord($where, $columns = [], $options = [])
{
if (empty($columns)) {
......@@ -44,7 +49,7 @@ class ColonelDistributorPayInfo extends MysqlBase
public static function updateRecord($columns, $where)
{
return self::update($columns, $where);
return (int)self::update($columns, $where);
}
public static function save($data, $where = [], $options = [])
......@@ -59,4 +64,4 @@ class ColonelDistributorPayInfo extends MysqlBase
{
return self::delete($where);
}
}
\ No newline at end of file
}
......@@ -68,8 +68,6 @@ class ColonelController extends Base
*/
public function colonel_configAction()
{
(new ColonelConfigValidate())->scene("date")->validate();
$params = $this->params;
$data = PindanActivityColonelConfigService::colonelConfig($params);
return $this->success(["result" => $data]);
......
......@@ -212,7 +212,7 @@ class MarketingController extends Base
$this->params['sort_field'] = 'end_time';
$this->params['sort_type'] = 'desc';
$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当日上新(即将开始)
$list['end'] = MarketingService::marketingList($this->params)['result'];
$list['end'] = $list['end'] ? array_column($list['end'], null, 'marketing_id') : [];
......
......@@ -66,7 +66,8 @@ class ColonelService
*/
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 [
// -1.未申请 0.未审核 1.审核通过 2.审核未通过
'apply_status' => isset($applyInfo['audit_status']) ? intval($applyInfo['audit_status']) : -1
......@@ -83,12 +84,13 @@ class ColonelService
*/
public static function getManageApplyList(array $params): array
{
$params = self::getPageParams($params);
$result = ColonelDistributorColonelApply::getPages([], ColonelDistributorColonelApply::DEFAULT_COLUMN, $params['page'], $params['page_size']);
$params = self::getPageParams($params);
$result = ColonelDistributorColonelApply::getPages([], ColonelDistributorColonelApply::DEFAULT_COLUMN,
$params['page'], $params['page_size']);
if (empty($result['count'])) {
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'));
foreach ($result['result'] as &$applyVal) {
$applyVal['user_avatar'] = !empty($userMap[$applyVal['user_id']]['user_avatar']) ? $userMap[$applyVal['user_id']]['user_avatar'] : '';
......@@ -114,8 +116,9 @@ class ColonelService
*/
public static function getManageList(array $params): array
{
$params = self::getPageParams($params);
$result = ColonelDistributorColonel::getPages([], ColonelDistributorColonel::DEFAULT_COLUMN, $params['page'], $params['page_size']);
$params = self::getPageParams($params);
$result = ColonelDistributorColonel::getPages([], ColonelDistributorColonel::DEFAULT_COLUMN, $params['page'],
$params['page_size']);
if (empty($result['count'])) {
return $result;
}
......@@ -124,9 +127,9 @@ class ColonelService
$incomeMap = PindanActivityInviteOrderService::incomeStatistics(["user_ids" => $userIds]);
foreach ($result['result'] as &$colonelVal) {
$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['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);
return $result;
......@@ -144,7 +147,8 @@ class ColonelService
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);
}
// 审核状态数据检测
......@@ -155,7 +159,8 @@ class ColonelService
try {
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)) {
throw new MarketingException(MarketingException::COLONEL_AUDIT_STATUS_FAILED);
}
......@@ -265,7 +270,7 @@ class ColonelService
*/
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');
}
......@@ -278,7 +283,8 @@ class ColonelService
*/
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');
}
......@@ -291,8 +297,8 @@ class ColonelService
*/
private static function getPageParams(array $params = []): array
{
$params['page'] = !empty($params['page']) ? $params['page'] : 1;
$params['page_size'] = !empty($params['page_size']) ? $params['page_size'] : 20;
$params['page'] = !empty($params['page']) ? $params['page'] : 1;
$params['page_size'] = !empty($params['page_size']) ? $params['page_size'] : 20;
return $params;
}
}
......@@ -65,9 +65,16 @@ class PindanActivityColonelConfigService
*/
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"];
$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)) {
$config = ColonelDistributorConfig::getRecord([
"date[<=]" => $day,
......@@ -99,14 +106,8 @@ class PindanActivityColonelConfigService
*/
public static function getTaskData($params = [])
{
$hour = date("H");
if ($hour < 10 && $hour > 0) {
$date = date("Y-m-d", strtotime("-1 day"));
} elseif ($hour > 16) {
$date = date("Y-m-d");
} else {
$date = date("Y-m-d");
}
$timeRange = self::getActivityTimeRange();
$date = date("Y-m-d", strtotime($timeRange["start_time"]));
$configList = self::colonelConfig(["date" => $date, "type" => ColonelDistributorConfig::TYPE_COLONEL]);
$marketingId = empty($configList[0]["marketing_id"]) ? 0 : $configList[0]["marketing_id"];
......@@ -144,15 +145,38 @@ class PindanActivityColonelConfigService
public static function getActivityTimeRange() : array
{
// 获取活动时间范围 例如活动时间(2021-09-03) --- 2021-09-03:12:00:00 - 2021-09-04:12:00:00
$hour = ' '.self::ACTIVITY_DEFAULT_HOUR . ":00:00";
if (date("H") >= 12) {
$startTime = date("Y-m-d").$hour;
$endTime = date("Y-m-d", strtotime("+1 day")).$hour;
$hour = ' '.self::ACTIVITY_DEFAULT_HOUR . ':00:00';
if (date('H') >= self::ACTIVITY_DEFAULT_HOUR) {
$startTime = date('Y-m-d').$hour;
$endTime = date('Y-m-d', strtotime('+1 day')).$hour;
} else {
$startTime = date("Y-m-d", strtotime("-1 day")).$hour;
$endTime = date("Y-m-d").$hour;
$startTime = date('Y-m-d', strtotime('-1 day')).$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;
use App\Exception\custom\MarketingException;
use App\Models\marketing\mysql\ColonelDistributorColonel;
use App\Models\marketing\mysql\ColonelDistributorConfig;
use App\Models\marketing\mysql\ColonelDistributorInviteOrder;
use App\Models\marketing\mysql\ColonelDistributorInviteOrderNum;
use App\Models\marketing\mysql\ColonelDistributorPayInfo;
......@@ -32,11 +33,9 @@ class PindanActivityInviteOrderService
return true;
}
$date = date("Y-m-d");
$inviteOrderNumData = [
"colonel_user_id" => $params["colonel_user_id"],
"date" => $date,
"date" => date("Y-m-d")
];
$inviteOrderNum = ColonelDistributorInviteOrderNum::selectMaster("*", $inviteOrderNumData, []);
......@@ -75,10 +74,9 @@ class PindanActivityInviteOrderService
"order_id" => $orderId,
];
$date = date("Y-m-d");
$inviteOrderNumData = [
"colonel_user_id" => $inviteOrder[0]["colonel_user_id"],
"date" => $date,
"date" => date("Y-m-d"),
];
ColonelDistributorInviteOrder::beginTransaction();
......@@ -98,22 +96,13 @@ class PindanActivityInviteOrderService
}
/**
* 团长分销,昨日收入,总收入
* 团长分销,总收入
* @param array $params
* @return array
*/
public static function incomeStatistics($params = [])
{
$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], []);
$allData = [];
......@@ -125,11 +114,7 @@ class PindanActivityInviteOrderService
$data = [];
foreach ($userIds as $userId) {
$data[$userId]["yesterday_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])) {
$data[$userId]["all_reward"] = sprintf("%.1f", array_sum($allData[$userId]) / 100);
}
......@@ -138,6 +123,81 @@ class PindanActivityInviteOrderService
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
......@@ -146,22 +206,12 @@ class PindanActivityInviteOrderService
public static function inviteOrderNumberStatistics($params = [])
{
$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], []);
$allData = array_column($allNums, null, "colonel_user_id");
$data = [];
foreach ($userIds as $userId) {
$data[$userId]["yesterday_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])) {
$data[$userId]["all_order_num"] = $allData[$userId]["num"];
}
......
......@@ -6,7 +6,7 @@
"require": {
"php": "7.2.*",
"ext-json": "*",
"api/php_utils":"1.0.14",
"api/php_utils":"1.0.17",
"api/php_services":"1.0.13",
"ext-openssl": "*"
},
......
This diff is collapsed.
......@@ -13,4 +13,8 @@ idgen.key = "5cfdb867e96374c7883b31d6928cc4cb"
[prod : common]
[perf : common ]
[test: common ]
[dev : common ]
\ No newline at end of file
colonel.wallet.transfer_service_id="21090614423333205002"
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
{
// 增加traceId
if(is_array($headers)) {
$headers['X-TRACE-ID'] = Tracer::getTraceId();
$headers[] = 'X-TRACE-ID: ' . Tracer::getTraceId();
}
$url = $url ."?". http_build_query($params);
return self::curl($url, $timeout, $retries, $headers, [], $proxy, 'GET', $curl_opts);
......@@ -97,7 +97,7 @@ class HttpUtil
{
// 增加traceId
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);
}
......
<?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
* Loads the given class or interface.
*
* @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)
{
......@@ -347,6 +347,8 @@ class ClassLoader
return true;
}
return null;
}
/**
......
This diff is collapsed.
......@@ -67,6 +67,7 @@ return array(
'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\\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\\Message\\Email' => $vendorDir . '/api/php_utils/src/Message/Email.php',
'Api\\PhpUtils\\Mon\\MonUtil' => $vendorDir . '/api/php_utils/src/Mon/MonUtil.php',
......
......@@ -297,6 +297,7 @@ class ComposerStaticInit79ffc35c65c14e51408ef6c36a392383
'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\\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\\Message\\Email' => __DIR__ . '/..' . '/api/php_utils/src/Message/Email.php',
'Api\\PhpUtils\\Mon\\MonUtil' => __DIR__ . '/..' . '/api/php_utils/src/Mon/MonUtil.php',
......
......@@ -27,12 +27,12 @@
},
{
"name": "api/php_utils",
"version": "v1.0.14",
"version_normalized": "1.0.14.0",
"version": "v1.0.17",
"version_normalized": "1.0.17.0",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "a7bc4caaaee7aa1650e3055630860699c7fbc506"
"reference": "aa70ccdd545f3e421eaf717274954990f1805b87"
},
"require": {
"elasticsearch/elasticsearch": "~7.0",
......@@ -44,7 +44,7 @@
"mongodb/mongodb": "1.4.3",
"php": "7.2.*"
},
"time": "2021-09-01T03:11:17+00:00",
"time": "2021-09-06T08:57:33+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
......@@ -547,19 +547,13 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/promises.git",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d"
"reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
"url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"shasum": ""
},
"require": {
"php": ">=5.5"
......@@ -567,7 +561,7 @@
"require-dev": {
"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,
"type": "library",
"extra": {
......@@ -589,10 +583,25 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"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",
......@@ -601,8 +610,22 @@
],
"support": {
"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"
},
{
......@@ -612,19 +635,13 @@
"source": {
"type": "git",
"url": "https://github.com/guzzle/psr7.git",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91"
"reference": "9d006741ba865a45adccfac45d8e1053086a5a3f"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f",
"reference": "9d006741ba865a45adccfac45d8e1053086a5a3f",
"shasum": ""
},
"require": {
"php": ">=5.4.0",
......@@ -641,7 +658,7 @@
"suggest": {
"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",
"extra": {
"branch-alias": {
......@@ -662,13 +679,34 @@
"MIT"
],
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"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",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
......
This diff is collapsed.
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
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
| `is_rejected` | `Is::rejected` |
| `is_settled` | `Is::settled` |
| `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 @@
"keywords": ["promise"],
"license": "MIT",
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"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": {
......@@ -35,5 +50,9 @@
"branch-alias": {
"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:
strategy:
max-parallel: 10
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:
- name: Set up PHP
......@@ -23,8 +23,12 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2
- name: Mimic PHP 8.0
run: composer config platform.php 8.0.999
if: matrix.php > 8
- name: Install dependencies
run: composer update --no-interaction --no-progress --prefer-dist
run: composer update --no-interaction --no-progress
- name: Run tests
run: make test
......@@ -26,7 +26,7 @@ jobs:
- name: Download dependencies
uses: ramsey/composer-install@v1
with:
composer-options: --no-interaction --prefer-dist --optimize-autoloader
composer-options: --no-interaction --optimize-autoloader
- name: Start server
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
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
`$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
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",
"type": "library",
"description": "PSR-7 message implementation that also provides common utility methods",
"keywords": ["request", "response", "message", "stream", "http", "uri", "url", "psr-7"],
"license": "MIT",
"authors": [
{
"name": "Graham Campbell",
"email": "hello@gjcampbell.co.uk",
"homepage": "https://github.com/GrahamCampbell"
},
{
"name": "Michael Dowling",
"email": "mtdowling@gmail.com",
"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",
"email": "webmaster@tubo-world.de",
"homepage": "https://github.com/Tobion"
}
],
......@@ -45,5 +65,9 @@
"branch-alias": {
"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