Commit 51f935ee authored by luhongguang's avatar luhongguang

Merge branch 'master' into feature_cwf_wechat_bind

parents 81b1c0ce 824b111a
[26-Jun-2021 14:46:09 Asia/Shanghai] daemon:GoodsToEs 6245 [INFO]: process start now
[26-Jun-2021 14:46:09 Asia/Shanghai] daemon:GoodsToEs 6297 [INFO]: master process pid:6298
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP Warning: Use of undefined constant ROOT_PATH - assumed 'ROOT_PATH' (this will throw an Error in a future version of PHP) in /Users/admin/works/php/goods/vendor/api/php_services/src/Daemon/Daemon.php on line 139
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP Stack trace:
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP 1. {main}() /Users/admin/works/php/goods/public/cli.php:0
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP 2. Yaf\Dispatcher->dispatch($request = class Yaf\Request\Simple { public $method = ''; public $module = 'Cli'; public $controller = 'Daemon'; public $action = 'run'; public $uri:protected = ''; public $base_uri:protected = NULL; public $dispatched:protected = TRUE; public $routed:protected = TRUE; public $language:protected = ''; public $params:protected = ['t' => 'GoodsToEs'] }) /Users/admin/works/php/goods/public/cli.php:33
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP 3. DaemonController->RunAction() /Users/admin/works/php/goods/public/cli.php:33
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP 4. Api\PhpServices\Daemon\Daemon->start() /Users/admin/works/php/goods/application/modules/Cli/controllers/Daemon.php:52
[26-Jun-2021 14:46:09 Asia/Shanghai] PHP 5. Api\PhpServices\Daemon\Daemon->daemon() /Users/admin/works/php/goods/vendor/api/php_services/src/Daemon/Daemon.php:70
......@@ -14,6 +14,8 @@ class GoodsException extends BaseException
const PRINTER_ALREADY_EXIST = 36;
const EMPTY_OTA_ID = 37;
const OTA_NOT_EXIST = 38;
const RULE_LIMIT_ERROR = 50;
const NOT_FIND_MARKETING = 51;
protected $cus = [
0 => '商品创建失败,请稍后重试',
......@@ -65,5 +67,9 @@ class GoodsException extends BaseException
46 => '已经执行过cancel',
47 => 'sku rollback error',
48 => '请满足以下条件后提交,售价-分销总金额-手续费>=结算价',
49 => '库存不得小于已售库存',
self::RULE_LIMIT_ERROR => '单人可买上限填写错误',
self::NOT_FIND_MARKETING => '找不到活动',
52 => '过期时间不得小于等于上架开始时间',
];
}
\ No newline at end of file
......@@ -38,5 +38,6 @@ class MarketingException extends BaseException
self::TAKE_PLACE_NOT_EXIST => '自提点不存在',
21 => "活动开始时间不能大于或者等于结束时间",
22 => "自提点不能为空",
33 => '分润金额+手续费不能大于售价金额',
];
}
\ No newline at end of file
......@@ -21,5 +21,9 @@ class UserException extends BaseException
7 => '手机号获取失败',
8 => '绑定手机号失败',
9 => '该手机号已绑定其他用户不能重复绑定',
10 => 'mysql 异常',
11 => '头像昵称更新失败',
12 => '绑定手机号保存失败',
13 => '请求太频繁,稍后重试',
];
}
\ No newline at end of file
<?php
namespace Validate;
/**
* Class GoodsAuditValidate
*
* @package Validate
*/
class GoodsOnlineSiteValidate extends BaseValidate
{
protected $rule = [
'goods_spu_id' => 'require',
'online_type' => 'require',
];
protected $message = [
"goods_spu_id" => "商品id不能为空",
"online_type" => "设置类型不能为空",
];
}
\ No newline at end of file
......@@ -29,7 +29,11 @@ class TakePlace extends MysqlBase
$keywords = $params['keywords'] ?? '';
$offset = $params['offset'] ?? 0;
$limit = $params['limit'] ?? 20;
$takePlaceIds = $params['take_place_id'] ?? [];
if(!empty($takePlaceIds)) {
$where['take_place_id'] = $takePlaceIds;
}
if($lifeAccountId) {
$where['life_account_id'] = $lifeAccountId;
}
......
......@@ -26,6 +26,14 @@ class UserWechatBind extends MysqlBase
return self::get($columns, $where);
}
public static function getRecordMaster($where, $columns = [])
{
if (empty($columns)) {
$columns = '*';
}
return self::getMaster($columns, $where);
}
public static function getRecords($where, $columns = [])
{
if (empty($columns)) {
......@@ -34,7 +42,7 @@ class UserWechatBind extends MysqlBase
return self::select($columns, $where);
}
public static function getRecordMaster($where, $columns = [])
public static function getRecordsMaster ($where, $columns = [])
{
if (empty($columns)) {
$columns = '*';
......
......@@ -16,6 +16,7 @@ use \Validate\GoodsOnlineOfflineValidate;
use \Validate\PaySuccessGoodsCallbackValidate;
use \Validate\GoodsInitShopValidate;
use \Validate\PindanGoodsAddValidate;
use \Validate\GoodsOnlineSiteValidate;
use \App\Services\goods\ElasticGoodService;
use \App\Services\goods\MarketingPindanGoodsService;
use \App\Models\marketing\mysql\Marketing;
......@@ -118,6 +119,20 @@ class GoodsController extends Base
$this->success();
}
/**
* 修改商品定点上架设置
* @date 2021-08-25
* @license [license]
* @version [version]
*/
public function online_siteAction()
{
$params = $this->params;
(new GoodsOnlineSiteValidate())->validate();
GoodsService::onlineSite($params);
$this->success();
}
/**
* 审核通过/驳回
*/
......@@ -314,4 +329,14 @@ class GoodsController extends Base
$res = GoodsSnapshotsService::pindanGoodsSnapshots($this->params);
$this->success(["result" => $res]);
}
/**
* 通过goods_sku_id 获取 拼单商品的ota信息
* @throws Exception
*/
public function take_place_by_goods_sku_idsAction()
{
$res = GoodsService::getOtaInfoByGoodsSkuIds($this->params);
$this->success(["result" => $res]);
}
}
\ No newline at end of file
......@@ -34,8 +34,17 @@ class MarketingfororderController extends Base
public function take_place_listAction()
{
$params = $this->params;
$data = MarketingForOrderService::getMarketingTakePlaceList($params);
$this->success(["result" => $data]);
$takePlaceList = MarketingForOrderService::getMarketingTakePlaceList($params);
$addressList = [];
//
if (!empty($takePlaceList))
$addressList = array_values(array_unique(array_column($takePlaceList, 'address')));
//
$this->success(["result" => [
'take_place_list' => $takePlaceList,
'address_list' => $addressList
]]);
}
}
\ No newline at end of file
......@@ -33,6 +33,9 @@ class UserController extends Base
{
$params = $this->params;
$user = UserService::userWechatBind($params);
if( $user === false ) {
throw new UserException(['cus' => 10]);
}
$userInfo['result'] = $user;
$this->success($userInfo);
}
......
......@@ -12,6 +12,7 @@ use Api\PhpUtils\Common\BaseConvert;
use Api\PhpUtils\Common\GoodsSkuId;
use Api\PhpUtils\Http\HttpUtil;
use App\Exception\custom\GoodsException;
use App\Exception\custom\MarketingException;
use App\Models\goods\mysql\Category;
use App\Models\goods\mysql\GoodsOperationRecord;
use App\Models\goods\mysql\GoodsSku;
......@@ -20,6 +21,7 @@ use App\Models\goods\mysql\GoodsSkuSubShop;
use App\Models\goods\mysql\GoodsSnapshot;
use App\Models\goods\mysql\GoodsSpu;
use App\Models\goods\mysql\LifeAccountShopNum;
use App\Models\goods\mysql\Ota;
use App\Models\goods\mysql\PaySuccessGoodsCallbackRecord;
use App\Models\goods\mysql\PindanGoodsSku;
use App\Models\goods\mysql\Shop;
......@@ -36,6 +38,7 @@ use App\Services\common\CommonService;
use Api\PhpUtils\Http\Request;
use App\Exception\custom\InterfaceException;
class GoodsService
{
const CHARGEFEE = 0.006;
......@@ -154,11 +157,6 @@ class GoodsService
throw new GoodsException(['cus' => 2]);
}
$spuId = $res[0];
$checkName = self::checkGoodsName($spuData["goods_name"], $spuData["life_account_id"]);
if (!$checkName["can_use"]) {
throw new GoodsException(['cus' => 17]);
}
$spuParams = [
"goods_spu_id" => $spuId,
"shop_id" => $shopId,
......@@ -252,11 +250,43 @@ class GoodsService
"inventory_rest" => $skuData["inventory"],
"original_price" => empty($skuData["original_price"]) ? '' : $skuData["original_price"] * 100,
"price" => $skuData["price"] * 100,
"online_start_time" => empty($skuData["online_start_time"]) ? "" : $skuData["online_start_time"],
"online_end_time" => empty($skuData["online_end_time"]) ? "" : $skuData["online_end_time"],
"online_type" => empty($skuData["online_type"]) ? "" : $skuData["online_type"],
];
if (!empty($skuData["setmeal"])) {
$skuParams["setmeal"] = $skuData["setmeal"];
}
$online_type = empty($skuData["online_type"]) ? 0 : $skuData["online_type"];
switch ($online_type) {
case 1:
$skuParams['online_status'] = 0;
$skuParams['online_start_time'] = date("Y-m-d H:i:s");
break;
case 2:
$skuParams['online_status'] = 0;
break;
case 3:
$skuParams['online_status'] = 0;
break;
default:
$skuParams['online_type'] = 1;
$skuParams['online_status'] = 0;
$skuParams['online_start_time'] = date("Y-m-d H:i:s");
break;
}
if (!empty($skuData["online_type"])) {
//立即上架和定时上架
if (in_array($skuData["online_type"], [1,2])) {
if ($skuData["expiration_time"] <= $skuData['online_start_time']) {
throw new GoodsException(["cus" => 52]);
}
}
}
GoodsSku::save($skuParams);
self::addGoodsSkuPicRecord($skuId, $skuData);
return $skuId;
......@@ -404,6 +434,27 @@ class GoodsService
"rejected_reason" => $rejectedReason
];
}
if ($status == GoodsSku::STATUS_PASS) {
$online_type = empty($sku["online_type"]) ? 0 : $sku["online_type"];
if ($online_type == 1) {
$statusData['online_status'] = GoodsSku::ONLINE_STATUS_ONLINE;
$statusData['online_start_time'] = date("Y-m-d H:i:s");
}
//定点上架
if ($online_type == 2) {
$onlineStartTime = empty($sku["online_start_time"]) ? 0 : strtotime($sku["online_start_time"]);
if ($onlineStartTime > time()) {
$statusData['online_status'] = GoodsSku::ONLINE_STATUS_OFFLINE;
}
}
//暂不上架
if ($online_type == 3) {
$statusData['online_status'] = GoodsSku::ONLINE_STATUS_OFFLINE;
}
}
GoodsSku::save($statusData, ["goods_sku_id" => $sku["goods_sku_id"]]);
......@@ -477,8 +528,22 @@ class GoodsService
if ($onlineStatus == GoodsSku::ONLINE_STATUS_ONLINE && $sku["inventory_rest"] <= 0) {
throw new GoodsException(["cus" => 24]);
}
$goodsSkuData = ["online_status" => $onlineStatus];
if ($onlineStatus == GoodsSku::ONLINE_STATUS_OFFLINE){
$goodsSkuData['online_type'] = 3;
$goodsSkuData['online_start_time'] = null;
$goodsSkuData['online_end_time'] = null;
}
if ($onlineStatus == GoodsSku::ONLINE_STATUS_ONLINE){
$goodsSkuData['online_type'] = 1;
$goodsSkuData['online_start_time'] = date("Y-m-d H:i:s");
}
$goodsSkuId = $sku["goods_sku_id"];
GoodsSku::save(["online_status" => $onlineStatus], ["goods_sku_id" => $goodsSkuId]);
GoodsSku::save($goodsSkuData, ["goods_sku_id" => $goodsSkuId]);
//商品操作记录
$record = [
......@@ -509,6 +574,103 @@ class GoodsService
return true;
}
/**
* 设置商品上架
* @date 2021-08-25
* @copyright [copyright]
* @license [license]
* @version [version]
* @param $params [description]
* @return array [description]
*/
public static function onlineSite($params)
{
$goodsSpuId = $params["goods_spu_id"];
$onlineType = !empty($params["online_type"]) ? $params["online_type"] : 0;
$onlineStartTime = !empty($params["online_start_time"]) ? $params["online_start_time"] : null;
$onlineEndTime = !empty($params["online_end_time"]) ? $params["online_end_time"] : null;
GoodsSku::beginTransaction();
$goodsSkuList = GoodsSku::select("*", ["goods_spu_id" => $goodsSpuId]);
if (!empty($goodsSkuList)) {
foreach ($goodsSkuList as $sku) {
if ($sku["expiration_time"] < date("Y-m-d H:i:s")) {
throw new GoodsException(["cus" => 30]);
}
$goodsSkuId = $sku["goods_sku_id"];
$goodsSkuData = [
"online_type" => $onlineType,
"online_start_time" => $onlineStartTime,
"online_end_time" => $onlineEndTime
];
if ($onlineType == 1) {
if ($sku['audit_status'] == 1) {
$goodsSkuData['online_status'] = GoodsSku::ONLINE_STATUS_ONLINE;
}
$goodsSkuData['online_start_time'] = date("Y-m-d H:i:s");
}
//暂不上架
if ($onlineType == 3) {
//$goodsSkuData['audit_status'] = 0;
if ($sku['audit_status'] == 1) {
$goodsSkuData['online_status'] = GoodsSku::ONLINE_STATUS_OFFLINE;
}else{
$goodsSkuData['online_status'] = 0;
}
}
if ($onlineType == 2) {
$onlineStartTime = strtotime($goodsSkuData['online_start_time']);
if ($onlineStartTime > time()) {
if ($sku['audit_status'] == 1) {
$goodsSkuData['online_status'] = GoodsSku::ONLINE_STATUS_OFFLINE;
}else{
$goodsSkuData['online_status'] = 0;
}
}
}
//立即上架和定时上架
if (in_array($onlineType, [1,2])) {
if ($sku["expiration_time"] <= $goodsSkuData['online_start_time']) {
throw new GoodsException(["cus" => 52]);
}
}
$operatorId = empty($params["user_id"]) ? 0 : $params["user_id"];
$operatorName = !empty($params["user_name"]) ? $params["user_name"] : '';
//商品操作记录
$record = [
"goods_spu_id" => $goodsSpuId,
"goods_sku_id" => $goodsSkuId,
"operator_id" => $operatorId,
"operator_name" => $operatorName,
"goods_status" => $sku["audit_status"],
"online_status" => !empty($goodsSkuData['online_status']) ? $goodsSkuData['online_status'] : $sku["online_status"],
"before_version" => $sku["goods_version"],
"after_version" => $sku["goods_version"],
"note" => empty($params["rejected_reason"]) ? "" : $params["rejected_reason"],
];
GoodsOperationRecord::insertRecord($record);
GoodsSku::save($goodsSkuData, ["goods_sku_id" => $goodsSkuId]);
//上架的话,生成快照
self::addGoodsSnapshot($sku);
self::updateGoodsInfoToEs($goodsSkuId);
}
}
if (!GoodsSku::commit()) {
GoodsSku::rollback();
throw new GoodsException(["cus" => 11]);
}
return true;
}
/**
* 生成快照数据
* @param $skuInfo
......@@ -606,13 +768,6 @@ class GoodsService
*/
private static function editGoodsSpu($goodsSpu, $params = [])
{
$checkName = self::checkGoodsName($params["goods_name"], $goodsSpu["life_account_id"], $goodsSpu["goods_spu_id"]);
if (!$checkName["can_use"]) {
throw new GoodsException(['cus' => 17]);
}
return GoodsSpu::save([
"goods_name" => $params["goods_name"],
"desc_pic_url" => $params["desc_pic_url"],
......@@ -701,10 +856,8 @@ class GoodsService
"goods_version" => (int)$skuData["goods_version"] + 1,
];
//验证结算价格
if (!empty($params["clear_price"])) {
self::checkClearPrice($goodsSkuId, $skuParams);
}
//验证结算价格/分销金额
self::checkClearPrice($goodsSkuId, $skuParams);
if (self::isInitGoodsStatus($params, $skuData)) {
$skuParams["audit_status"] = GoodsSku::STATUS_AUDIT;
......@@ -714,6 +867,28 @@ class GoodsService
$skuParams["setmeal"] = $params["setmeal"];
}
if (!empty($params["online_start_time"])) {
$skuParams['online_start_time'] = empty($params["online_start_time"]) ? "" : $params["online_start_time"];
}
if (!empty($params["online_end_time"])) {
$skuParams['online_end_time'] = empty($params["online_end_time"]) ? "" : $params["online_end_time"];
}
if (!empty($params["online_type"])) {
$skuParams['online_type'] = empty($params["online_type"]) ? 0 : $params["online_type"];
}
if (!empty($params["online_type"])) {
//立即上架和定时上架
if (in_array($params["online_type"], [1,2])) {
if ($skuData["expiration_time"] <= $skuParams['online_start_time']) {
throw new GoodsException(["cus" => 52]);
}
}
}
//商品操作记录
$record = [
"goods_spu_id" => $skuData["goods_spu_id"],
......@@ -744,6 +919,9 @@ class GoodsService
$clearPrice = $skuParams["clear_price"];
$price = $skuParams["price"];
$chargeFee = !empty($price) ? (float)bcmul($price , self::CHARGEFEE,2) : 0; //手续费 (分)
if ($chargeFee<1) {
$chargeFee = 0;
}
if ($clearPrice > 0 && $clearPrice > $price) {
throw new GoodsException(['cus' => 39]);
}
......@@ -759,22 +937,41 @@ class GoodsService
if (!empty($marketings)) {
foreach ($marketings as $marketing) {
if ($marketing["commission_mode"] == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal = ($marketing["first_commission_value"] + $marketing["second_commission_value"]) / 10000 * $price;
if (($price - $commissionTotal - $chargeFee) < $clearPrice) {
throw new GoodsException(['cus' => 40]);
if ($clearPrice > 0) {
if ($marketing["commission_mode"] == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal = ($marketing["first_commission_value"] + $marketing["second_commission_value"]) / 10000 * $price;
if (($price - $commissionTotal - $chargeFee) < $clearPrice) {
throw new GoodsException(['cus' => 40]);
}
}
if ($marketing["commission_mode"] == Marketing::COMMISSION_MODE_FIXED) {
$commissionTotal = ($marketing["first_commission_value"] + $marketing["second_commission_value"]);
if (($price - $commissionTotal - $chargeFee) < $clearPrice) {
throw new GoodsException(['cus' => 40]);
}
}
}else{
//比例计算
if ($marketing["commission_mode"] == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal = ($marketing["first_commission_value"] + $marketing["second_commission_value"]) / 10000 * $price;
if ($price < ($commissionTotal+$chargeFee)) {
throw new MarketingException(['cus'=>33]);
}
}
}
if ($marketing["commission_mode"] == Marketing::COMMISSION_MODE_FIXED) {
$commissionTotal = ($marketing["first_commission_value"] + $marketing["second_commission_value"]);
if (($price - $commissionTotal - $chargeFee) < $clearPrice) {
throw new GoodsException(['cus' => 40]);
//固定金额
if ($marketing["commission_mode"] == Marketing::COMMISSION_MODE_FIXED) {
$commissionTotal = ($marketing["first_commission_value"] + $marketing["second_commission_value"]);
if ($price < ($commissionTotal+$chargeFee)) {
throw new MarketingException(['cus'=>33]);
}
}
}
}
}else{
if (($price - $chargeFee) < $clearPrice) {
if ($clearPrice > 0 && (($price - $chargeFee) < $clearPrice)) {
throw new GoodsException(['cus' => 40]);
}
}
......@@ -859,6 +1056,9 @@ class GoodsService
$data["goods_info"]["clear_price"] = empty($sku["clear_price"]) ? "" : $sku["clear_price"] / 100;
$data["goods_info"]["price"] = $sku["price"] / 100;
$data["goods_info"]["inventory"] = $sku["inventory_rest"];
$data["goods_info"]["online_type"] = $sku["online_type"];
$data["goods_info"]["online_start_time"] = $sku["online_start_time"];
$data["goods_info"]["online_end_time"] = $sku["online_end_time"];
$categoryNameList = Category::select("name", ["category_id" => [$sku["category_1_id"], $sku["category_2_id"]]]);
$data["goods_info"]["category_1_name"] = $categoryNameList[0];
......@@ -1002,14 +1202,31 @@ class GoodsService
//是否是分销活动
$runningMarketing = MarketingGoodsService::getRunningMarketing([$params["goods_sku_id"]]);
$data["goods_info"]["is_fenxiao"] = false;
if (!empty($runningMarketing[$params["goods_sku_id"]])) {
$data["goods_info"]["is_fenxiao"] = true;
}
$marketingInfoList = MarketingGoods::select(["marketing_id", "goods_sku_id"], ["goods_sku_id" => $params["goods_sku_id"]]);
$data["goods_info"]['goods_share_code'] = CommonService::getGoodsShareId($params);
if (!empty($marketingInfoList)) {
foreach ($marketingInfoList as $marketingInfo) {
$marketingInfoIds[$marketingInfo["goods_sku_id"]] = $marketingInfo["marketing_id"];
}
$marketingIds = array_values($marketingInfoIds);
$now = date("Y-m-d H:i:s");
$resMarketingList = Marketing::select("*", ["start_time[<]" => $now, "end_time[>]" => $now, "marketing_id" => $marketingIds, "marketing_type" => Marketing::MARKETING_TYPE_FENXIAO]);
if (!empty($resMarketingList)) {
foreach ($resMarketingList as $res) {
$marketingList[$res["marketing_id"]] = $res;
}
}
}
$marketing = !empty($marketingList) ? current($marketingList) : [];
$data["goods_info"]['goods_share_code'] = CommonService::getGoodsShareId($params);
//当前人是否是团长
$data["goods_info"]["is_tuanzhang"] = false;
if (!empty($params["user_id"])) {
......@@ -1018,7 +1235,11 @@ class GoodsService
$data["goods_info"]["is_tuanzhang"] = true;
if (!empty($runningMarketing)) {
//分销返现多少钱
$data["goods_info"]["cash_back"] = sprintf("%.2f",$runningMarketing[$params["goods_sku_id"]] * $data["goods_info"]["price"]);
if (!empty($marketing) && $marketing['commission_mode'] == 2) {
$data["goods_info"]["cash_back"] = (float)sprintf("%.2f",$runningMarketing[$params["goods_sku_id"]]);
}else{
$data["goods_info"]["cash_back"] = (float)sprintf("%.2f",$runningMarketing[$params["goods_sku_id"]] * $data["goods_info"]["price"]);
}
}
}
}
......@@ -1069,13 +1290,23 @@ class GoodsService
$where['ORDER'] = ["create_time" => "DESC"];
$list = GoodsSku::select(["goods_spu_id", "goods_sku_id", "goods_name", "category_1_id", "category_2_id", "life_account_id",
"publish_user_id", "update_time", "create_time", "audit_status", "online_status"],
"publish_user_id", "update_time", "create_time", "audit_status", "online_status","online_start_time","online_end_time","online_type"],
$where);
if (!empty($list)) {
foreach ($list as $key => $item) {
$nameList = Category::select("name", ["category_id" => [$item["category_1_id"], $item["category_2_id"]]]);
$list[$key]["category_1_name"] = $nameList[0];
$list[$key]["category_2_name"] = $nameList[1];
if ($item['online_type'] == 3) {
$list[$key]["online_start_time"] = "";
$list[$key]["online_end_time"] = "";
}
if ($item['online_type'] == 1) {
$list[$key]["online_end_time"] = "";
}
}
}
return ["list" => $list, "count" => $count];
......@@ -1597,7 +1828,7 @@ class GoodsService
if (!empty($marketing) && $marketing["marketing_type"] == Marketing::MARKETING_TYPE_PINDAN) {
$marketingPindan = MarketingPindan::getRecord(["marketing_id" => $marketingId]);
if (!empty($marketingPindan)) {
$rowCount = MarketingPindan::save(["participate_number" => $marketingPindan["participate_number"] + $num]
$rowCount = MarketingPindan::save(["participate_number[+]" => $num]
, ["marketing_pindan_id" => $marketingPindan["marketing_pindan_id"]]);
if ($rowCount <= 0) {
GoodsSku::rollback();
......@@ -1718,4 +1949,29 @@ class GoodsService
}
return true;
}
/**
* 通过goods_sku_id 获取 拼单商品的ota信息
* @param array $params
* @return array
*/
public static function getOtaInfoByGoodsSkuIds($params = [])
{
$data = [];
$goodsSkuIds = empty($params["goods_sku_ids"]) ? [] : $params["goods_sku_ids"];
if (!empty($goodsSkuIds)) {
$pindanGoodsSkus = PindanGoodsSku::select(["goods_sku_id", "ota_id"], ["goods_sku_id" => $goodsSkuIds]);
$otaIds = array_column($pindanGoodsSkus, "ota_id");
$otaInfos = Ota::select("*", ["ota_id" => $otaIds]);
$otaIds = array_column($otaInfos, "ota_id");
$otaInfos = array_column($otaInfos, null, "ota_id");
foreach ($pindanGoodsSkus as $sku) {
if (in_array($sku["ota_id"], $otaIds)) {
$data[$sku["goods_sku_id"]] = $otaInfos[$sku["ota_id"]];
}
}
}
return $data;
}
}
\ No newline at end of file
......@@ -143,6 +143,7 @@ class MarketingPindanGoodsService
"goods_name" => $spuData["marketing_name"],
"desc_pic_url" => $spuData["desc_pic_url"],
"desc" => $spuData["desc"],
"rule_limit" => empty($skuData["rule_limit"]) ? 0 : $skuData["rule_limit"],
"goods_type" => empty($spuData["goods_type"]) ? GoodsSpu::TYPE_ENTITY : $spuData["goods_type"],
"goods_sub_type" => empty($spuData["goods_sub_type"]) ? GoodsSpu::SUB_TYPE_INSTANT : $spuData["goods_sub_type"],
"belong_type" => empty($spuData["belong_type"]) ? GoodsSpu::BELONG_TYPE_DISANFANG : $spuData["belong_type"],
......@@ -164,12 +165,6 @@ class MarketingPindanGoodsService
*/
private static function addGoodsSku($spuData, $shopId, $skuData = [])
{
$pindanSku = PindanGoodsSku::get("goods_sku_id", ["goods_name" => $skuData["goods_name"]
, "life_account_id" => $skuData["life_account_id"]]);
if (!empty($pindanSku)) {
throw new GoodsException(['cus' => 17]);
}
$res = GoodsService::getIdgenId(substr($shopId, -2), "goods");
if (empty($res)) {
throw new GoodsException(['cus' => 2]);
......@@ -191,6 +186,12 @@ class MarketingPindanGoodsService
if ($checkGoodsDesc) {
throw new GoodsException(['cus' => 20]);
}
//判断是否是整数
if (!empty($skuData["rule_limit"]) && (!is_numeric($skuData["rule_limit"]) || strpos($skuData["rule_limit"], ".") !== false)) {
throw new GoodsException(['cus' => GoodsException::RULE_LIMIT_ERROR]);
}
$skuParams = [
"goods_sku_id" => $skuId,
"goods_spu_id" => $spuData["goods_spu_id"],
......@@ -202,6 +203,7 @@ class MarketingPindanGoodsService
"goods_name" => $skuData["goods_name"],
"desc_pic_url" => $skuData["desc_pic_url"],
"desc" => $skuData["desc"],
"rule_limit" => empty($skuData["rule_limit"]) ? 0 : $skuData["rule_limit"],
"inventory_total" => $skuData["inventory"],
"inventory_rest" => $skuData["inventory"],
"original_price" => empty($skuData["original_price"]) ? "" : $skuData["original_price"] * 100,
......@@ -259,14 +261,10 @@ class MarketingPindanGoodsService
*/
private static function editGoodsSpu($goodsSpu, $params = [])
{
$checkName = GoodsService::checkGoodsName($params["goods_name"], $goodsSpu["life_account_id"], $goodsSpu["goods_spu_id"]);
if (!$checkName["can_use"]) {
throw new GoodsException(['cus' => 17]);
}
return GoodsSpu::save([
"desc_pic_url" => $params["desc_pic_url"],
"desc" => $params["desc"],
"rule_limit" => empty($params["rule_limit"]) ? 0 : $params["rule_limit"],
], ["goods_spu_id" => $goodsSpu["goods_spu_id"]]);
}
......@@ -282,7 +280,12 @@ class MarketingPindanGoodsService
private static function editGoodsSku($goodsSkuId, $skuData, $params = [])
{
$inventoryCount = $skuData["inventory_rest"] + $params["inventory_add"];
//$inventoryCount = $params["inventory"];
$inventoryTotal = $skuData["inventory_total"] + $params["inventory_add"];
if ($inventoryTotal < $skuData["inventory_lock"] + $skuData["total_amount_order"]) {
throw new GoodsException(['cus' => 49]);
}
if ($inventoryCount < 0) {
throw new GoodsException(['cus' => 18]);
}
......@@ -303,12 +306,17 @@ class MarketingPindanGoodsService
throw new GoodsException(['cus' => 34]);
}
//判断是否是整数
if (!empty($params["rule_limit"]) && (!is_numeric($params["rule_limit"]) || strpos($params["rule_limit"], ".") !== false)) {
throw new GoodsException(['cus' => GoodsException::RULE_LIMIT_ERROR]);
}
$skuParams = [
"goods_name" => $params["goods_name"],
"desc_pic_url" => $params["desc_pic_url"],
"desc" => $params["desc"],
"inventory_total" => $skuData["inventory_total"] + $params["inventory_add"],
"rule_limit" => empty($params["rule_limit"]) ? 0 : $params["rule_limit"],
"inventory_total" => $inventoryTotal,
"ota_id" => empty($params["ota_id"]) ? 0 : $params["ota_id"],
"inventory_rest" => $inventoryCount,
"original_price" => empty($params["original_price"]) ? "" : $params["original_price"] * 100,
......
......@@ -193,9 +193,6 @@ class DistributorService
}
$jwUserId = '';
// if (empty($distributorCode)) {
// throw new DistributorException(['cus'=>9]);
// }
$info = Distributor::getRecord(['user_id' => $shareUserId]);
if (empty($info)) {
......
......@@ -11,6 +11,7 @@ use App\Models\marketing\mysql\Marketing;
use App\Models\marketing\mysql\MarketingGoods;
use App\Models\marketing\mysql\MarketingTakePlace;
use App\Models\marketing\mysql\TakePlace;
use App\Services\marketing\MarketingService;
class MarketingForOrderService
{
......@@ -22,7 +23,8 @@ class MarketingForOrderService
public static function getMarketingList($params)
{
$where['marketing_type'] = !empty($params['marketing_type']) ? $params['marketing_type'] : Marketing::MARKETING_TYPE_PINDAN;
return Marketing::select(["marketing_id", "marketing_name", "create_time"], ["marketing_type" => $where['marketing_type']]);
$where['life_account_id'] = MarketingService::getPublicLifeAccountId();
return Marketing::select(["marketing_id", "marketing_name", "create_time"], $where);
}
/**
......@@ -58,10 +60,10 @@ class MarketingForOrderService
$takePlaceList = [];
if (!empty($takePlaceIdList)) {
$takePlaceIdArr = array_column($takePlaceIdList, "take_place_id");
$takePlaceList = TakePlace::select(["take_place_id", "take_place_name", "create_time"], ["take_place_id" => $takePlaceIdArr]);
$takePlaceList = TakePlace::select(["take_place_id", "take_place_name", "create_time", "address"], ["take_place_id" => $takePlaceIdArr]);
}
} else {
$takePlaceList = TakePlace::select(["take_place_id", "take_place_name", "create_time"]);
$takePlaceList = TakePlace::select(["take_place_id", "take_place_name", "create_time", "address"]);
}
return $takePlaceList;
}
......
......@@ -52,7 +52,8 @@ class MarketingGoodsService
}
public static function marketingGoodsList($params)
{
$limit = !empty($params['num']) ? $params['num'] : 20;
//@todo 分页放大100倍,主要解决商品到期和商品库存为零的过滤场景
$limit = !empty($params['num']) ? $params['num']*100 : 1000;
$userId = !empty($params['user_id']) ? $params['user_id'] : '';
......@@ -108,7 +109,7 @@ class MarketingGoodsService
$onlineStatus = !empty($goodsSkuList[$value['goods_sku_id']]['online_status']) ? $goodsSkuList[$value['goods_sku_id']]['online_status'] : '';
if (!empty($inventoryRest) && $expirationTime> date("Y-m-d H:i:s") && $onlineStatus == 1 ) {
if (!empty($inventoryRest) && $expirationTime > date("Y-m-d H:i:s") && $onlineStatus == 1 ) {
$list[$i]['inventory_rest'] = !empty($goodsSkuList[$value['goods_sku_id']]['inventory_rest']) ? $goodsSkuList[$value['goods_sku_id']]['inventory_rest'] : '';
$list[$i] = $value;
$list[$i]['life_account_id'] = !empty($goodsSkuList[$value['goods_sku_id']]['life_account_id']) ? $goodsSkuList[$value['goods_sku_id']]['life_account_id'] : '';
......@@ -149,12 +150,12 @@ class MarketingGoodsService
//比例
if (!empty($secondCommission) && $commissionMode == 1) {
$price = !empty($list[$i]['price']) ? $list[$i]['price'] : 0;
$list[$i]['share_price'] = substr(sprintf("%.4f",$secondCommission*$price/100),0,-2);
$list[$i]['share_price'] = (float) substr(sprintf("%.4f",$secondCommission*$price/100),0,-2);
}
//固定
if (!empty($commissionMode) && $commissionMode == 2) {
$list[$i]['share_price'] = substr(sprintf("%.4f",$secondCommission/100),0,-2);
$list[$i]['share_price'] = (float) substr(sprintf("%.4f",$secondCommission),0,-2);
}
$content = $userId .'_' .$value['marketing_id'];
......@@ -164,8 +165,9 @@ class MarketingGoodsService
}
}
}
$result = ['result' => $list ,'last_id' => $lastId];
$hasmore = !empty($list) ? 1 : 0 ;
$result = ['result' => $list ,'last_id' => $lastId, 'hasmore' => $hasmore];
return $result;
}
......@@ -193,9 +195,13 @@ class MarketingGoodsService
$data = [];
foreach ($marketingInfoIds as $goodsSkuId => $marketingId) {
if (!empty($marketingList[$marketingId]["second_commission_value"])) {
if (!empty($marketingList[$marketingId]["second_commission_value"]) && $marketingList[$marketingId]["commission_mode"] == 1) {
$data[$goodsSkuId] = substr(sprintf("%.4f", $marketingList[$marketingId]["second_commission_value"]/10000), 0, -2);
}
if (!empty($marketingList[$marketingId]["second_commission_value"]) && $marketingList[$marketingId]["commission_mode"] == 2) {
$data[$goodsSkuId] = substr(sprintf("%.4f", $marketingList[$marketingId]["second_commission_value"]/100), 0, -2);
}
}
return $data;
}
......
......@@ -4,6 +4,8 @@
namespace App\Services\marketing;
use Api\PhpServices\Ksy\Ks3Api;
use Api\PhpUtils\Http\HttpUtil;
use App\Exception\custom\InterfaceException;
use App\Models\goods\mysql\Ota;
use App\Models\goods\mysql\PindanGoodsSku;
use App\Models\marketing\mysql\Marketing;
......@@ -91,7 +93,7 @@ class MarketingService
$where = [
'online_status' => 1,
'rule_refund' => 2,
//'rule_refund' => 2,
"expiration_time[>]" => date("Y-m-d"),
];
......@@ -267,6 +269,8 @@ class MarketingService
foreach ($list as $key => $value) {
$marketingIds[] = $value["marketing_id"];
}
//参与人数:当前拼单成功支付的订单总数量
$userCount = self::getHaveBuyGoodsUserCount(["marketing_id" => $marketingIds]);
$marketingPindanData = MarketingPindan::select(["marketing_id", "publish_life_account_id",
"min_price", "max_price", "pindan_desc","participate_number", "pindan_pic"]
......@@ -287,9 +291,10 @@ class MarketingService
if (!empty($priceData[$value["marketing_id"]])) {
$currentLifeAccountId = $priceData[$value["marketing_id"]]["publish_life_account_id"];
//小程序前端过滤掉线上测试生活号发布的活动
// if ($params['from'] == 1 && $currentLifeAccountId == self::ONLINE_LIFE_ACCOUNT_ID_TEST) {
// continue;
// }
//TODO::预发环境要调整这里
if ($params['from'] == 1 && $currentLifeAccountId == self::ONLINE_LIFE_ACCOUNT_ID_TEST) {
continue;
}
$lists[$key]["publish_life_account_id"] = $currentLifeAccountId;
if (!empty($lifeAccountList[$currentLifeAccountId])) {
......@@ -302,7 +307,7 @@ class MarketingService
$lists[$key]["max_price"] = sprintf("%.2f", $priceData[$value["marketing_id"]]["max_price"] / 100);
$lists[$key]["pindan_pic_url"] = $picUrl;
$lists[$key]["pindan_desc"] = $priceData[$value["marketing_id"]]["pindan_desc"];
$lists[$key]["participate_number"] = $priceData[$value["marketing_id"]]["participate_number"];
$lists[$key]["participate_number"] = empty($userCount[$value['marketing_id']]) ? 0 : $userCount[$value['marketing_id']];
$shareDefaultStr = empty($priceData[$value["marketing_id"]]["pindan_pic"]) ? $defaultPic : $priceData[$value["marketing_id"]]["pindan_pic"];
$strList = explode(",", $shareDefaultStr);
......@@ -488,6 +493,9 @@ class MarketingService
$clearPrice = !empty($value["clear_price"]) ? $value["clear_price"] : 0;
$price = !empty($value["price"]) ? $value["price"] : 0;
$chargeFee = !empty($price) ? (float)bcmul($price , self::CHARGEFEE,2) : 0; //手续费 (分)
if ($chargeFee < 1) {
$chargeFee = 0;
}
if (!empty($clearPrice) && $clearPrice > 0) {
if ($commissionMode == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal = ($firstCommissionRate + $secondCommissionRate) / 10000 * $price;
......@@ -502,7 +510,25 @@ class MarketingService
throw new GoodsException(['cus' => 48]);
}
}
}else{
//比例计算
if ($commissionMode == Marketing::COMMISSION_MODE_RATE) {
$commissionTotal = ($firstCommissionRate + $secondCommissionRate) / 10000 * $price;
if ($price < ($commissionTotal+$chargeFee)) {
throw new MarketingException(['cus'=>33]);
}
}
//固定金额
if ($commissionMode == Marketing::COMMISSION_MODE_FIXED) {
$commissionTotal = ($firstCommissionRate + $secondCommissionRate);
if ($price < ($commissionTotal+$chargeFee)) {
throw new MarketingException(['cus'=>33]);
}
}
}
$colums[$key]['marketing_id'] = $marketingId;
$colums[$key]['goods_spu_id'] = $value['goods_spu_id'];
......@@ -622,11 +648,16 @@ class MarketingService
}
$marketingGoods = [];
foreach ($skuInfoList as $key => $skuInfo) {
$marketingGoods[$key]["goods_spu_id"] = $skuInfo["goods_spu_id"];
$marketingGoods[$key]["goods_sku_id"] = $skuInfo["goods_sku_id"];
$tempSkuInfoList = array_column($skuInfoList, null, "goods_sku_id");
foreach ($goodsSkuId as $key => $skuId) {
if (empty($tempSkuInfoList[$skuId]["goods_spu_id"])) {
continue;
}
$marketingGoods[$key]["goods_spu_id"] = $tempSkuInfoList[$skuId]["goods_spu_id"];
$marketingGoods[$key]["goods_sku_id"] = $skuId;
$marketingGoods[$key]["marketing_id"] = $marketingId;
}
MarketingGoods::save($marketingGoods);
//自提点
......@@ -763,11 +794,16 @@ class MarketingService
}
}
$marketingGoods = [];
foreach ($skuInfoList as $key => $skuInfo) {
$marketingGoods[$key]["goods_spu_id"] = $skuInfo["goods_spu_id"];
$marketingGoods[$key]["goods_sku_id"] = $skuInfo["goods_sku_id"];
$tempSkuInfoList = array_column($skuInfoList, null, "goods_sku_id");
foreach ($goodsSkuId as $key => $skuId) {
if (empty($tempSkuInfoList[$skuId]["goods_spu_id"])) {
continue;
}
$marketingGoods[$key]["goods_spu_id"] = $tempSkuInfoList[$skuId]["goods_spu_id"];
$marketingGoods[$key]["goods_sku_id"] = $skuId;
$marketingGoods[$key]["marketing_id"] = $marketingId;
}
MarketingGoods::save($marketingGoods);
//自提点
......@@ -901,18 +937,22 @@ class MarketingService
private static function pindanMarketingInfo($params)
{
$marketingInfo = Marketing::getRecord(['marketing_id' => $params['marketing_id'], "marketing_type" => Marketing::MARKETING_TYPE_PINDAN]);
if (empty($marketingInfo))
throw new GoodsException(['cus' => GoodsException::NOT_FIND_MARKETING]);
$pindanMarketing = MarketingPindan::getRecord(['marketing_id' => $params['marketing_id']]);
$lifeAccountList = CommonService::getlifeAccountList(['life_account_id' => [$pindanMarketing["publish_life_account_id"]]]);
$goodsSkuList = MarketingGoods::marketingGoodsList(['marketing_id' => $params['marketing_id']]);
if (!empty($goodsSkuList)) {
$goodsSkuId = array_column($goodsSkuList , 'goods_sku_id');
$marketingGoodsList = MarketingGoods::marketingGoodsList(['marketing_id' => $params['marketing_id'], "ORDER" => ["id" => "ASC"]]);
if (!empty($marketingGoodsList)) {
$goodsSkuId = array_column($marketingGoodsList , 'goods_sku_id');
$goodsSkuList = PindanGoodsSku::select('*', ['goods_sku_id' => $goodsSkuId]);
}
empty($goodsSkuList) && $goodsSkuList = [];
$userCount = self::getHaveBuyGoodsUserCount(["marketing_id" => $params['marketing_id']]);
$userCount = empty($userCount[$params['marketing_id']]) ? 0 : $userCount[$params['marketing_id']];
$marketingData["life_account_name"] = $marketingData["life_account_icon"] = "";
if (!empty($lifeAccountList[$pindanMarketing["publish_life_account_id"]])) {
......@@ -932,7 +972,7 @@ class MarketingService
$marketingData["pindan_desc"] = $pindanMarketing["pindan_desc"];
$marketingData["max_price"] = sprintf("%.2f", $pindanMarketing["max_price"] / 100);
$marketingData["min_price"] = sprintf("%.2f", $pindanMarketing["min_price"] / 100);
$marketingData["participate_number"] = $pindanMarketing["participate_number"];
$marketingData["participate_number"] = $userCount;
$marketingData["create_time"] = $marketingInfo["create_time"];
$defaultPic = "SHQ_goods_0_012Xh1AQcMqu";
......@@ -945,6 +985,15 @@ class MarketingService
$info['marketing_info'] = $marketingData;
//有用户登录时候,当前用户购买的商品数量信息
$haveBuyGoodsStatistics = [];
if (!empty($params["user_id"])) {
$haveBuyGoodsStatistics = self::getHaveBuyGoodsStatistics(["user_id" => $params["user_id"], "marketing_id" => $marketingData["id"]]);
}
//活动中所有购买的商品数量信息
$allHaveBuyGoodsStatistics = self::getHaveBuyGoodsStatistics(["marketing_id" => $marketingData["id"]]);
if (!empty($goodsSkuList)) {
$otaIds = array_unique(array_column($goodsSkuList, "ota_id"));
$otas = Ota::select(["ota_id", "ota_name"], ["ota_id" => $otaIds]);
......@@ -952,12 +1001,45 @@ class MarketingService
$otasData[$item["ota_id"]] = $item;
}
foreach ($goodsSkuList as $key => $item) {
//这里是为了排序,按查 marketing_goods 出来的顺序排序
$tempGoodsSkuList = array_column($goodsSkuList, null, "goods_sku_id");
foreach ($marketingGoodsList as $key => $value) {
if (empty($tempGoodsSkuList[$value["goods_sku_id"]])) {
continue;
}
$item = $tempGoodsSkuList[$value["goods_sku_id"]];
$goodsSkuList[$key] = $item;
$goodsSkuList[$key]["desc_pic_url_list"] = GoodsService::getUrlList($item["desc_pic_url"]);
$goodsSkuList[$key]["ota_name"] = empty($otasData[$item["ota_id"]]["ota_name"]) ? "" : $otasData[$item["ota_id"]]["ota_name"];
$goodsSkuList[$key]["original_price"] = empty($item["original_price"]) ? '' : sprintf("%.2f", (int)$item["original_price"] / 100);
$goodsSkuList[$key]["price"] = sprintf("%.2f", $item["price"] / 100);
$goodsSkuList[$key]["have_buy_goods_count"] = 0;
//前端当前登录人的数据
$haveBuyGoodsSkuIds = array_keys($haveBuyGoodsStatistics);
if (in_array($item["goods_sku_id"], $haveBuyGoodsSkuIds)) {
$goodsSkuList[$key]["have_buy_goods_count"] = $haveBuyGoodsStatistics[$item["goods_sku_id"]];
}
//后台展示所有购买的数量
$goodsSkuList[$key]["all_have_buy_goods_count"] = 0;
$allHaveBuyGoodsSkuIds = array_keys($allHaveBuyGoodsStatistics);
if (in_array($item["goods_sku_id"], $allHaveBuyGoodsSkuIds)) {
$goodsSkuList[$key]["all_have_buy_goods_count"] = $allHaveBuyGoodsStatistics[$item["goods_sku_id"]];
$goodsSkuList[$key]["total_amount_sold"] = $allHaveBuyGoodsStatistics[$item["goods_sku_id"]];
}
}
//前端排序,后端不排库存
if (!empty($params["from"])) {
foreach ($goodsSkuList as $key => $item) {
if ($item["inventory_rest"] == 0) {
unset($goodsSkuList[$key]);
array_push($goodsSkuList, $item);
}
}
$goodsSkuList = array_values($goodsSkuList);
}
}
$takePlaceIds = MarketingTakePlace::getRecords(["marketing_id" => $marketingData["id"]], ["take_place_id"]);
......@@ -1014,4 +1096,44 @@ class MarketingService
"count" => $count]], []);
return $res['id_snow'][$type] ?? [];
}
/**
* 指定活动的已购买商品统计
* @param array $params
* @return array|mixed
* @throws InterfaceException
*/
public static function getHaveBuyGoodsStatistics($params = [])
{
$url = config('interface', 'order.order.have_buy_order_statistics');
if (empty($url)) {
throw new InterfaceException(['cus' => 0]);
}
$res = HttpUtil::get($url, $params);
$data = [];
if ($res['code'] == 0 && isset($res['response']["result"])) {
$data = $res["response"]["result"];
}
return $data;
}
/**
* 参与人数:当前拼单成功支付的订单总数量,退款订单不刨除
* @param array $params
* @return array|mixed
* @throws InterfaceException
*/
public static function getHaveBuyGoodsUserCount($params = [])
{
$url = config('interface', 'order.order.have_buy_goods_user_count');
if (empty($url)) {
throw new InterfaceException(['cus' => 0]);
}
$res = HttpUtil::get($url, $params);
$data = [];
if ($res['code'] == 0 && isset($res['response']["result"])) {
$data = $res["response"]["result"];
}
return $data;
}
}
\ No newline at end of file
......@@ -14,6 +14,8 @@ use Api\PhpServices\Idgen\Idgen;
use Api\PhpUtils\Redis\RedisUtil;
use Api\PhpServices\JwUser\JwUser;
use App\Services\common\CommonService;
use Api\PhpUtils\Log\FileLog;
use Api\PhpUtils\Lock\FrequencyLockUtil;
class UserService
{
......@@ -28,9 +30,24 @@ class UserService
$inviteUserId = !empty($params['invite_user_id']) ? intval($params['invite_user_id']) : 0;//邀请用户id
$activityType = !empty($params['activity_type']) ? intval($params['activity_type']) : 0;//活动类型
if (empty($code) && empty($openid)) {
FileLog::error("wechatLogin:获取参数为空", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 0]);
}
$redis = RedisUtil::getInstance('cache');
$key = "wx_wechat_login_".$code;
$keyCode = "wx_wechat_login_code_".$code;
$lock = FrequencyLockUtil::isLocked($key,1,120);
if ($lock) {
sleep(1);
$user = $redis->get($keyCode);
if (!empty($user)) {
$user = json_decode($user,true);
}
FileLog::error("wechatLogin: lock", json_encode($user, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
FileLog::error("wechatLogin: lock--params", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
return $user;
}
//需要授权微信
//if (empty($openid)) {
......@@ -53,6 +70,7 @@ class UserService
if (empty($response) || array_key_exists('errcode', $response)) {
//throw new \Exception('获取openid失败:' . $response['errcode']);
FileLog::error("wechatLogin:获取openid失败", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 1]);
}
//检查系统是已注册
......@@ -60,7 +78,7 @@ class UserService
//}
$user = UserWechatBind::getRecord(['openid' => $openid]);
$user = UserWechatBind::getRecordMaster(['openid' => $openid]);
//如果系统不存在,用户信息,则注册新用户
if (empty($user) && !empty($response)) {
$insert = [
......@@ -72,8 +90,13 @@ class UserService
'create_time' => date("Y-m-d H:i:s")
];
$newWechatId = UserWechatBind::save($insert);
$sessionKey = !empty($response['session_key']) ? $response['session_key'] : '';
//$newWechatId = UserWechatBind::save($insert);
$newWechatId =UserWechatBind::insertDuplicate($insert, ['session_key' => $sessionKey,'create_time' => date("Y-m-d H:i:s")]);
if (!$newWechatId) {
FileLog::error("wechatLogin:登陆创建用户失败", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
FileLog::error("wechatLogin:登陆创建用户失败--insert", json_encode($insert, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 2]);
}
......@@ -82,17 +105,21 @@ class UserService
$user['session_key'] = $response['session_key'];
}else{
if (empty($user)) {
FileLog::error("wechatLogin:登陆创建用户失败-- 微信response", json_encode($response, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 2]);
}
if (empty($response)){
FileLog::error("wechatLogin:登陆创建用户失败-- 微信response 获取失败", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 2]);
}
$insert = [
'session_key' => !empty($response['session_key']) ? $response['session_key'] : '',
];
$newWechatId = UserWechatBind::save($insert,['openid' => $openid]);
}
$user['third_session'] = self::generate3rdSession($openid);
$redis->set($keyCode, json_encode($user),120);
return $user;
}
......@@ -106,47 +133,47 @@ class UserService
$appid = \Yaf\Registry::get('config')->wechat->appid;
if (!$encryptedData) {
FileLog::error("bindPhone:encryptedData 为空", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 3]);
}
if (!$iv) {
FileLog::error("bindPhone:iv 为空", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 4]);
}
$userInfo = UserWechatBind::getRecord(['openid' => $openid]);
$userInfo = UserWechatBind::getRecordMaster(['openid' => $openid]);
$sessionKey = !empty($userInfo['session_key']) ? $userInfo['session_key'] : '';
$openid = isset($userInfo['openid']) && $userInfo['openid'] ? $userInfo['openid'] : '';
if (empty($userInfo) || !$sessionKey || !$openid) {
FileLog::error("bindPhone:userInfo获取失败", json_encode($userInfo, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 5]);
}
//解密
$decryptData = [];
$wXBizDataCrypt = new WxBizDataCrypt($appid, $sessionKey);
$errCode = $wXBizDataCrypt->decryptData($encryptedData, $iv, $decryptData);
if ($errCode) {
FileLog::error("bindPhone:解密失败", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 6]);
}
// 手机号解密成功
// 手机号解密失败
if (empty($decryptData['phoneNumber'])) {
FileLog::error("bindPhone:手机号解密失败", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
FileLog::error("bindPhone:手机号解密失败--decryptData", json_encode($decryptData, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 7]);
}
$phoneNumber = strval($decryptData['phoneNumber']);
//判断是否已
$user = UserWechatBind::getRecord(['phone' => $phoneNumber]);
$user = UserWechatBind::getRecordMaster(['phone' => $phoneNumber]);
if (!empty($user) && $openid != $user['openid']) {
FileLog::error("bindPhone:该手机号已绑定其他用户不能重复绑定", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
FileLog::error("bindPhone:该手机号已绑定其他用户不能重复绑定--user", json_encode($user, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 9]);
}
......@@ -164,12 +191,16 @@ class UserService
];
$bindStatus = UserWechatBind::save($update,['wechat_id' => $userInfo['wechat_id']]);
if (empty($bindStatus)){
FileLog::error("bindPhone:绑定手机号保存失败", json_encode($update, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 12]);
}
if (!$phoneNumber) {
FileLog::error("bindPhone:该手机号已绑定其他用户不能重复绑定--user", json_encode($user, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 8]);
}
CommonService::isNewUser($params);
$isNewUser = CommonService::isNewUser(['openid' => $openid]);
if (!empty($isNewUser) && $isNewUser['is_new_user'] == 1) {
$userInfo['is_pop_up'] = 1;
......@@ -215,10 +246,17 @@ class UserService
"city" => !empty($params['city']) ? $params['city'] : '',
"language" => !empty($params['language']) ? $params['language'] : '',
];
$bindStatus = UserWechatBind::save($update,['openid' => $params['openid']]);
$user = UserWechatBind::getRecordMaster(['openid' => $params['openid']]);
if (empty($user)){
$update['openid'] = $params['openid'];
$bindStatus = UserWechatBind::save($update);
}else{
$bindStatus = UserWechatBind::save($update,['openid' => $params['openid']]);
}
if (!$bindStatus) {
throw new UserException(['cus' => 8]);
FileLog::error("bindAvatar:绑定头像失败", json_encode($params, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
FileLog::error("bindAvatar:绑定头像失败--update", json_encode($update, JSON_UNESCAPED_UNICODE),'','jianghaiming@yidian-inc.com');
throw new UserException(['cus' => 11]);
}
return $update;
}
......
......@@ -6,8 +6,8 @@
"require": {
"php": "7.2.*",
"ext-json": "*",
"api/php_utils":"1.0.10",
"api/php_services":"1.0.1",
"api/php_utils":"1.0.12",
"api/php_services":"1.0.9",
"ext-openssl": "*"
},
"minimum-stability": "dev",
......
......@@ -4,15 +4,15 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "d50c89a59fac1ed443c2ff43906a2d3a",
"content-hash": "ca6dee79e7768d386ea8636e9f10a52d",
"packages": [
{
"name": "api/php_services",
"version": "v1.0.1",
"version": "v1.0.9",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "ab75ba5d34e8ee22e8628234a45de8a0dee0a51c"
"reference": "cd08caa8f11627220db0d5f13cfb99198a1e7076"
},
"require": {
"endroid/qr-code": "^3.9",
......@@ -26,15 +26,15 @@
}
},
"description": "bp api php_services",
"time": "2021-08-02T14:35:19+00:00"
"time": "2021-08-24T10:07:07+00:00"
},
{
"name": "api/php_utils",
"version": "v1.0.10",
"version": "v1.0.12",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "4fb2b99ebe6cc3ad1a99bece88f217874de5db85"
"reference": "bb58e98113fdd1a439828bb61cc716b0de0b6b0c"
},
"require": {
"elasticsearch/elasticsearch": "~7.0",
......@@ -53,7 +53,7 @@
}
},
"description": "bp api php_utils",
"time": "2021-08-12T11:16:58+00:00"
"time": "2021-08-24T08:58:56+00:00"
},
{
"name": "bacon/bacon-qr-code",
......@@ -67,7 +67,13 @@
"type": "zip",
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"dasprid/enum": "^1.0.3",
......@@ -120,7 +126,13 @@
"type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
"reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9",
......@@ -167,7 +179,13 @@
"type": "zip",
"url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": ">=1.3.7",
......@@ -236,7 +254,13 @@
"type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"bacon/bacon-qr-code": "^2.0",
......@@ -311,7 +335,13 @@
"type": "zip",
"url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8",
"reference": "abe3791d231167f14eb80d413420d1eab91163a8",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0"
......@@ -365,7 +395,13 @@
"type": "zip",
"url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ezimuel/guzzlestreams": "^3.0.1",
......@@ -420,7 +456,13 @@
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"guzzlehttp/promises": "^1.0",
......@@ -489,7 +531,13 @@
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.5"
......@@ -545,7 +593,13 @@
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0",
......@@ -620,7 +674,13 @@
"type": "zip",
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.6"
......@@ -675,7 +735,13 @@
"type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-hash": "*",
......@@ -739,7 +805,13 @@
"type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7",
"reference": "d178027d1e679832db9f38248fcc7200647dc2b7",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": "*",
......@@ -799,7 +871,13 @@
"type": "zip",
"url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": "*",
......@@ -861,7 +939,13 @@
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.3.0"
......@@ -915,7 +999,13 @@
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.3.0"
......@@ -965,7 +1055,13 @@
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.6"
......@@ -1009,7 +1105,13 @@
"type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0"
......@@ -1069,7 +1171,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1131,13 +1239,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e"
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/4b78e55b179003a42523a362cc0e8327f7a69b5e",
"reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e",
"shasum": ""
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1176,7 +1290,7 @@
"options"
],
"support": {
"source": "https://github.com/symfony/options-resolver/tree/5.3"
"source": "https://github.com/symfony/options-resolver/tree/5.4"
},
"funding": [
{
......@@ -1192,7 +1306,7 @@
"type": "tidelift"
}
],
"time": "2021-08-04T21:20:46+00:00"
"time": "2021-08-17T14:20:01+00:00"
},
{
"name": "symfony/polyfill-ctype",
......@@ -1206,7 +1320,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1286,7 +1406,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1368,7 +1494,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1453,7 +1585,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1534,7 +1672,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1614,7 +1758,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1692,13 +1842,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/property-access.git",
"reference": "aaa09eb714623e935494b5852c1eff260b704ae1"
"reference": "7831b0331b786db39026d190faa4914f94adb212"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/aaa09eb714623e935494b5852c1eff260b704ae1",
"reference": "aaa09eb714623e935494b5852c1eff260b704ae1",
"shasum": ""
"url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212",
"reference": "7831b0331b786db39026d190faa4914f94adb212",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1765,7 +1921,7 @@
"type": "tidelift"
}
],
"time": "2021-08-09T12:23:16+00:00"
"time": "2021-08-17T14:20:01+00:00"
},
{
"name": "symfony/property-info",
......@@ -1773,13 +1929,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/property-info.git",
"reference": "63eddb6d10fffe3f25d901d78fef37ca88838b22"
"reference": "3565216f9640b26b646855e39e7bfafc550c75db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/63eddb6d10fffe3f25d901d78fef37ca88838b22",
"reference": "63eddb6d10fffe3f25d901d78fef37ca88838b22",
"shasum": ""
"url": "https://api.github.com/repos/symfony/property-info/zipball/3565216f9640b26b646855e39e7bfafc550c75db",
"reference": "3565216f9640b26b646855e39e7bfafc550c75db",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1855,7 +2017,7 @@
"type": "tidelift"
}
],
"time": "2021-07-21T12:43:48+00:00"
"time": "2021-08-23T12:58:54+00:00"
},
{
"name": "symfony/string",
......@@ -1863,13 +2025,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "c29a3e649843f4a34eaa4be2683f4914e8b7f023"
"reference": "2342deb63fb5f8c45c5c190656d9aa0377792143"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/c29a3e649843f4a34eaa4be2683f4914e8b7f023",
"reference": "c29a3e649843f4a34eaa4be2683f4914e8b7f023",
"shasum": ""
"url": "https://api.github.com/repos/symfony/string/zipball/2342deb63fb5f8c45c5c190656d9aa0377792143",
"reference": "2342deb63fb5f8c45c5c190656d9aa0377792143",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1938,7 +2106,7 @@
"type": "tidelift"
}
],
"time": "2021-06-27T12:34:25+00:00"
"time": "2021-08-17T14:20:01+00:00"
}
],
"packages-dev": [],
......@@ -1953,5 +2121,5 @@
"ext-openssl": "*"
},
"platform-dev": [],
"plugin-api-version": "2.0.0"
"plugin-api-version": "2.1.0"
}
......@@ -31,6 +31,6 @@ exception.sys.msg = "系统未定义异常,研发正在赶来的路上..."
[prod : common : exception]
[pre : common : exception]
[perf : common : exception]
[test : common : exception]
[dev : common : exception]
\ No newline at end of file
......@@ -11,6 +11,6 @@ idgen.partner = "bp"
idgen.key = "5cfdb867e96374c7883b31d6928cc4cb"
[prod : common]
[pre : common ]
[perf : common ]
[test: common ]
[dev : common ]
\ No newline at end of file
......@@ -29,8 +29,10 @@ class Goods implements DaemonServiceInterface
GoodsSku::save($colums, $where);
//更新es
GoodsService::updateGoodsInfoToEs($where['goods_sku_id']);
}
$this->onlineGoods();
$this->onlineOffGoods();
}
......@@ -53,4 +55,65 @@ class Goods implements DaemonServiceInterface
GoodsService::updateGoodsInfoToEs($where['goods_sku_id']);
}
}
/**
*
* 自动上线
*/
public function onlineGoods()
{
sleep(2);
$orderData = [
'online_type' => 2,
'online_status' => [0,2],
'audit_status' => 1,
'online_start_time[<]' => date("Y-m-d H:i:s",time()),
'online_end_time[>]' => date("Y-m-d H:i:s",time()),
'LIMIT' => 100,
];
$goodsList = GoodsSku::getRecords($orderData);
DaemonLog::info('DaemonServiceOnline_goods', json_encode($goodsList));
foreach ($goodsList as $key => $value) {
$where = [];
$where['goods_sku_id'] = !empty($value['goods_sku_id']) ? $value['goods_sku_id'] : '';
$colums = [
'online_status' => 1,
];
GoodsSku::save($colums, $where);
//更新es
GoodsService::updateGoodsInfoToEs($where['goods_sku_id']);
}
}
/**
*
* 自动下架
*/
public function onlineOffGoods()
{
sleep(2);
$orderData = [
'online_type' => 2,
'online_status' => 1,
'audit_status' => 1,
'online_end_time[<]' => date("Y-m-d H:i:s",time()),
'LIMIT' => 100,
];
$goodsList = GoodsSku::getRecords($orderData);
DaemonLog::info('DaemonServiceOnlineOff_goods', json_encode($goodsList));
foreach ($goodsList as $key => $value) {
$where = [];
$where['goods_sku_id'] = !empty($value['goods_sku_id']) ? $value['goods_sku_id'] : '';
$colums = [
'online_status' => 2,
];
GoodsSku::save($colums, $where);
//更新es
GoodsService::updateGoodsInfoToEs($where['goods_sku_id']);
}
}
}
\ No newline at end of file
......@@ -6,8 +6,9 @@ namespace Daemon;
use Api\PhpServices\Daemon\DaemonServiceInterface;
use Api\PhpUtils\Log\DaemonLog;
use App\Services\marketing\MarketingService;
use App\Models\marketing\mysql\Marketing;
use Api\PhpServices\Wechat\Msg;
use App\Models\marketing\mysql\MarketingPindan;
class Pindan implements DaemonServiceInterface
{
......@@ -22,15 +23,18 @@ class Pindan implements DaemonServiceInterface
}
try{
//查询进行中的拼单活动
$params['marketing_type'] = 4;//1分销 2团购 3秒杀 4团餐
$params['online_status'] = 1;//状态 , 1启用,2关闭,3 到期
$params['activity_status'] = 2;//1 未开始,2进行中,3已结束
$params['page'] = 1;
$params['page_size'] = 1;
$list = MarketingService::marketingList($params);
//查询进行中的 今天开始的 拼单活动 --昨天16:40以后开始的活动 视为新上的活动
$lastStartTime = date("Y-m-d 16:40:00",strtotime('-1 days'));
$now = date("Y-m-d H:i:00");
$where['marketing_type'] = 4;
$where['online_status'] = 1;
$where["start_time[<=]"] = $now;
$where["start_time[>]"] = $lastStartTime;
$where["end_time[>=]"] = $now;
$where['ORDER'] = ["update_time" => "DESC"];
$marketing = Marketing::get(['marketing_id','marketing_name','start_time'], $where);
if(empty($list['result'])) {
if(empty($marketing)) {
DaemonLog::info(
'DaemonServiceInterface_pindan',
'no need to send at'.date('Y-m-d H:i:s')
......@@ -38,6 +42,7 @@ class Pindan implements DaemonServiceInterface
sleep(60);
return false;
}
$pindan = MarketingPindan::get(["pindan_desc"], ["marketing_id" => $marketing["marketing_id"]]);
//给订阅用户发送消息
//http://ydwiki.yidian-inc.com/pages/viewpage.action?pageId=71667995
......@@ -47,10 +52,11 @@ class Pindan implements DaemonServiceInterface
$type = 2; // 1 公众号 2 小程序
//活动信息
$params = [
self::emojiFilter($list['result'][0]['marketing_name']),
$list['result'][0]['create_time'],
$list['result'][0]['pindan_desc'] ?: self::DEFAULT_DESC
self::emojiFilter($marketing['marketing_name']),
$marketing['start_time'],
$pindan['pindan_desc'] ?: self::DEFAULT_DESC
];
//发送消息
DaemonLog::info(
'DaemonServiceInterface_pindan',
......
{
"name": "xxx",
"version": "0.0.0",
}
\ No newline at end of file
......@@ -232,4 +232,23 @@ class JwUser
}
return !empty($ret['response']) ? $ret['response'] : [];
}
/**
* 是否关注公众号
*/
public static function isSubscribe($params)
{
$url = config('interface', 'service.jw_user.is_subscribe');
if (!$url) {
throw new CodeSpecialException("failed");
}
//$ret = (new TimeOut())->runPost($url, $params);
$ret = (new Request())->post($url, $params, 0, '', '', 0, true, 'jw_user');
FileLog::info('getWechatOpenid', json_encode($ret));
if (!$ret) {
throw new CodeSpecialException("timeout");
}
return !empty($ret['response']) ? $ret['response'] : [];
}
}
......@@ -39,6 +39,11 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
*/
private const API_PRINTER_STATUS = "Open_queryPrinterStatus";
/**
* 添加打印机
*/
private const API_ADD_PRINTER = "Open_printerAddlist";
/**
* @param string $apiName api 名字
......@@ -74,10 +79,20 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
/**
* @inheritDoc
* @throws \Exception
*/
public function addPrinter(array $param): bool
{
// TODO: Implement addPrinter() method.
$res = $this->request(self::API_ADD_PRINTER, [
'printerContent' => "{$param['printer_sn']} # {$param['printer_key']} # {$param['ota_name']}",
]);
if ($res['code'] == 0 && isset($res['response'])) {
if ($res['response']['ret'] == 0) {
return $res['response']['data'];
}
throw new \Exception($res['response']['msg']);
}
throw new \Exception("接口调用异常");
}
/**
......@@ -90,24 +105,26 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
/**
* @inheritDoc
* @throws \Exception
*/
public function getPrinterStatus(string $printerId): string
{
$res = $this->request(self::API_PRINTER_STATUS, [
'sn' => $printerId,
'sn' => $printerId,
]);
if ($res['code'] == 0 && isset($res['response'])) {
if ($res['response']['ret'] == 0) {
return $res['response']['data'];
}
throw new Exception($res['response']['msg']);
throw new \Exception($res['response']['msg']);
}
throw new Exception("接口调用异常");
throw new \Exception("接口调用异常");
}
/**
* @inheritDoc
* @throws \Exception
*/
public function printContent(string $printerId, array $content):string
{
......@@ -133,13 +150,14 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
if ($res['response']['ret'] == 0) {
return $res['response']['data'];
}
throw new Exception($res['response']['msg']);
throw new \Exception($res['response']['msg']);
}
throw new Exception("接口调用异常");
throw new \Exception("接口调用异常");
}
/**
* @inheritDoc
* @throws \Exception
*/
public function getOrderStatus(string $orderId): bool
{
......@@ -150,8 +168,8 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
if ($res['response']['ret'] == 0) {
return (bool) $res['response']['data'];
}
throw new Exception($res['response']['msg']);
throw new \Exception($res['response']['msg']);
}
throw new Exception("接口调用异常");
throw new \Exception("接口调用异常");
}
}
\ No newline at end of file
......@@ -3,6 +3,9 @@
namespace Api\PhpServices\ShopImage;
use Api\PhpServices\Ksy\Ksyun;
use Api\PhpUtils\Ksy\Ks3Util;
use Api\PhpUtils\Log\FileLog;
use Endroid\QrCode\ErrorCorrectionLevel;
use Endroid\QrCode\QrCode;
......@@ -203,7 +206,7 @@ class GetImage
// 老价格
if($old_price){
$color = ImageColorAllocate ($im, 187, 187, 187);
imagettftext($im, 13,0, 173, 957, $color ,$this->font_h, "¥".$price);
imagettftext($im, 13,0, 173, 957, $color ,$this->font_h, "¥".$old_price);
$del_path = __DIR__.'/images/3_del.png';
list($del_w,$del_h) = getimagesize($del_path);
......@@ -247,7 +250,9 @@ class GetImage
imagedestroy($tuijian_img);
imagedestroy($qr_img);
imagedestroy($logo_im);
imagedestroy($del_im);
if($old_price){
imagedestroy($del_im);
}
imagedestroy($user_im);
}
......@@ -391,4 +396,75 @@ class GetImage
}
return $res;
}
public function buildShareImgByGoodsAvatarSrc($goodsAvatarSrc){
$tmpImg = '/tmp/'.md5($goodsAvatarSrc);
file_put_contents($tmpImg,file_get_contents($goodsAvatarSrc));
if(!is_file($tmpImg)){
return '';
}
$imgType = getimagesize($tmpImg);
$descW = 500;
$descH = $imgType[1]/$imgType[0] * $descW;
if($descH > 280){
$descH = 280;
}
$baseRS = imagecreatefrompng(__DIR__.DIRECTORY_SEPARATOR.'images'.DIRECTORY_SEPARATOR.'goods_share_bg.png');
if(!$baseRS){
unlink($tmpImg);
return '';
}
switch ($imgType[2]){
case IMG_PNG:
$srcRS = imagecreatefrompng($tmpImg);
break;
case 3:
$srcRS = imagecreatefrompng($tmpImg);
break;
case IMG_JPEG:
$srcRS = imagecreatefromjpeg($tmpImg);
break;
case IMG_GIF:
$srcRS = imagecreatefromgif($tmpImg);
break;
}
if(!isset($srcRS) || !$srcRS){
unlink($tmpImg);
return '';
}
unlink($tmpImg);
$res = imagecopyresized($baseRS,$srcRS,0,0,0,0,$descW,$descH,$imgType[0],$imgType[1] );
if(!$res){
imagedestroy($srcRS);
imagedestroy($baseRS);
return '';
}
ob_start();
//header('Content-type:Images/png');
$ret = imagepng($baseRS,null,9);
// $imgContent = file_get_contents($tmpImg);
$imgContent = ob_get_clean();
if($ret){
imagedestroy($srcRS);
imagedestroy($baseRS);
if($imgContent){
return $this->uploadImage($imgContent);
}
return '';
}else{
imagedestroy($srcRS);
imagedestroy($baseRS);
}
return '';
}
private function uploadImage($fileContent){
$appid = 'merchant-b';
$scenario = 'id_card';
$object = Ksyun::getObjectAndBucket($appid,$scenario);
$bucket = $object['bucket'];
$objectKey = $object['objectId'].'.jpeg';
$str = Ks3Util::put_object($fileContent,$bucket,$objectKey, $timeout = 5000);
$url = Ksyun::getUrlFromKsyn($bucket.'/'.$objectKey, $appid);
return $url;
}
}
<?php
namespace Api\PhpServices\User;
use Api\PhpUtils\Http\Request;
use Api\PhpUtils\Log\FileLog;
class WechatBind
{
/**
* 获取微信绑定用户信息
*
* @param array $params
* $params['openid'=> 'openid', 'user_id'=> 123],非必填,至少一个
* @return array
*/
public static function getUserWechatBind($params)
{
$url = config('interface', 'goods.public.user_wechat_bind');
$res = (new Request())->get($url, $params);
if ($res['code'] == 0 && isset($res['response'])) {
return !empty($res['response']['result']) ? $res['response']['result'] : [];
}
return [];
}
/**
* 是否是新微信用户, 默认注册时间24小时以内算是新用户
*
* @param string $openid
* @return array
*/
public static function isNewWechatUser($openid, int $timeInterval = 86400)
{
$url = config('interface', 'goods.public.user_wechat_bind');
$res = (new Request())->get($url, ['openid'=> $openid]);
if ($res['code'] == 0 && isset($res['response'])) {
if(empty($res['response']['result'])) {
return true;//没有查到数据暂时先认定为新用户
}
$userInfo = $res['response']['result'];
$userInfo = current($userInfo);
if ((strtotime($userInfo['create_time']) + $timeInterval) > time()) {
return true;
}
}
// 没有查询到对应的openid数据
FileLog::error("调用isNewWechatUser方法未获取到数据:", json_encode(['openid' => $openid, 'timeInterval' => $timeInterval, 'res' => $res]));
return false;
}
}
......@@ -393,7 +393,7 @@ class IP
foreach ($ip as $one)
{
if (!self::is_intranet($one) && $one !== '')
if ($one !== '' && !self::is_intranet($one) && !self::is_shq($one))
{
$internet_ips[] = $one;
}
......@@ -417,4 +417,76 @@ class IP
($long >= 2886729728 && $long <= 2887778303) || //172.15.0.0 ~ 172.31.255.255
($long >= 3232235520 && $long <= 3232301055); //192.168.0.0 ~ 192.168.255.255
}
/**
* 判断是否简网生活圈优客云ip
*
* @param $ip
* @return bool
*/
public static function is_shq($ip)
{
$ipIgnoreArray = ['123.59.135.125',
'106.75.78.45',
'106.75.106.72',
'106.75.24.149',
'106.75.90.178',
'106.75.25.238',
'106.75.7.123',
'117.50.10.4',
'117.50.13.14',
'106.75.70.11',
'106.75.120.33',
'106.75.103.119',
'106.75.126.234',
'106.75.8.17',
'106.75.66.217',
'106.75.26.98',
'117.50.101.102',
'106.75.28.8',
'123.59.137.102',
'106.75.72.206',
'106.75.27.141',
'106.75.49.133',
'117.50.107.175',
'106.75.95.163',
'106.75.21.36',
'106.75.99.29',
'106.75.7.229',
'106.75.27.151',
'106.75.115.25',
'117.50.105.119',
'106.75.110.215',
'106.75.26.223',
'106.75.122.185',
'117.50.59.107',
'117.50.4.46',
'117.50.82.165',
'106.75.109.124',
'117.50.95.34',
'123.59.53.82',
'117.50.90.239',
'106.75.25.179',
'106.75.126.16',
'106.75.50.87',
'106.75.30.181',
'106.75.126.121',
'106.75.61.99',
'106.75.93.183',
'117.50.90.105',
'106.75.6.131',
'106.75.24.77',
'106.75.78.10',
'106.75.18.203',
'117.50.100.125',
'106.75.32.125',
'117.50.95.3',
'117.50.13.104',
'117.50.39.114',
'117.50.1.29',
'117.50.39.93',
'117.50.0.170'
];
return in_array($ip, $ipIgnoreArray);
}
}
......@@ -26,7 +26,7 @@ class Email
return false;
}
if (empty($from)) {
$from = 'noreply@yidian-inc.com';
$from = 'bp-noreply@yidian-inc.com';
}
try {
$email = explode('@', $from);
......
......@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit5871a7b0b10b793d91ef1c8029b23ea5::getLoader();
return ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf::getLoader();
......@@ -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;
}
/**
......
<?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;
use Composer\Autoload\ClassLoader;
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
{
private static $installed = array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => 'aa0ce40f0ea3b01d62acfef75790d113f0caee3d',
'name' => 'yidian/yaf_demo',
),
'versions' =>
array (
'api/php_services' =>
array (
'pretty_version' => 'v1.0.1',
'version' => '1.0.1.0',
'aliases' =>
array (
),
'reference' => 'ab75ba5d34e8ee22e8628234a45de8a0dee0a51c',
),
'api/php_utils' =>
array (
'pretty_version' => 'v1.0.10',
'version' => '1.0.10.0',
'aliases' =>
array (
),
'reference' => '4fb2b99ebe6cc3ad1a99bece88f217874de5db85',
),
'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' => '4b78e55b179003a42523a362cc0e8327f7a69b5e',
),
'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' => 'aaa09eb714623e935494b5852c1eff260b704ae1',
),
'symfony/property-info' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '63eddb6d10fffe3f25d901d78fef37ca88838b22',
),
'symfony/string' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'c29a3e649843f4a34eaa4be2683f4914e8b7f023',
),
'yidian/yaf_demo' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => 'aa0ce40f0ea3b01d62acfef75790d113f0caee3d',
),
),
);
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;
}
private static $installed;
private static $canGetVendors;
private static $installedByVendor = array();
/**
* Returns a list of all package names which are present, either by being installed, replaced or provided
*
* @return string[]
* @psalm-return list<string>
*/
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)));
}
/**
* Returns a list of all package names with a specific type e.g. 'library'
*
* @param string $type
* @return string[]
* @psalm-return list<string>
*/
public static function getInstalledPackagesByType($type)
{
$packagesByType = array();
foreach (self::getInstalled() as $installed) {
foreach ($installed['versions'] as $name => $package) {
if (isset($package['type']) && $package['type'] === $type) {
$packagesByType[] = $name;
}
}
}
return $packagesByType;
}
/**
* Checks whether the given package is installed
*
* This also returns true if the package name is provided or replaced by another package
*
* @param string $packageName
* @param bool $includeDevRequirements
* @return bool
*/
public static function isInstalled($packageName, $includeDevRequirements = true)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
}
}
return false;
}
/**
* Checks whether the given package satisfies a version constraint
*
* e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
*
* Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
*
* @param VersionParser $parser Install composer/semver to have access to this class and functionality
* @param string $packageName
* @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
*/
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
/**
* Returns a version constraint representing all the range(s) which are installed for a given package
*
* It is easier to use this via isInstalled() with the $constraint argument if you need to check
* whether a given version of a package is installed, and not just whether it exists
*
* @param string $packageName
* @return string Version constraint usable with composer/semver
*/
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');
}
/**
* @param string $packageName
* @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
*/
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');
}
/**
* @param string $packageName
* @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
*/
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');
}
/**
* @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
*/
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');
}
/**
* @param string $packageName
* @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.
*/
public static function getInstallPath($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
/**
* @return array
* @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
*/
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
/**
* Returns the raw installed.php data for custom implementations
*
* @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.
* @return array[]
* @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}>}
*/
public static function getRawData()
{
@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);
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// 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') {
self::$installed = include __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
return self::$installed;
}
/**
* Returns the raw data of all installed.php which are currently loaded for custom implementations
*
* @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}>}>
*/
public static function getAllRawData()
{
return self::getInstalled();
}
/**
* Lets you reload the static array from another file
*
* This is only useful for complex integrations in which a project needs to use
* 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.
*
* A typical case would be PHPUnit, where it would need to make sure it reads all
* the data it needs from this class, then call reload() with
* `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
* the project in which it runs can then also use this class safely, without
* interference between PHPUnit's dependencies and the project's dependencies.
*
* @param array[] $data A vendor/composer/installed.php data set
* @return void
*
* @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
*/
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
/**
* @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}>}>
*/
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';
if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
self::$installed = $installed[count($installed) - 1];
}
}
}
}
if (null === self::$installed) {
// only require the installed.php file if this file is loaded from its dumped location,
// 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') {
self::$installed = require __DIR__ . '/installed.php';
} else {
self::$installed = array();
}
}
$installed[] = self::$installed;
return $installed;
}
}
......@@ -38,6 +38,7 @@ return array(
'Api\\PhpServices\\Sms\\Sms' => $vendorDir . '/api/php_services/src/Sms/Sms.php',
'Api\\PhpServices\\Towerpro\\Towerpro' => $vendorDir . '/api/php_services/src/Towerpro/Towerpro.php',
'Api\\PhpServices\\Tuffy\\TuffyService' => $vendorDir . '/api/php_services/src/Tuffy/TuffyService.php',
'Api\\PhpServices\\User\\WechatBind' => $vendorDir . '/api/php_services/src/User/WechatBind.php',
'Api\\PhpServices\\Wechat\\Msg' => $vendorDir . '/api/php_services/src/Wechat/Msg.php',
'Api\\PhpServices\\XhProfiler\\XhMongo' => $vendorDir . '/api/php_services/src/XhProfiler/XhMongo.php',
'Api\\PhpServices\\XhProfiler\\XhProfilerService' => $vendorDir . '/api/php_services/src/XhProfiler/XhProfilerService.php',
......
......@@ -8,18 +8,18 @@ $baseDir = dirname($vendorDir);
return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'3a37ebac017bc098e9a86b35401e7a68' => $vendorDir . '/mongodb/mongodb/src/functions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
);
......@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit5871a7b0b10b793d91ef1c8029b23ea5
class ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf
{
private static $loader;
......@@ -24,15 +24,15 @@ class ComposerAutoloaderInit5871a7b0b10b793d91ef1c8029b23ea5
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit5871a7b0b10b793d91ef1c8029b23ea5', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit5871a7b0b10b793d91ef1c8029b23ea5', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
......@@ -53,19 +53,19 @@ class ComposerAutoloaderInit5871a7b0b10b793d91ef1c8029b23ea5
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5::$files;
$includeFiles = Composer\Autoload\ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire5871a7b0b10b793d91ef1c8029b23ea5($fileIdentifier, $file);
composerRequire14d712e6ba9ca61e9e636d6cf65f43bf($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire5871a7b0b10b793d91ef1c8029b23ea5($fileIdentifier, $file)
function composerRequire14d712e6ba9ca61e9e636d6cf65f43bf($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
......
......@@ -4,25 +4,25 @@
namespace Composer\Autoload;
class ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5
class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
);
public static $prefixLengthsPsr4 = array (
......@@ -267,6 +267,7 @@ class ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5
'Api\\PhpServices\\Sms\\Sms' => __DIR__ . '/..' . '/api/php_services/src/Sms/Sms.php',
'Api\\PhpServices\\Towerpro\\Towerpro' => __DIR__ . '/..' . '/api/php_services/src/Towerpro/Towerpro.php',
'Api\\PhpServices\\Tuffy\\TuffyService' => __DIR__ . '/..' . '/api/php_services/src/Tuffy/TuffyService.php',
'Api\\PhpServices\\User\\WechatBind' => __DIR__ . '/..' . '/api/php_services/src/User/WechatBind.php',
'Api\\PhpServices\\Wechat\\Msg' => __DIR__ . '/..' . '/api/php_services/src/Wechat/Msg.php',
'Api\\PhpServices\\XhProfiler\\XhMongo' => __DIR__ . '/..' . '/api/php_services/src/XhProfiler/XhMongo.php',
'Api\\PhpServices\\XhProfiler\\XhProfilerService' => __DIR__ . '/..' . '/api/php_services/src/XhProfiler/XhProfilerService.php',
......@@ -1300,9 +1301,9 @@ class ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit5871a7b0b10b793d91ef1c8029b23ea5::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$classMap;
}, null, ClassLoader::class);
}
......
......@@ -2,19 +2,19 @@
"packages": [
{
"name": "api/php_services",
"version": "v1.0.1",
"version_normalized": "1.0.1.0",
"version": "v1.0.9",
"version_normalized": "1.0.9.0",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "ab75ba5d34e8ee22e8628234a45de8a0dee0a51c"
"reference": "cd08caa8f11627220db0d5f13cfb99198a1e7076"
},
"require": {
"endroid/qr-code": "^3.9",
"perftools/php-profiler": "^0.18.0",
"php": "7.2.*"
},
"time": "2021-08-02T14:35:19+00:00",
"time": "2021-08-24T10:07:07+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
......@@ -27,12 +27,12 @@
},
{
"name": "api/php_utils",
"version": "v1.0.10",
"version_normalized": "1.0.10.0",
"version": "v1.0.12",
"version_normalized": "1.0.12.0",
"source": {
"type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_utils.git",
"reference": "4fb2b99ebe6cc3ad1a99bece88f217874de5db85"
"reference": "bb58e98113fdd1a439828bb61cc716b0de0b6b0c"
},
"require": {
"elasticsearch/elasticsearch": "~7.0",
......@@ -44,7 +44,7 @@
"mongodb/mongodb": "1.4.3",
"php": "7.2.*"
},
"time": "2021-08-12T11:16:58+00:00",
"time": "2021-08-24T08:58:56+00:00",
"type": "library",
"installation-source": "source",
"autoload": {
......@@ -68,7 +68,13 @@
"type": "zip",
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"dasprid/enum": "^1.0.3",
......@@ -124,7 +130,13 @@
"type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
"reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9",
......@@ -174,7 +186,13 @@
"type": "zip",
"url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": ">=1.3.7",
......@@ -246,7 +264,13 @@
"type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"bacon/bacon-qr-code": "^2.0",
......@@ -324,7 +348,13 @@
"type": "zip",
"url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8",
"reference": "abe3791d231167f14eb80d413420d1eab91163a8",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0"
......@@ -381,7 +411,13 @@
"type": "zip",
"url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ezimuel/guzzlestreams": "^3.0.1",
......@@ -439,7 +475,13 @@
"type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"guzzlehttp/promises": "^1.0",
......@@ -511,7 +553,13 @@
"type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"reference": "8e7d04f1f6450fef59366c399cfad4b9383aa30d",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.5"
......@@ -570,7 +618,13 @@
"type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/dc960a912984efb74d0a90222870c72c87f10c91",
"reference": "dc960a912984efb74d0a90222870c72c87f10c91",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0",
......@@ -648,7 +702,13 @@
"type": "zip",
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.6"
......@@ -706,7 +766,13 @@
"type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-hash": "*",
......@@ -773,7 +839,13 @@
"type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7",
"reference": "d178027d1e679832db9f38248fcc7200647dc2b7",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": "*",
......@@ -836,7 +908,13 @@
"type": "zip",
"url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"ext-json": "*",
......@@ -901,7 +979,13 @@
"type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.3.0"
......@@ -958,7 +1042,13 @@
"type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.3.0"
......@@ -1011,7 +1101,13 @@
"type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.6"
......@@ -1058,7 +1154,13 @@
"type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=5.4.0"
......@@ -1121,7 +1223,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1186,13 +1294,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/options-resolver.git",
"reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e"
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/4b78e55b179003a42523a362cc0e8327f7a69b5e",
"reference": "4b78e55b179003a42523a362cc0e8327f7a69b5e",
"shasum": ""
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1200,7 +1314,7 @@
"symfony/polyfill-php73": "~1.0",
"symfony/polyfill-php80": "^1.16"
},
"time": "2021-08-04T21:20:46+00:00",
"time": "2021-08-17T14:20:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
......@@ -1233,7 +1347,7 @@
"options"
],
"support": {
"source": "https://github.com/symfony/options-resolver/tree/5.3"
"source": "https://github.com/symfony/options-resolver/tree/5.4"
},
"funding": [
{
......@@ -1264,7 +1378,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1347,7 +1467,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1432,7 +1558,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1520,7 +1652,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1604,7 +1742,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1687,7 +1831,13 @@
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
"shasum": ""
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.1"
......@@ -1768,13 +1918,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/property-access.git",
"reference": "aaa09eb714623e935494b5852c1eff260b704ae1"
"reference": "7831b0331b786db39026d190faa4914f94adb212"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/aaa09eb714623e935494b5852c1eff260b704ae1",
"reference": "aaa09eb714623e935494b5852c1eff260b704ae1",
"shasum": ""
"url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212",
"reference": "7831b0331b786db39026d190faa4914f94adb212",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1788,7 +1944,7 @@
"suggest": {
"psr/cache-implementation": "To cache access methods."
},
"time": "2021-08-09T12:23:16+00:00",
"time": "2021-08-17T14:20:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
......@@ -1852,13 +2008,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/property-info.git",
"reference": "63eddb6d10fffe3f25d901d78fef37ca88838b22"
"reference": "3565216f9640b26b646855e39e7bfafc550c75db"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/63eddb6d10fffe3f25d901d78fef37ca88838b22",
"reference": "63eddb6d10fffe3f25d901d78fef37ca88838b22",
"shasum": ""
"url": "https://api.github.com/repos/symfony/property-info/zipball/3565216f9640b26b646855e39e7bfafc550c75db",
"reference": "3565216f9640b26b646855e39e7bfafc550c75db",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1884,7 +2046,7 @@
"symfony/doctrine-bridge": "To use Doctrine metadata",
"symfony/serializer": "To use Serializer metadata"
},
"time": "2021-07-21T12:43:48+00:00",
"time": "2021-08-23T12:58:54+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
......@@ -1945,13 +2107,19 @@
"source": {
"type": "git",
"url": "https://github.com/symfony/string.git",
"reference": "c29a3e649843f4a34eaa4be2683f4914e8b7f023"
"reference": "2342deb63fb5f8c45c5c190656d9aa0377792143"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/c29a3e649843f4a34eaa4be2683f4914e8b7f023",
"reference": "c29a3e649843f4a34eaa4be2683f4914e8b7f023",
"shasum": ""
"url": "https://api.github.com/repos/symfony/string/zipball/2342deb63fb5f8c45c5c190656d9aa0377792143",
"reference": "2342deb63fb5f8c45c5c190656d9aa0377792143",
"shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
},
"require": {
"php": ">=7.2.5",
......@@ -1967,7 +2135,7 @@
"symfony/translation-contracts": "^1.1|^2",
"symfony/var-exporter": "^4.4|^5.0|^6.0"
},
"time": "2021-06-27T12:34:25+00:00",
"time": "2021-08-17T14:20:01+00:00",
"type": "library",
"installation-source": "dist",
"autoload": {
......
<?php return array (
'root' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
<?php return array(
'root' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '831ef95de225db85543c355ed675b00ff61030cd',
'name' => 'yidian/yaf_demo',
'dev' => true,
),
'versions' => array(
'api/php_services' => array(
'pretty_version' => 'v1.0.9',
'version' => '1.0.9.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_services',
'aliases' => array(),
'reference' => 'cd08caa8f11627220db0d5f13cfb99198a1e7076',
'dev_requirement' => false,
),
'api/php_utils' => array(
'pretty_version' => 'v1.0.12',
'version' => '1.0.12.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_utils',
'aliases' => array(),
'reference' => 'bb58e98113fdd1a439828bb61cc716b0de0b6b0c',
'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' => '8e7d04f1f6450fef59366c399cfad4b9383aa30d',
'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' => 'dc960a912984efb74d0a90222870c72c87f10c91',
'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' => '2342deb63fb5f8c45c5c190656d9aa0377792143',
'dev_requirement' => false,
),
'yidian/yaf_demo' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '831ef95de225db85543c355ed675b00ff61030cd',
'dev_requirement' => false,
),
),
'reference' => 'aa0ce40f0ea3b01d62acfef75790d113f0caee3d',
'name' => 'yidian/yaf_demo',
),
'versions' =>
array (
'api/php_services' =>
array (
'pretty_version' => 'v1.0.1',
'version' => '1.0.1.0',
'aliases' =>
array (
),
'reference' => 'ab75ba5d34e8ee22e8628234a45de8a0dee0a51c',
),
'api/php_utils' =>
array (
'pretty_version' => 'v1.0.10',
'version' => '1.0.10.0',
'aliases' =>
array (
),
'reference' => '4fb2b99ebe6cc3ad1a99bece88f217874de5db85',
),
'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' => '4b78e55b179003a42523a362cc0e8327f7a69b5e',
),
'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' => 'aaa09eb714623e935494b5852c1eff260b704ae1',
),
'symfony/property-info' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => '63eddb6d10fffe3f25d901d78fef37ca88838b22',
),
'symfony/string' =>
array (
'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev',
'aliases' =>
array (
),
'reference' => 'c29a3e649843f4a34eaa4be2683f4914e8b7f023',
),
'yidian/yaf_demo' =>
array (
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'aliases' =>
array (
),
'reference' => 'aa0ce40f0ea3b01d62acfef75790d113f0caee3d',
),
),
);
......@@ -280,7 +280,7 @@ class OptionsResolver implements Options
* Returns true if {@link setDefault()} was called for this option.
* An option is also considered set if it was set to null.
*
* @return bool Whether a default value is set
* @return bool
*/
public function hasDefault(string $option)
{
......@@ -315,7 +315,7 @@ class OptionsResolver implements Options
*
* An option is required if it was passed to {@link setRequired()}.
*
* @return bool Whether the option is required
* @return bool
*/
public function isRequired(string $option)
{
......@@ -325,7 +325,7 @@ class OptionsResolver implements Options
/**
* Returns the names of all required options.
*
* @return string[] The names of the required options
* @return string[]
*
* @see isRequired()
*/
......@@ -341,7 +341,7 @@ class OptionsResolver implements Options
* to {@link setDefault()}. This option must be passed explicitly to
* {@link resolve()}, otherwise an exception will be thrown.
*
* @return bool Whether the option is missing
* @return bool
*/
public function isMissing(string $option)
{
......@@ -351,9 +351,7 @@ class OptionsResolver implements Options
/**
* Returns the names of all options missing a default value.
*
* @return string[] The names of the missing options
*
* @see isMissing()
* @return string[]
*/
public function getMissingOptions()
{
......@@ -392,7 +390,7 @@ class OptionsResolver implements Options
* Returns true for any option passed to {@link setDefault()},
* {@link setRequired()} or {@link setDefined()}.
*
* @return bool Whether the option is defined
* @return bool
*/
public function isDefined(string $option)
{
......@@ -402,7 +400,7 @@ class OptionsResolver implements Options
/**
* Returns the names of all defined options.
*
* @return string[] The names of the defined options
* @return string[]
*
* @see isDefined()
*/
......@@ -869,7 +867,7 @@ class OptionsResolver implements Options
* - Options have invalid types;
* - Options have invalid values.
*
* @return array The merged and validated options
* @return array
*
* @throws UndefinedOptionsException If an option name is undefined
* @throws InvalidOptionsException If an option doesn't fulfill the
......@@ -932,7 +930,7 @@ class OptionsResolver implements Options
*
* @param bool $triggerDeprecation Whether to trigger the deprecation or not (true by default)
*
* @return mixed The option value
* @return mixed
*
* @throws AccessException If accessing this method outside of
* {@link resolve()}
......@@ -1194,7 +1192,7 @@ class OptionsResolver implements Options
*
* @param string $option The option name
*
* @return bool Whether the option is set
* @return bool
*
* @throws AccessException If accessing this method outside of {@link resolve()}
*
......@@ -1241,7 +1239,7 @@ class OptionsResolver implements Options
*
* This may be only a subset of the defined options.
*
* @return int Number of options
* @return int
*
* @throws AccessException If accessing this method outside of {@link resolve()}
*
......
......@@ -227,7 +227,7 @@ class PropertyAccessorBuilder
/**
* Sets a cache system.
*
* @return PropertyAccessorBuilder The builder object
* @return PropertyAccessorBuilder
*/
public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null)
{
......@@ -279,7 +279,7 @@ class PropertyAccessorBuilder
/**
* Builds and returns a new PropertyAccessor object.
*
* @return PropertyAccessorInterface The built PropertyAccessor
* @return PropertyAccessorInterface
*/
public function getPropertyAccessor()
{
......
......@@ -73,7 +73,7 @@ interface PropertyAccessorInterface
* @param object|array $objectOrArray The object or array to traverse
* @param string|PropertyPathInterface $propertyPath The property path to read
*
* @return mixed The value at the end of the property path
* @return mixed
*
* @throws Exception\InvalidArgumentException If the property path is invalid
* @throws Exception\AccessException If a property/index does not exist or is not public
......@@ -91,7 +91,7 @@ interface PropertyAccessorInterface
* @param object|array $objectOrArray The object or array to check
* @param string|PropertyPathInterface $propertyPath The property path to check
*
* @return bool Whether the value can be set
* @return bool
*
* @throws Exception\InvalidArgumentException If the property path is invalid
*/
......@@ -106,7 +106,7 @@ interface PropertyAccessorInterface
* @param object|array $objectOrArray The object or array to check
* @param string|PropertyPathInterface $propertyPath The property path to check
*
* @return bool Whether the property path can be read
* @return bool
*
* @throws Exception\InvalidArgumentException If the property path is invalid
*/
......
......@@ -170,7 +170,7 @@ class PropertyPathBuilder
/**
* Returns the length of the current path.
*
* @return int The path length
* @return int
*/
public function getLength()
{
......@@ -180,7 +180,7 @@ class PropertyPathBuilder
/**
* Returns the current property path.
*
* @return PropertyPathInterface|null The constructed property path
* @return PropertyPathInterface|null
*/
public function getPropertyPath()
{
......@@ -192,7 +192,7 @@ class PropertyPathBuilder
/**
* Returns the current property path as string.
*
* @return string The property path as string
* @return string
*/
public function __toString()
{
......
......@@ -21,14 +21,14 @@ interface PropertyPathInterface extends \Traversable
/**
* Returns the string representation of the property path.
*
* @return string The path as string
* @return string
*/
public function __toString();
/**
* Returns the length of the property path, i.e. the number of elements.
*
* @return int The path length
* @return int
*/
public function getLength();
......@@ -40,14 +40,14 @@ interface PropertyPathInterface extends \Traversable
*
* If this property path only contains one item, null is returned.
*
* @return self|null The parent path or null
* @return self|null
*/
public function getParent();
/**
* Returns the elements of the property path as array.
*
* @return array An array of property/index names
* @return array
*/
public function getElements();
......@@ -56,7 +56,7 @@ interface PropertyPathInterface extends \Traversable
*
* @param int $index The index key
*
* @return string A property or index name
* @return string
*
* @throws Exception\OutOfBoundsException If the offset is invalid
*/
......@@ -67,7 +67,7 @@ interface PropertyPathInterface extends \Traversable
*
* @param int $index The index in the property path
*
* @return bool Whether the element at this index is a property
* @return bool
*
* @throws Exception\OutOfBoundsException If the offset is invalid
*/
......@@ -78,7 +78,7 @@ interface PropertyPathInterface extends \Traversable
*
* @param int $index The index in the property path
*
* @return bool Whether the element at this index is an array index
* @return bool
*
* @throws Exception\OutOfBoundsException If the offset is invalid
*/
......
......@@ -34,7 +34,7 @@ final class ConstructorExtractor implements PropertyTypeExtractorInterface
/**
* {@inheritdoc}
*/
public function getTypes(string $class, string $property, array $context = [])
public function getTypes(string $class, string $property, array $context = []): ?array
{
foreach ($this->extractors as $extractor) {
$value = $extractor->getTypesFromConstructor($class, $property);
......
......@@ -554,7 +554,7 @@ class ReflectionExtractor implements PropertyListExtractorInterface, PropertyTyp
foreach ($reflectionType instanceof \ReflectionUnionType ? $reflectionType->getTypes() : [$reflectionType] as $type) {
$phpTypeOrClass = $reflectionType instanceof \ReflectionNamedType ? $reflectionType->getName() : (string) $type;
if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass) {
if ('null' === $phpTypeOrClass || 'mixed' === $phpTypeOrClass || 'never' === $phpTypeOrClass) {
continue;
}
......
......@@ -18,7 +18,7 @@ interface InflectorInterface
*
* If the method can't determine the form with certainty, several possible singulars are returned.
*
* @return string[] An array of possible singular forms
* @return string[]
*/
public function singularize(string $plural): array;
......@@ -27,7 +27,7 @@ interface InflectorInterface
*
* If the method can't determine the form with certainty, several possible plurals are returned.
*
* @return string[] An array of possible plural forms
* @return string[]
*/
public function pluralize(string $singular): array;
}
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