Commit 5d6b8571 authored by 卢洪光's avatar 卢洪光

Merge branch 'pre_release' into 'master'

Pre release

See merge request bp/goods!62
parents bcd65f3a 704652bb
...@@ -16,6 +16,9 @@ class GoodsException extends BaseException ...@@ -16,6 +16,9 @@ class GoodsException extends BaseException
const OTA_NOT_EXIST = 38; const OTA_NOT_EXIST = 38;
const RULE_LIMIT_ERROR = 50; const RULE_LIMIT_ERROR = 50;
const NOT_FIND_MARKETING = 51; const NOT_FIND_MARKETING = 51;
const LABEL_PRINTER_ALREADY_EXIST = 53;
const PRINTER_BIND_ERROR = 54;
const PRINTER_SN_ERROR = 55;
protected $cus = [ protected $cus = [
0 => '商品创建失败,请稍后重试', 0 => '商品创建失败,请稍后重试',
...@@ -71,5 +74,8 @@ class GoodsException extends BaseException ...@@ -71,5 +74,8 @@ class GoodsException extends BaseException
self::RULE_LIMIT_ERROR => '单人可买上限填写错误', self::RULE_LIMIT_ERROR => '单人可买上限填写错误',
self::NOT_FIND_MARKETING => '找不到活动', self::NOT_FIND_MARKETING => '找不到活动',
52 => '过期时间不得小于等于上架开始时间', 52 => '过期时间不得小于等于上架开始时间',
self::LABEL_PRINTER_ALREADY_EXIST => '标签打印机已被%s绑定',
self::PRINTER_BIND_ERROR => '打印机绑定失败:%s',
self::PRINTER_SN_ERROR => '打印机sn号码有误',
]; ];
} }
\ No newline at end of file
...@@ -14,6 +14,10 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -14,6 +14,10 @@ class OtaValidate extends \Validate\BaseValidate
protected $rule = [ protected $rule = [
'ota_name' => 'require', 'ota_name' => 'require',
'ota_id' => 'require', 'ota_id' => 'require',
// 'address' => 'require',
// 'location' => 'require',
// 'longitude' => 'require',
// 'latitude' => 'require',
'offset' => 'egt:0', 'offset' => 'egt:0',
'limit' => 'elt:100', 'limit' => 'elt:100',
]; ];
...@@ -22,6 +26,10 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -22,6 +26,10 @@ class OtaValidate extends \Validate\BaseValidate
protected $message = [ protected $message = [
"ota_name" => "供应商名称不能为空", "ota_name" => "供应商名称不能为空",
"ota_id" => "ota_id不能为空", "ota_id" => "ota_id不能为空",
"address" => "详细地址不能为空",
"location" => "高德地图详细地址不能为空",
"longitude" => "经度不能为空",
"latitude" => "纬度不能为空",
"offset" => "偏移量不能小于0", "offset" => "偏移量不能小于0",
"limit" => "单次不能大于100条", "limit" => "单次不能大于100条",
]; ];
...@@ -41,12 +49,25 @@ class OtaValidate extends \Validate\BaseValidate ...@@ -41,12 +49,25 @@ class OtaValidate extends \Validate\BaseValidate
return $this->only(['ota_id']); return $this->only(['ota_id']);
} }
public function sceneUpdate() public function sceneUndelete()
{ {
return $this->only(['ota_id']); return $this->only(['ota_id']);
} }
public function sceneUpdate()
{
return $this->only(['ota_id', 'ota_name']);
}
public function sceneListByIds() public function sceneListByIds()
{ {
return $this->only(['ota_id']); return $this->only(['ota_id']);
} }
public function is_label_printer_sn($value){
if( substr($value, 3, 1) != '2' ){
return false;
}
return true;
}
} }
\ No newline at end of file
...@@ -22,9 +22,12 @@ class OtaController extends Base ...@@ -22,9 +22,12 @@ class OtaController extends Base
$name = $this->params['ota_name'] ?? ''; $name = $this->params['ota_name'] ?? '';
$printerSn = $this->params['printer_sn'] ?? ''; $printerSn = $this->params['printer_sn'] ?? '';
$printerKey = $this->params['printer_key'] ?? ''; $printerKey = $this->params['printer_key'] ?? '';
$labelPrinterSn = $this->params['label_printer_sn'] ?? '';
$labelPrinterKey = $this->params['label_printer_key'] ?? '';
$isNormal = $this->params['is_normal'] ?? false;
$offset = $this->params['offset'] ?? 0; $offset = $this->params['offset'] ?? 0;
$limit = $this->params['limit'] ?? 20; $limit = $this->params['limit'] ?? 20;
$res = OtaService::list($name, $printerSn, $printerKey, $offset, $limit); $res = OtaService::list($name, $printerSn, $printerKey,$labelPrinterSn, $labelPrinterKey, $isNormal, $offset, $limit);
$this->success(['result' => $res]); $this->success(['result' => $res]);
} }
...@@ -67,6 +70,18 @@ class OtaController extends Base ...@@ -67,6 +70,18 @@ class OtaController extends Base
$this->success(['status' => $res ? 'success' : 'failed']); $this->success(['status' => $res ? 'success' : 'failed']);
} }
/**
* 删除一个供应商
* @throws \App\Exception\custom\ParamException
*/
public function undeleteAction()
{
(new OtaValidate())->scene('undelete')->validate();
$res = OtaService::undeleteOne($this->params['ota_id']);
$this->success(['status' => $res ? 'success' : 'failed']);
}
/** /**
* 更新供应商 * 更新供应商
...@@ -75,7 +90,7 @@ class OtaController extends Base ...@@ -75,7 +90,7 @@ class OtaController extends Base
public function updateAction() public function updateAction()
{ {
(new OtaValidate())->scene('update')->validate(); (new OtaValidate())->scene('update')->validate();
$res = OtaService::update($this->params); $res = OtaService::update($this->params, true);
$this->success(['status' => $res ? 'success' : 'failed']); $this->success(['status' => $res ? 'success' : 'failed']);
} }
......
...@@ -4,10 +4,12 @@ namespace App\Services\goods; ...@@ -4,10 +4,12 @@ namespace App\Services\goods;
use App\Exception\custom\GoodsException; use App\Exception\custom\GoodsException;
use App\Models\goods\mysql\Ota; use App\Models\goods\mysql\Ota;
use Api\PhpServices\Printer\PrinterFactory;
use Validate\OtaValidate;
class OtaService class OtaService
{ {
const COLUMNS = ['ota_id','ota_name','printer_sn','printer_key']; const COLUMNS = ['ota_id','ota_name','printer_sn','printer_key','label_printer_sn','label_printer_key', 'longitude', 'latitude', 'location', 'address', 'status'];
/** /**
* 获取供应商列表(op 后台) * 获取供应商列表(op 后台)
* @param string $otaName * @param string $otaName
...@@ -17,13 +19,15 @@ class OtaService ...@@ -17,13 +19,15 @@ class OtaService
* @param int $limit * @param int $limit
* @return \Api\PhpUtils\Mysql\MysqlBase * @return \Api\PhpUtils\Mysql\MysqlBase
*/ */
public static function list($otaName='',$printerSN='',$printerKey='',$offset=0,$limit=20) public static function list($otaName='',$printerSN='',$printerKey='', $labelPrinterSN='',$labelPrinterKey='', $isNormal = false,$offset=0,$limit=20)
{ {
$otaName && $where['ota_name'] = $otaName; $otaName && $where['ota_name'] = $otaName;
$printerSN && $where["printer_sn"] = $printerSN; $printerSN && $where["printer_sn"] = $printerSN;
$printerKey && $where['printer_key'] = $printerKey; $printerKey && $where['printer_key'] = $printerKey;
$labelPrinterSN && $where["label_printer_sn"] = $labelPrinterSN;
$labelPrinterKey && $where['label_printer_key'] = $labelPrinterKey;
$where['status'] = Ota::STATUS_NORMAL; $isNormal &&$where['status'] = Ota::STATUS_NORMAL;
$where['ORDER'] = ['ota_id' => 'DESC']; $where['ORDER'] = ['ota_id' => 'DESC'];
$where['LIMIT'] = [$offset, $limit]; $where['LIMIT'] = [$offset, $limit];
...@@ -74,18 +78,65 @@ class OtaService ...@@ -74,18 +78,65 @@ class OtaService
//检查打印机是否已存在 -- 打印机已被(商家名称)绑定 //检查打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['printer_sn']) && $params['printer_sn']) { if(isset($params['printer_sn']) && $params['printer_sn']) {
if ((new OtaValidate())->is_label_printer_sn($params['printer_sn'])) {
throw new GoodsException(['cus' => GoodsException::PRINTER_SN_ERROR]);
}
$printer = self::list('',$params['printer_sn']); $printer = self::list('',$params['printer_sn']);
if ($printer['total'] > 0) { if ($printer['total'] > 0) {
throw new GoodsException( throw new GoodsException(
['cus' => GoodsException::PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]] ['cus' => GoodsException::PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
); );
} }
} }
//检查标签打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['label_printer_sn']) && $params['label_printer_sn']) {
if (!(new OtaValidate())->is_label_printer_sn($params['label_printer_sn'])) {
throw new GoodsException(['cus' => GoodsException::PRINTER_SN_ERROR]);
}
$printer = self::list('','', '', $params['label_printer_sn']);
if ($printer['total'] > 0) {
throw new GoodsException(
['cus' => GoodsException::LABEL_PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
);
}
}
try {
if(isset($params['printer_sn']) && $params['printer_sn']) {
$FeiPrinter = PrinterFactory::getPrinter('Fei');
$FeiPrinter->addPrinter([
'printer_sn' => $params['printer_sn'],
'printer_key' => $params['printer_key'],
'ota_name' => $params['ota_name'],
]);
}
if(isset($params['label_printer_sn']) && $params['label_printer_sn']) {
$FeiPrinter = PrinterFactory::getPrinter('Fei');
$FeiPrinter->addPrinter([
'printer_sn' => $params['label_printer_sn'],
'printer_key' => $params['label_printer_key'],
'ota_name' => $params['ota_name'],
]);
}
} catch (\Exception $e) {
throw new GoodsException(
['cus' => GoodsException::PRINTER_BIND_ERROR,'data'=>[$e->getMessage()]]
);
}
$data['ota_name'] = $params['ota_name']; $data['ota_name'] = $params['ota_name'];
$data['printer_sn'] = $params['printer_sn'] ?? ''; $data['printer_sn'] = $params['printer_sn'] ?? '';
$data['printer_key'] = $params['printer_key'] ?? ''; $data['printer_key'] = $params['printer_key'] ?? '';
$data['label_printer_sn'] = $params['label_printer_sn'] ?? '';
$data['label_printer_key'] = $params['label_printer_key'] ?? '';
$data['longitude'] = $params['longitude'] ?? 0;
$data['latitude'] = $params['latitude'] ?? 0;
$data['location'] = $params['location'] ?? '';
$data['address'] = $params['address'] ?? '';
return Ota::insert($data); return Ota::insert($data);
} }
...@@ -100,27 +151,108 @@ class OtaService ...@@ -100,27 +151,108 @@ class OtaService
return self::update(['ota_id'=>$otaId,'status'=>Ota::STATUS_DELETE]); return self::update(['ota_id'=>$otaId,'status'=>Ota::STATUS_DELETE]);
} }
/**
* 取消删除供应商
* @param $otaId
* @return \Api\PhpUtils\Mysql\MysqlBase
*/
public static function unDeleteOne($otaId)
{
return self::update(['ota_id'=>$otaId,'status'=>Ota::STATUS_NORMAL]);
}
/** /**
* 更新供应商信息 * 更新供应商信息
* @param $params * @param $params
* @return \Api\PhpUtils\Mysql\MysqlBase * @return \Api\PhpUtils\Mysql\MysqlBase
* @throws GoodsException * @throws GoodsException
*/ */
public static function update($params) public static function update($params, $canUnBind = false)
{ {
if(empty($params['ota_id'])) { if(empty($params['ota_id'])) {
throw new GoodsException(['cus' => GoodsException::EMPTY_OTA_ID]); throw new GoodsException(['cus' => GoodsException::EMPTY_OTA_ID]);
} }
$otaDetail = self::detail($params['ota_id']);
//检查供应商是否存在 //检查供应商是否存在
if (empty(self::detail($params['ota_id']))) { if (empty($otaDetail)) {
throw new GoodsException(['cus' => GoodsException::OTA_NOT_EXIST]); throw new GoodsException(['cus' => GoodsException::OTA_NOT_EXIST]);
} }
//检查打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['printer_sn']) && $params['printer_sn'] && $otaDetail['printer_sn'] != $params['printer_sn']) {
if ((new OtaValidate())->is_label_printer_sn($params['printer_sn'])) {
throw new GoodsException(['cus' => GoodsException::PRINTER_SN_ERROR]);
}
$printer = self::list('',$params['printer_sn']);
if ($printer['total'] > 0) {
throw new GoodsException(
['cus' => GoodsException::PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
);
}
try {
$FeiPrinter = PrinterFactory::getPrinter('Fei');
$FeiPrinter->addPrinter([
'printer_sn' => $params['printer_sn'],
'printer_key' => $params['printer_key'],
'ota_name' => $params['ota_name'],
]);
} catch (\Exception $e) {
throw new GoodsException(['cus' => GoodsException::PRINTER_BIND_ERROR,'data'=>[$e->getMessage()]]);
}
}
//检查标签打印机是否已存在 -- 打印机已被(商家名称)绑定
if(isset($params['label_printer_sn']) && $params['label_printer_sn'] && $otaDetail['label_printer_sn'] != $params['label_printer_sn']) {
if (!(new OtaValidate())->is_label_printer_sn($params['label_printer_sn'])) {
throw new GoodsException(['cus' => GoodsException::PRINTER_SN_ERROR]);
}
$printer = self::list('','', '', $params['label_printer_sn']);
if ($printer['total'] > 0) {
throw new GoodsException(
['cus' => GoodsException::LABEL_PRINTER_ALREADY_EXIST,'data'=>[$printer['list'][0]['ota_name']]]
);
}
try {
$FeiPrinter = PrinterFactory::getPrinter('Fei');
$FeiPrinter->addPrinter([
'printer_sn' => $params['label_printer_sn'],
'printer_key' => $params['label_printer_key'],
'ota_name' => $params['ota_name'],
]);
} catch (\Exception $e) {
throw new GoodsException(['cus' => GoodsException::PRINTER_BIND_ERROR,'data'=>[$e->getMessage()]]);
}
}
$data = []; $data = [];
isset($params['ota_name']) && $data['ota_name'] = $params['ota_name']; isset($params['ota_name']) && $data['ota_name'] = $params['ota_name'];
isset($params['printer_sn']) && $data['printer_sn'] = $params['printer_sn']; isset($params['printer_sn']) && $data['printer_sn'] = $params['printer_sn'];
isset($params['printer_key']) && $data['printer_key'] = $params['printer_key']; isset($params['printer_key']) && $data['printer_key'] = $params['printer_key'];
isset($params['label_printer_sn']) && $data['label_printer_sn'] = $params['label_printer_sn'];
isset($params['label_printer_key']) && $data['label_printer_key'] = $params['label_printer_key'];
isset($params['longitude']) && $data['longitude'] = $params['longitude'];
isset($params['latitude']) && $data['latitude'] = $params['latitude'];
isset($params['location']) && $data['location'] = $params['location'];
isset($params['address']) && $data['address'] = $params['address'];
isset($params['status']) && $data['status'] = $params['status']; isset($params['status']) && $data['status'] = $params['status'];
// 解绑
if ($canUnBind && !empty($otaDetail['printer_sn']) && empty($params['printer_sn']) && empty($params['printer_key'])) {
$data['printer_sn'] = $data['printer_key'] = '';
}
if ($canUnBind && !empty($otaDetail['label_printer_sn']) && empty($params['label_printer_sn']) && empty($params['label_printer_key'])) {
$data['label_printer_sn'] = $data['label_printer_key'] = '';
}
return Ota::update( return Ota::update(
$data, $data,
['ota_id'=>$params['ota_id']] ['ota_id'=>$params['ota_id']]
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
"require": { "require": {
"php": "7.2.*", "php": "7.2.*",
"ext-json": "*", "ext-json": "*",
"api/php_services":"1.0.15",
"api/php_utils":"1.0.17", "api/php_utils":"1.0.17",
"api/php_services":"1.0.14",
"ext-openssl": "*" "ext-openssl": "*"
}, },
"minimum-stability": "dev", "minimum-stability": "dev",
......
...@@ -4,15 +4,15 @@ ...@@ -4,15 +4,15 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "6b8ea7dcd025a3916d9804461968836b", "content-hash": "b64691cd0b568f54f381382cdb77553b",
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
"version": "1.0.14", "version": "1.0.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git", "url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa" "reference": "590b209014d0ccb8de96dd4cb243eeee41cae47d"
}, },
"require": { "require": {
"endroid/qr-code": "^3.9", "endroid/qr-code": "^3.9",
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
} }
}, },
"description": "bp api php_services", "description": "bp api php_services",
"time": "2021-09-08T06:38:07+00:00" "time": "2021-09-14T06:43:42+00:00"
}, },
{ {
"name": "api/php_utils", "name": "api/php_utils",
...@@ -67,7 +67,13 @@ ...@@ -67,7 +67,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "url": "https://api.github.com/repos/Bacon/BaconQrCode/zipball/f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09", "reference": "f73543ac4e1def05f1a70bcd1525c8a157a1ad09",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"dasprid/enum": "^1.0.3", "dasprid/enum": "^1.0.3",
...@@ -120,7 +126,13 @@ ...@@ -120,7 +126,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2", "url": "https://api.github.com/repos/DASPRiD/Enum/zipball/5abf82f213618696dda8e3bf6f64dd042d8542b2",
"reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2", "reference": "5abf82f213618696dda8e3bf6f64dd042d8542b2",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "^7 | ^8 | ^9", "phpunit/phpunit": "^7 | ^8 | ^9",
...@@ -167,7 +179,13 @@ ...@@ -167,7 +179,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf", "url": "https://api.github.com/repos/elastic/elasticsearch-php/zipball/8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf", "reference": "8d08050fef9d89004702b1428b8c1f7f4f6162cf",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": ">=1.3.7", "ext-json": ">=1.3.7",
...@@ -236,7 +254,13 @@ ...@@ -236,7 +254,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", "url": "https://api.github.com/repos/endroid/qr-code/zipball/9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f", "reference": "9cdd4f5d609bfc8811ca4a62b4d23eb16976242f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"bacon/bacon-qr-code": "^2.0", "bacon/bacon-qr-code": "^2.0",
...@@ -311,7 +335,13 @@ ...@@ -311,7 +335,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8", "url": "https://api.github.com/repos/ezimuel/guzzlestreams/zipball/abe3791d231167f14eb80d413420d1eab91163a8",
"reference": "abe3791d231167f14eb80d413420d1eab91163a8", "reference": "abe3791d231167f14eb80d413420d1eab91163a8",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0" "php": ">=5.4.0"
...@@ -365,7 +395,13 @@ ...@@ -365,7 +395,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b", "url": "https://api.github.com/repos/ezimuel/ringphp/zipball/0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b", "reference": "0b78f89d8e0bb9e380046c31adfa40347e9f663b",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ezimuel/guzzlestreams": "^3.0.1", "ezimuel/guzzlestreams": "^3.0.1",
...@@ -420,7 +456,13 @@ ...@@ -420,7 +456,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"guzzlehttp/promises": "^1.0", "guzzlehttp/promises": "^1.0",
...@@ -489,7 +531,13 @@ ...@@ -489,7 +531,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa", "url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa", "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.5" "php": ">=5.5"
...@@ -574,7 +622,13 @@ ...@@ -574,7 +622,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f",
"reference": "9d006741ba865a45adccfac45d8e1053086a5a3f", "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
...@@ -670,7 +724,13 @@ ...@@ -670,7 +724,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1", "url": "https://api.github.com/repos/khanamiryan/php-qrcode-detector-decoder/zipball/04fdd58d86a387065f707dc6d3cc304c719910c1",
"reference": "04fdd58d86a387065f707dc6d3cc304c719910c1", "reference": "04fdd58d86a387065f707dc6d3cc304c719910c1",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.6" "php": ">=5.6"
...@@ -725,7 +785,13 @@ ...@@ -725,7 +785,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96", "url": "https://api.github.com/repos/mongodb/mongo-php-library/zipball/18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96", "reference": "18fca8cc8d0c2cc07f76605760d20632bb3dab96",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-hash": "*", "ext-hash": "*",
...@@ -789,7 +855,13 @@ ...@@ -789,7 +855,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7", "url": "https://api.github.com/repos/myclabs/php-enum/zipball/d178027d1e679832db9f38248fcc7200647dc2b7",
"reference": "d178027d1e679832db9f38248fcc7200647dc2b7", "reference": "d178027d1e679832db9f38248fcc7200647dc2b7",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
...@@ -849,7 +921,13 @@ ...@@ -849,7 +921,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae", "url": "https://api.github.com/repos/perftools/php-profiler/zipball/794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae", "reference": "794c435f615ab9ca4347e386b4d8c6524fe9e3ae",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"ext-json": "*", "ext-json": "*",
...@@ -911,7 +989,13 @@ ...@@ -911,7 +989,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
...@@ -965,7 +1049,13 @@ ...@@ -965,7 +1049,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11", "url": "https://api.github.com/repos/php-fig/log/zipball/d49695b909c3b7628b6289db5479a1c204601f11",
"reference": "d49695b909c3b7628b6289db5479a1c204601f11", "reference": "d49695b909c3b7628b6289db5479a1c204601f11",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.3.0" "php": ">=5.3.0"
...@@ -1015,7 +1105,13 @@ ...@@ -1015,7 +1105,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822",
"reference": "120b605dfeb996808c31b6477290a714d356e822", "reference": "120b605dfeb996808c31b6477290a714d356e822",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.6" "php": ">=5.6"
...@@ -1059,7 +1155,13 @@ ...@@ -1059,7 +1155,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31", "url": "https://api.github.com/repos/reactphp/promise/zipball/a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31", "reference": "a9752a861e21c0fe0b380c9f9e55beddc0ed7d31",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0" "php": ">=5.4.0"
...@@ -1119,7 +1221,13 @@ ...@@ -1119,7 +1221,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8", "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8", "reference": "6f981ee24cf69ee7ce9736146d1c57c2780598a8",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1181,13 +1289,19 @@ ...@@ -1181,13 +1289,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab" "reference": "cd63dbab0428a47f8576e4e58148aeae2e32e91c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cd63dbab0428a47f8576e4e58148aeae2e32e91c",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "reference": "cd63dbab0428a47f8576e4e58148aeae2e32e91c",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1242,7 +1356,7 @@ ...@@ -1242,7 +1356,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-08-17T14:20:01+00:00" "time": "2021-09-09T08:06:01+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
...@@ -1256,7 +1370,13 @@ ...@@ -1256,7 +1370,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce", "reference": "46cd95797e9df938fdd2b03693b5fca5e64b01ce",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1336,7 +1456,13 @@ ...@@ -1336,7 +1456,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535", "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/16880ba9c5ebe3642d1995ab866db29270b36535",
"reference": "16880ba9c5ebe3642d1995ab866db29270b36535", "reference": "16880ba9c5ebe3642d1995ab866db29270b36535",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1418,7 +1544,13 @@ ...@@ -1418,7 +1544,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8", "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8590a5f561694770bdcd3f9b5c69dde6945028e8",
"reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8", "reference": "8590a5f561694770bdcd3f9b5c69dde6945028e8",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1497,13 +1629,19 @@ ...@@ -1497,13 +1629,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" "reference": "344e456152e22a1bce3048c6c311059ea14bde47"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/344e456152e22a1bce3048c6c311059ea14bde47",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "344e456152e22a1bce3048c6c311059ea14bde47",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1554,7 +1692,7 @@ ...@@ -1554,7 +1692,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-mbstring/tree/main"
}, },
"funding": [ "funding": [
{ {
...@@ -1570,7 +1708,7 @@ ...@@ -1570,7 +1708,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-05-27T12:26:48+00:00" "time": "2021-09-13T13:54:24+00:00"
}, },
{ {
"name": "symfony/polyfill-php73", "name": "symfony/polyfill-php73",
...@@ -1578,13 +1716,19 @@ ...@@ -1578,13 +1716,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php73.git", "url": "https://github.com/symfony/polyfill-php73.git",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1634,7 +1778,7 @@ ...@@ -1634,7 +1778,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-php73/tree/main"
}, },
"funding": [ "funding": [
{ {
...@@ -1650,7 +1794,7 @@ ...@@ -1650,7 +1794,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-02-19T12:13:01+00:00" "time": "2021-06-05T21:20:04+00:00"
}, },
{ {
"name": "symfony/polyfill-php80", "name": "symfony/polyfill-php80",
...@@ -1658,13 +1802,19 @@ ...@@ -1658,13 +1802,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
...@@ -1718,7 +1868,7 @@ ...@@ -1718,7 +1868,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-php80/tree/main"
}, },
"funding": [ "funding": [
{ {
...@@ -1734,7 +1884,7 @@ ...@@ -1734,7 +1884,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-07-28T13:41:28+00:00" "time": "2021-09-13T13:58:33+00:00"
}, },
{ {
"name": "symfony/property-access", "name": "symfony/property-access",
...@@ -1742,13 +1892,19 @@ ...@@ -1742,13 +1892,19 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/property-access.git", "url": "https://github.com/symfony/property-access.git",
"reference": "7831b0331b786db39026d190faa4914f94adb212" "reference": "bd3efa2a2d856d167dde8e7b883c65119064b7f5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212", "url": "https://api.github.com/repos/symfony/property-access/zipball/bd3efa2a2d856d167dde8e7b883c65119064b7f5",
"reference": "7831b0331b786db39026d190faa4914f94adb212", "reference": "bd3efa2a2d856d167dde8e7b883c65119064b7f5",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1815,7 +1971,7 @@ ...@@ -1815,7 +1971,7 @@
"type": "tidelift" "type": "tidelift"
} }
], ],
"time": "2021-08-17T14:20:01+00:00" "time": "2021-09-10T12:30:46+00:00"
}, },
{ {
"name": "symfony/property-info", "name": "symfony/property-info",
...@@ -1829,7 +1985,13 @@ ...@@ -1829,7 +1985,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/903f3f3f6a360bc4739f8390e5031acc70d9cd9f", "url": "https://api.github.com/repos/symfony/property-info/zipball/903f3f3f6a360bc4739f8390e5031acc70d9cd9f",
"reference": "903f3f3f6a360bc4739f8390e5031acc70d9cd9f", "reference": "903f3f3f6a360bc4739f8390e5031acc70d9cd9f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -1919,7 +2081,13 @@ ...@@ -1919,7 +2081,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -2003,5 +2171,5 @@ ...@@ -2003,5 +2171,5 @@
"ext-openssl": "*" "ext-openssl": "*"
}, },
"platform-dev": [], "platform-dev": [],
"plugin-api-version": "2.0.0" "plugin-api-version": "2.1.0"
} }
...@@ -44,6 +44,23 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer ...@@ -44,6 +44,23 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
*/ */
private const API_ADD_PRINTER = "Open_printerAddlist"; private const API_ADD_PRINTER = "Open_printerAddlist";
/**
* 打印(标签)
*/
private const API_LABEL_PRINT = "Open_printLabelMsg";
/**
* 标签打印常量
*/
private const LABEL_WIDTH = 320;
private const LABEL_HIGH = 240;
private const LABEL_FONT = 12;
private const LABEL_MARGIN_WIDTH = 20;
private const LABEL_MARGIN_HIGH = 20;
private const LABEL_PADDING = 45;
private const LABEL_FIELD_PADDING = 30;
private const LABEL_WORD_FULL_WIDTH = 22.4;
private const LABEL_WORD_HALF_WIDTH = 11.2;
/** /**
* @param string $apiName api 名字 * @param string $apiName api 名字
...@@ -105,7 +122,13 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer ...@@ -105,7 +122,13 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
]); ]);
if ($res['code'] == 0 && isset($res['response'])) { if ($res['code'] == 0 && isset($res['response'])) {
if ($res['response']['ret'] == 0) { if ($res['response']['ret'] == 0) {
return $res['response']['data']; if (is_array($res['response']['data']['ok']) && count($res['response']['data']['ok']) > 0) {
return true;
}
if (strpos($res['response']['data']['no'][0], '已被添加过')) {
return true;
}
throw new \Exception($res['response']['data']['no'][0]);
} }
throw new \Exception($res['response']['msg']); throw new \Exception($res['response']['msg']);
} }
...@@ -186,4 +209,99 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer ...@@ -186,4 +209,99 @@ class FeiPrinter extends \Api\PhpServices\Printer\Printer
} }
throw new \Exception("接口调用异常"); throw new \Exception("接口调用异常");
} }
/**
* 测试标签打印机
* 570203776
* alter table ota add column `label_printer_sn` varchar(50) NOT NULL DEFAULT '' COMMENT '打印机SN' after `printer_key`, add column `label_printer_key` varchar(50) NOT NULL DEFAULT '' after `label_printer_sn`;
* @param string $printerId
* @param array $content
$content = [
'维多利亚',
'西红柿教育-维多利亚D1015',
'B:干豆角红烧肉+炝炒圆白菜(含米饭)',
'孟维甫 186****5946'
];
* @return string
* @throws \Exception
*/
public function printLabelContent(string $printerId, array $content): string
{
$rowCount = count($content);
$firstRow = true;
$lastRow = false;
$formatContent = '';
$fontSize = self::LABEL_FONT;
$Y = self::LABEL_MARGIN_HIGH;
foreach (array_values($content) as $key => $row) {
// 判断是否是最后一行
($key + 1) == $rowCount && $lastRow = true;
//获取 换行后的每一行
$wrappedRow = self::_getWrappedRow($row);
foreach ($wrappedRow as $r) {
$wordWidth = mb_strwidth($r) * self::LABEL_WORD_HALF_WIDTH;
if ($lastRow) { // 右对齐
$X = intval(self::LABEL_WIDTH - $wordWidth - self::LABEL_MARGIN_WIDTH);
}
else if($firstRow) { //居中
$X = intval((self::LABEL_WIDTH - self::LABEL_MARGIN_WIDTH * 2 - $wordWidth) / 2) + self::LABEL_MARGIN_WIDTH;
}
else { // 左对齐
$X = self::LABEL_MARGIN_WIDTH;
}
$formatContent .= "<TEXT x=\"{$X}\" y=\"{$Y}\" font=\"{$fontSize}\" w=\"1\" h=\"1\" r=\"0\">{$r}</TEXT>";
$firstRow = false;
$Y += self::LABEL_FIELD_PADDING;
}
$Y += (self::LABEL_PADDING - self::LABEL_FIELD_PADDING);
}
$res = $this->request(self::API_LABEL_PRINT, [
'sn' => $printerId,
'content' => $formatContent,
'times' => 1,// 打印联数
]);
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("接口调用异常");
}
/**
* 自动换行
* @param string $row
* @return array
*/
private static function _getWrappedRow(string $row) : array
{
$wrappedRow = [];
$XCapacity = self::LABEL_WIDTH - self::LABEL_MARGIN_WIDTH * 2;
$wordWidth = mb_strwidth($row) * self::LABEL_WORD_HALF_WIDTH;
if ($wordWidth > $XCapacity) {
$begin = 0;
for ($i = 1; $i <= mb_strlen($row); $i++) {
$r = mb_substr($row, $begin, $i - $begin);
$rWidth = mb_strwidth($r) * self::LABEL_WORD_HALF_WIDTH;
if ($rWidth > $XCapacity) {
$wrappedRow[] = mb_substr($row, $begin, $i - $begin - 1);
$begin = $i - 1;
}
}
$wrappedRow[] = mb_substr($row, $begin);
}
else {
$wrappedRow[] = $row;
}
return $wrappedRow;
}
} }
\ No newline at end of file
...@@ -42,6 +42,14 @@ abstract class Printer ...@@ -42,6 +42,14 @@ abstract class Printer
*/ */
abstract public function printContent(string $printerId, array $content): string; abstract public function printContent(string $printerId, array $content): string;
/**
* 打印
* @param string $printerId
* @param array $content 要打印的内容 支持一位数组 二维数组
* @return string 打印OrderID, ID
*/
abstract public function printLabelContent(string $printerId, array $content): string;
/** /**
* 查询打印状态 * 查询打印状态
* @param string $orderId 为printContent 返回 * @param string $orderId 为printContent 返回
......
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf::getLoader(); return ComposerAutoloaderInit147d97defc074a277015f080b27e01c6::getLoader();
...@@ -338,7 +338,7 @@ class ClassLoader ...@@ -338,7 +338,7 @@ class ClassLoader
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return bool|null True if loaded, null otherwise * @return true|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
...@@ -347,6 +347,8 @@ class ClassLoader ...@@ -347,6 +347,8 @@ class ClassLoader
return true; return true;
} }
return null;
} }
/** /**
......
<?php <?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace Composer; namespace Composer;
use Composer\Autoload\ClassLoader; use Composer\Autoload\ClassLoader;
use Composer\Semver\VersionParser; use Composer\Semver\VersionParser;
/**
* This class is copied in every Composer installed project and available to all
*
* See also https://getcomposer.org/doc/07-runtime.md#installed-versions
*
* To require it's presence, you can require `composer-runtime-api ^2.0`
*/
class InstalledVersions class InstalledVersions
{ {
private static $installed = array ( private static $installed;
'root' => private static $canGetVendors;
array ( private static $installedByVendor = array();
'pretty_version' => 'dev-develop',
'version' => 'dev-develop', /**
'aliases' => * Returns a list of all package names which are present, either by being installed, replaced or provided
array ( *
), * @return string[]
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e', * @psalm-return list<string>
'name' => 'yidian/yaf_demo', */
), public static function getInstalledPackages()
'versions' => {
array ( $packages = array();
'api/php_services' => foreach (self::getInstalled() as $installed) {
array ( $packages[] = array_keys($installed['versions']);
'pretty_version' => '1.0.14', }
'version' => '1.0.14.0',
'aliases' => if (1 === \count($packages)) {
array ( return $packages[0];
), }
'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa',
), return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
'api/php_utils' => }
array (
'pretty_version' => 'v1.0.17', /**
'version' => '1.0.17.0', * Returns a list of all package names with a specific type e.g. 'library'
'aliases' => *
array ( * @param string $type
), * @return string[]
'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87', * @psalm-return list<string>
), */
'bacon/bacon-qr-code' => public static function getInstalledPackagesByType($type)
array ( {
'pretty_version' => '2.0.4', $packagesByType = array();
'version' => '2.0.4.0',
'aliases' => foreach (self::getInstalled() as $installed) {
array ( foreach ($installed['versions'] as $name => $package) {
), if (isset($package['type']) && $package['type'] === $type) {
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09', $packagesByType[] = $name;
), }
'dasprid/enum' => }
array ( }
'pretty_version' => '1.0.3',
'version' => '1.0.3.0', return $packagesByType;
'aliases' => }
array (
), /**
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2', * Checks whether the given package is installed
), *
'elasticsearch/elasticsearch' => * This also returns true if the package name is provided or replaced by another package
array ( *
'pretty_version' => '7.11.x-dev', * @param string $packageName
'version' => '7.11.9999999.9999999-dev', * @param bool $includeDevRequirements
'aliases' => * @return bool
array ( */
), public static function isInstalled($packageName, $includeDevRequirements = true)
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf', {
), foreach (self::getInstalled() as $installed) {
'endroid/qr-code' => if (isset($installed['versions'][$packageName])) {
array ( return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
'pretty_version' => '3.9.6', }
'version' => '3.9.6.0', }
'aliases' =>
array ( return false;
), }
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
), /**
'ezimuel/guzzlestreams' => * Checks whether the given package satisfies a version constraint
array ( *
'pretty_version' => 'dev-master', * e.g. If you want to know whether version 2.3+ of package foo/bar is installed, you would call:
'version' => 'dev-master', *
'aliases' => * Composer\InstalledVersions::satisfies(new VersionParser, 'foo/bar', '^2.3')
array ( *
0 => '3.0.x-dev', * @param VersionParser $parser Install composer/semver to have access to this class and functionality
), * @param string $packageName
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8', * @param string|null $constraint A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
), * @return bool
'ezimuel/ringphp' => */
array ( public static function satisfies(VersionParser $parser, $packageName, $constraint)
'pretty_version' => 'dev-master', {
'version' => 'dev-master', $constraint = $parser->parseConstraints($constraint);
'aliases' => $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
array (
0 => '1.1.x-dev', return $provided->matches($constraint);
), }
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
), /**
'guzzlehttp/guzzle' => * Returns a version constraint representing all the range(s) which are installed for a given package
array ( *
'pretty_version' => '6.3.0', * It is easier to use this via isInstalled() with the $constraint argument if you need to check
'version' => '6.3.0.0', * whether a given version of a package is installed, and not just whether it exists
'aliases' => *
array ( * @param string $packageName
), * @return string Version constraint usable with composer/semver
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699', */
), public static function getVersionRanges($packageName)
'guzzlehttp/promises' => {
array ( foreach (self::getInstalled() as $installed) {
'pretty_version' => 'dev-master', if (!isset($installed['versions'][$packageName])) {
'version' => 'dev-master', continue;
'aliases' => }
array (
0 => '1.4.x-dev', $ranges = array();
), if (isset($installed['versions'][$packageName]['pretty_version'])) {
'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa', $ranges[] = $installed['versions'][$packageName]['pretty_version'];
), }
'guzzlehttp/psr7' => if (array_key_exists('aliases', $installed['versions'][$packageName])) {
array ( $ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
'pretty_version' => '1.x-dev', }
'version' => '1.9999999.9999999.9999999-dev', if (array_key_exists('replaced', $installed['versions'][$packageName])) {
'aliases' => $ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
array ( }
), if (array_key_exists('provided', $installed['versions'][$packageName])) {
'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f', $ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
), }
'khanamiryan/qrcode-detector-decoder' =>
array ( return implode(' || ', $ranges);
'pretty_version' => '1.0.5.2', }
'version' => '1.0.5.2',
'aliases' => throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
array ( }
),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1', /**
), * @param string $packageName
'mongodb/mongodb' => * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
array ( */
'pretty_version' => '1.4.3', public static function getVersion($packageName)
'version' => '1.4.3.0', {
'aliases' => foreach (self::getInstalled() as $installed) {
array ( if (!isset($installed['versions'][$packageName])) {
), continue;
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96', }
),
'myclabs/php-enum' => if (!isset($installed['versions'][$packageName]['version'])) {
array ( return null;
'pretty_version' => '1.7.7', }
'version' => '1.7.7.0',
'aliases' => return $installed['versions'][$packageName]['version'];
array ( }
),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7', throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
), }
'perftools/php-profiler' =>
array ( /**
'pretty_version' => '0.18.0', * @param string $packageName
'version' => '0.18.0.0', * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
'aliases' => */
array ( public static function getPrettyVersion($packageName)
), {
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae', foreach (self::getInstalled() as $installed) {
), if (!isset($installed['versions'][$packageName])) {
'psr/http-message' => continue;
array ( }
'pretty_version' => 'dev-master',
'version' => 'dev-master', if (!isset($installed['versions'][$packageName]['pretty_version'])) {
'aliases' => return null;
array ( }
0 => '1.0.x-dev',
), return $installed['versions'][$packageName]['pretty_version'];
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4', }
),
'psr/http-message-implementation' => throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
array ( }
'provided' =>
array ( /**
0 => '1.0', * @param string $packageName
), * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
), */
'psr/log' => public static function getReference($packageName)
array ( {
'pretty_version' => '1.1.4', foreach (self::getInstalled() as $installed) {
'version' => '1.1.4.0', if (!isset($installed['versions'][$packageName])) {
'aliases' => continue;
array ( }
),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', if (!isset($installed['versions'][$packageName]['reference'])) {
), return null;
'ralouphie/getallheaders' => }
array (
'pretty_version' => '3.0.3', return $installed['versions'][$packageName]['reference'];
'version' => '3.0.3.0', }
'aliases' =>
array ( throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
), }
'reference' => '120b605dfeb996808c31b6477290a714d356e822',
), /**
'react/promise' => * @param string $packageName
array ( * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
'pretty_version' => '2.x-dev', */
'version' => '2.9999999.9999999.9999999-dev', public static function getInstallPath($packageName)
'aliases' => {
array ( foreach (self::getInstalled() as $installed) {
), if (!isset($installed['versions'][$packageName])) {
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31', continue;
), }
'symfony/deprecation-contracts' =>
array ( return isset($installed['versions'][$packageName]['install_path']) ? $installed['versions'][$packageName]['install_path'] : null;
'pretty_version' => 'dev-main', }
'version' => 'dev-main',
'aliases' => throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
array ( }
0 => '2.5.x-dev',
), /**
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8', * @return array
), * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}
'symfony/options-resolver' => */
array ( public static function getRootPackage()
'pretty_version' => '5.4.x-dev', {
'version' => '5.4.9999999.9999999-dev', $installed = self::getInstalled();
'aliases' =>
array ( return $installed[0]['root'];
), }
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab',
), /**
'symfony/polyfill-ctype' => * Returns the raw installed.php data for custom implementations
array ( *
'pretty_version' => 'dev-main', * @deprecated Use getAllRawData() instead which returns all datasets for all autoloaders present in the process. getRawData only returns the first dataset loaded, which may not be what you expect.
'version' => 'dev-main', * @return array[]
'aliases' => * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}
array ( */
0 => '1.23.x-dev', public static function getRawData()
), {
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
),
'symfony/polyfill-intl-grapheme' => if (null === self::$installed) {
array ( // only require the installed.php file if this file is loaded from its dumped location,
'pretty_version' => 'dev-main', // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
'version' => 'dev-main', if (substr(__DIR__, -8, 1) !== 'C') {
'aliases' => self::$installed = include __DIR__ . '/installed.php';
array ( } else {
0 => '1.23.x-dev', self::$installed = array();
), }
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', }
),
'symfony/polyfill-intl-normalizer' => return self::$installed;
array ( }
'pretty_version' => 'dev-main',
'version' => 'dev-main', /**
'aliases' => * Returns the raw data of all installed.php which are currently loaded for custom implementations
array ( *
0 => '1.23.x-dev', * @return array[]
), * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', */
), public static function getAllRawData()
'symfony/polyfill-mbstring' => {
array ( return self::getInstalled();
'pretty_version' => 'dev-main', }
'version' => 'dev-main',
'aliases' => /**
array ( * Lets you reload the static array from another file
0 => '1.23.x-dev', *
), * This is only useful for complex integrations in which a project needs to use
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', * this class but then also needs to execute another project's autoloader in process,
), * and wants to ensure both projects have access to their version of installed.php.
'symfony/polyfill-php73' => *
array ( * A typical case would be PHPUnit, where it would need to make sure it reads all
'pretty_version' => 'dev-main', * the data it needs from this class, then call reload() with
'version' => 'dev-main', * `require $CWD/vendor/composer/installed.php` (or similar) as input to make sure
'aliases' => * the project in which it runs can then also use this class safely, without
array ( * interference between PHPUnit's dependencies and the project's dependencies.
0 => '1.23.x-dev', *
), * @param array[] $data A vendor/composer/installed.php data set
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', * @return void
), *
'symfony/polyfill-php80' => * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>} $data
array ( */
'pretty_version' => 'dev-main', public static function reload($data)
'version' => 'dev-main', {
'aliases' => self::$installed = $data;
array ( self::$installedByVendor = array();
0 => '1.23.x-dev', }
),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', /**
), * @return array[]
'symfony/property-access' => * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string}>}>
array ( */
'pretty_version' => '5.4.x-dev', private static function getInstalled()
'version' => '5.4.9999999.9999999-dev', {
'aliases' => if (null === self::$canGetVendors) {
array ( self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
), }
'reference' => '7831b0331b786db39026d190faa4914f94adb212',
), $installed = array();
'symfony/property-info' =>
array ( if (self::$canGetVendors) {
'pretty_version' => '5.4.x-dev', foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
'version' => '5.4.9999999.9999999-dev', if (isset(self::$installedByVendor[$vendorDir])) {
'aliases' => $installed[] = self::$installedByVendor[$vendorDir];
array ( } elseif (is_file($vendorDir.'/composer/installed.php')) {
), $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
'reference' => '903f3f3f6a360bc4739f8390e5031acc70d9cd9f', if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
), self::$installed = $installed[count($installed) - 1];
'symfony/string' => }
array ( }
'pretty_version' => '5.4.x-dev', }
'version' => '5.4.9999999.9999999-dev', }
'aliases' =>
array ( if (null === self::$installed) {
), // only require the installed.php file if this file is loaded from its dumped location,
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b', // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
), if (substr(__DIR__, -8, 1) !== 'C') {
'yidian/yaf_demo' => self::$installed = require __DIR__ . '/installed.php';
array ( } else {
'pretty_version' => 'dev-develop', self::$installed = array();
'version' => 'dev-develop', }
'aliases' => }
array ( $installed[] = self::$installed;
),
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e', return $installed;
), }
),
);
private static $canGetVendors;
private static $installedByVendor = array();
public static function getInstalledPackages()
{
$packages = array();
foreach (self::getInstalled() as $installed) {
$packages[] = array_keys($installed['versions']);
}
if (1 === \count($packages)) {
return $packages[0];
}
return array_keys(array_flip(\call_user_func_array('array_merge', $packages)));
}
public static function isInstalled($packageName)
{
foreach (self::getInstalled() as $installed) {
if (isset($installed['versions'][$packageName])) {
return true;
}
}
return false;
}
public static function satisfies(VersionParser $parser, $packageName, $constraint)
{
$constraint = $parser->parseConstraints($constraint);
$provided = $parser->parseConstraints(self::getVersionRanges($packageName));
return $provided->matches($constraint);
}
public static function getVersionRanges($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
$ranges = array();
if (isset($installed['versions'][$packageName]['pretty_version'])) {
$ranges[] = $installed['versions'][$packageName]['pretty_version'];
}
if (array_key_exists('aliases', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['aliases']);
}
if (array_key_exists('replaced', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['replaced']);
}
if (array_key_exists('provided', $installed['versions'][$packageName])) {
$ranges = array_merge($ranges, $installed['versions'][$packageName]['provided']);
}
return implode(' || ', $ranges);
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['version'])) {
return null;
}
return $installed['versions'][$packageName]['version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getPrettyVersion($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['pretty_version'])) {
return null;
}
return $installed['versions'][$packageName]['pretty_version'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getReference($packageName)
{
foreach (self::getInstalled() as $installed) {
if (!isset($installed['versions'][$packageName])) {
continue;
}
if (!isset($installed['versions'][$packageName]['reference'])) {
return null;
}
return $installed['versions'][$packageName]['reference'];
}
throw new \OutOfBoundsException('Package "' . $packageName . '" is not installed');
}
public static function getRootPackage()
{
$installed = self::getInstalled();
return $installed[0]['root'];
}
public static function getRawData()
{
return self::$installed;
}
public static function reload($data)
{
self::$installed = $data;
self::$installedByVendor = array();
}
private static function getInstalled()
{
if (null === self::$canGetVendors) {
self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
}
$installed = array();
if (self::$canGetVendors) {
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
if (isset(self::$installedByVendor[$vendorDir])) {
$installed[] = self::$installedByVendor[$vendorDir];
} elseif (is_file($vendorDir.'/composer/installed.php')) {
$installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
}
}
}
$installed[] = self::$installed;
return $installed;
}
} }
...@@ -141,6 +141,7 @@ return array( ...@@ -141,6 +141,7 @@ return array(
'App\\Models\\user\\mysql\\UserWechatBind' => $baseDir . '/application/models/user/mysql/UserWechatBind.php', 'App\\Models\\user\\mysql\\UserWechatBind' => $baseDir . '/application/models/user/mysql/UserWechatBind.php',
'App\\Plugins\\Hook' => $baseDir . '/application/plugins/Hook.php', 'App\\Plugins\\Hook' => $baseDir . '/application/plugins/Hook.php',
'App\\Services\\common\\CommonService' => $baseDir . '/application/services/common/CommonService.php', 'App\\Services\\common\\CommonService' => $baseDir . '/application/services/common/CommonService.php',
'App\\Services\\common\\KafkaService' => $baseDir . '/application/services/common/KafkaService.php',
'App\\Services\\demo\\ElasticService' => $baseDir . '/application/services/demo/ElasticService.php', 'App\\Services\\demo\\ElasticService' => $baseDir . '/application/services/demo/ElasticService.php',
'App\\Services\\demo\\MongoService' => $baseDir . '/application/services/demo/MongoService.php', 'App\\Services\\demo\\MongoService' => $baseDir . '/application/services/demo/MongoService.php',
'App\\Services\\demo\\MysqlService' => $baseDir . '/application/services/demo/MysqlService.php', 'App\\Services\\demo\\MysqlService' => $baseDir . '/application/services/demo/MysqlService.php',
......
...@@ -8,18 +8,18 @@ $baseDir = dirname($vendorDir); ...@@ -8,18 +8,18 @@ $baseDir = dirname($vendorDir);
return array( return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.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', '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', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php', 'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'3a37ebac017bc098e9a86b35401e7a68' => $vendorDir . '/mongodb/mongodb/src/functions.php', '3a37ebac017bc098e9a86b35401e7a68' => $vendorDir . '/mongodb/mongodb/src/functions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
); );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf class ComposerAutoloaderInit147d97defc074a277015f080b27e01c6
{ {
private static $loader; private static $loader;
...@@ -24,15 +24,15 @@ class ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf ...@@ -24,15 +24,15 @@ class ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInit147d97defc074a277015f080b27e01c6', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInit147d97defc074a277015f080b27e01c6', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) { if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php'; require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInit147d97defc074a277015f080b27e01c6::getInitializer($loader));
} else { } else {
$map = require __DIR__ . '/autoload_namespaces.php'; $map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) { foreach ($map as $namespace => $path) {
...@@ -53,19 +53,19 @@ class ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf ...@@ -53,19 +53,19 @@ class ComposerAutoloaderInit14d712e6ba9ca61e9e636d6cf65f43bf
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$files; $includeFiles = Composer\Autoload\ComposerStaticInit147d97defc074a277015f080b27e01c6::$files;
} else { } else {
$includeFiles = require __DIR__ . '/autoload_files.php'; $includeFiles = require __DIR__ . '/autoload_files.php';
} }
foreach ($includeFiles as $fileIdentifier => $file) { foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire14d712e6ba9ca61e9e636d6cf65f43bf($fileIdentifier, $file); composerRequire147d97defc074a277015f080b27e01c6($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequire14d712e6ba9ca61e9e636d6cf65f43bf($fileIdentifier, $file) function composerRequire147d97defc074a277015f080b27e01c6($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file; require $file;
......
...@@ -4,25 +4,25 @@ ...@@ -4,25 +4,25 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf class ComposerStaticInit147d97defc074a277015f080b27e01c6
{ {
public static $files = array ( public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.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', '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', 'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php', 'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php', 'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php', 'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php', 'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php', '3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
); );
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
...@@ -370,6 +370,7 @@ class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf ...@@ -370,6 +370,7 @@ class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf
'App\\Models\\user\\mysql\\UserWechatBind' => __DIR__ . '/../..' . '/application/models/user/mysql/UserWechatBind.php', 'App\\Models\\user\\mysql\\UserWechatBind' => __DIR__ . '/../..' . '/application/models/user/mysql/UserWechatBind.php',
'App\\Plugins\\Hook' => __DIR__ . '/../..' . '/application/plugins/Hook.php', 'App\\Plugins\\Hook' => __DIR__ . '/../..' . '/application/plugins/Hook.php',
'App\\Services\\common\\CommonService' => __DIR__ . '/../..' . '/application/services/common/CommonService.php', 'App\\Services\\common\\CommonService' => __DIR__ . '/../..' . '/application/services/common/CommonService.php',
'App\\Services\\common\\KafkaService' => __DIR__ . '/../..' . '/application/services/common/KafkaService.php',
'App\\Services\\demo\\ElasticService' => __DIR__ . '/../..' . '/application/services/demo/ElasticService.php', 'App\\Services\\demo\\ElasticService' => __DIR__ . '/../..' . '/application/services/demo/ElasticService.php',
'App\\Services\\demo\\MongoService' => __DIR__ . '/../..' . '/application/services/demo/MongoService.php', 'App\\Services\\demo\\MongoService' => __DIR__ . '/../..' . '/application/services/demo/MongoService.php',
'App\\Services\\demo\\MysqlService' => __DIR__ . '/../..' . '/application/services/demo/MysqlService.php', 'App\\Services\\demo\\MysqlService' => __DIR__ . '/../..' . '/application/services/demo/MysqlService.php',
...@@ -1314,9 +1315,9 @@ class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf ...@@ -1314,9 +1315,9 @@ class ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf
public static function getInitializer(ClassLoader $loader) public static function getInitializer(ClassLoader $loader)
{ {
return \Closure::bind(function () use ($loader) { return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInit147d97defc074a277015f080b27e01c6::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInit147d97defc074a277015f080b27e01c6::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit14d712e6ba9ca61e9e636d6cf65f43bf::$classMap; $loader->classMap = ComposerStaticInit147d97defc074a277015f080b27e01c6::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }
......
...@@ -2,19 +2,19 @@ ...@@ -2,19 +2,19 @@
"packages": [ "packages": [
{ {
"name": "api/php_services", "name": "api/php_services",
"version": "1.0.14", "version": "1.0.15",
"version_normalized": "1.0.14.0", "version_normalized": "1.0.15.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://git.yidian-inc.com:8021/bp/php_services.git", "url": "https://git.yidian-inc.com:8021/bp/php_services.git",
"reference": "f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa" "reference": "590b209014d0ccb8de96dd4cb243eeee41cae47d"
}, },
"require": { "require": {
"endroid/qr-code": "^3.9", "endroid/qr-code": "^3.9",
"perftools/php-profiler": "^0.18.0", "perftools/php-profiler": "^0.18.0",
"php": "7.2.*" "php": "7.2.*"
}, },
"time": "2021-09-08T06:38:07+00:00", "time": "2021-09-14T06:43:42+00:00",
"type": "library", "type": "library",
"installation-source": "source", "installation-source": "source",
"autoload": { "autoload": {
...@@ -553,7 +553,13 @@ ...@@ -553,7 +553,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa", "url": "https://api.github.com/repos/guzzle/promises/zipball/c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa", "reference": "c1dd809c8f51a477701052f4b9e5b4bb5c1061aa",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.5" "php": ">=5.5"
...@@ -641,7 +647,13 @@ ...@@ -641,7 +647,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f", "url": "https://api.github.com/repos/guzzle/psr7/zipball/9d006741ba865a45adccfac45d8e1053086a5a3f",
"reference": "9d006741ba865a45adccfac45d8e1053086a5a3f", "reference": "9d006741ba865a45adccfac45d8e1053086a5a3f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=5.4.0", "php": ">=5.4.0",
...@@ -1332,12 +1344,12 @@ ...@@ -1332,12 +1344,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/options-resolver.git", "url": "https://github.com/symfony/options-resolver.git",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab" "reference": "cd63dbab0428a47f8576e4e58148aeae2e32e91c"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/options-resolver/zipball/f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "url": "https://api.github.com/repos/symfony/options-resolver/zipball/cd63dbab0428a47f8576e4e58148aeae2e32e91c",
"reference": "f1b99f10ea04aa9d0aafddcd8ba3d65545403bab", "reference": "cd63dbab0428a47f8576e4e58148aeae2e32e91c",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -1352,7 +1364,7 @@ ...@@ -1352,7 +1364,7 @@
"symfony/polyfill-php73": "~1.0", "symfony/polyfill-php73": "~1.0",
"symfony/polyfill-php80": "^1.16" "symfony/polyfill-php80": "^1.16"
}, },
"time": "2021-08-17T14:20:01+00:00", "time": "2021-09-09T08:06:01+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
...@@ -1684,12 +1696,12 @@ ...@@ -1684,12 +1696,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6" "reference": "344e456152e22a1bce3048c6c311059ea14bde47"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/344e456152e22a1bce3048c6c311059ea14bde47",
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6", "reference": "344e456152e22a1bce3048c6c311059ea14bde47",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -1704,7 +1716,7 @@ ...@@ -1704,7 +1716,7 @@
"suggest": { "suggest": {
"ext-mbstring": "For best performance" "ext-mbstring": "For best performance"
}, },
"time": "2021-05-27T12:26:48+00:00", "time": "2021-09-13T13:54:24+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -1749,7 +1761,7 @@ ...@@ -1749,7 +1761,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-mbstring/tree/main"
}, },
"funding": [ "funding": [
{ {
...@@ -1774,12 +1786,12 @@ ...@@ -1774,12 +1786,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php73.git", "url": "https://github.com/symfony/polyfill-php73.git",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010" "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fba8933c384d6476ab14fb7b8526e5287ca7e010", "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/cc5db0e22b3cb4111010e48785a97f670b350ca5",
"reference": "fba8933c384d6476ab14fb7b8526e5287ca7e010", "reference": "cc5db0e22b3cb4111010e48785a97f670b350ca5",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -1791,7 +1803,7 @@ ...@@ -1791,7 +1803,7 @@
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"time": "2021-02-19T12:13:01+00:00", "time": "2021-06-05T21:20:04+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -1838,7 +1850,7 @@ ...@@ -1838,7 +1850,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php73/tree/v1.23.0" "source": "https://github.com/symfony/polyfill-php73/tree/main"
}, },
"funding": [ "funding": [
{ {
...@@ -1863,12 +1875,12 @@ ...@@ -1863,12 +1875,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php80.git", "url": "https://github.com/symfony/polyfill-php80.git",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be" "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be", "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/57b712b08eddb97c762a8caa32c84e037892d2e9",
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be", "reference": "57b712b08eddb97c762a8caa32c84e037892d2e9",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -1880,7 +1892,7 @@ ...@@ -1880,7 +1892,7 @@
"require": { "require": {
"php": ">=7.1" "php": ">=7.1"
}, },
"time": "2021-07-28T13:41:28+00:00", "time": "2021-09-13T13:58:33+00:00",
"default-branch": true, "default-branch": true,
"type": "library", "type": "library",
"extra": { "extra": {
...@@ -1931,7 +1943,7 @@ ...@@ -1931,7 +1943,7 @@
"shim" "shim"
], ],
"support": { "support": {
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1" "source": "https://github.com/symfony/polyfill-php80/tree/main"
}, },
"funding": [ "funding": [
{ {
...@@ -1956,12 +1968,12 @@ ...@@ -1956,12 +1968,12 @@
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/property-access.git", "url": "https://github.com/symfony/property-access.git",
"reference": "7831b0331b786db39026d190faa4914f94adb212" "reference": "bd3efa2a2d856d167dde8e7b883c65119064b7f5"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-access/zipball/7831b0331b786db39026d190faa4914f94adb212", "url": "https://api.github.com/repos/symfony/property-access/zipball/bd3efa2a2d856d167dde8e7b883c65119064b7f5",
"reference": "7831b0331b786db39026d190faa4914f94adb212", "reference": "bd3efa2a2d856d167dde8e7b883c65119064b7f5",
"shasum": "", "shasum": "",
"mirrors": [ "mirrors": [
{ {
...@@ -1982,7 +1994,7 @@ ...@@ -1982,7 +1994,7 @@
"suggest": { "suggest": {
"psr/cache-implementation": "To cache access methods." "psr/cache-implementation": "To cache access methods."
}, },
"time": "2021-08-17T14:20:01+00:00", "time": "2021-09-10T12:30:46+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
...@@ -2052,7 +2064,13 @@ ...@@ -2052,7 +2064,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/property-info/zipball/903f3f3f6a360bc4739f8390e5031acc70d9cd9f", "url": "https://api.github.com/repos/symfony/property-info/zipball/903f3f3f6a360bc4739f8390e5031acc70d9cd9f",
"reference": "903f3f3f6a360bc4739f8390e5031acc70d9cd9f", "reference": "903f3f3f6a360bc4739f8390e5031acc70d9cd9f",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
...@@ -2145,7 +2163,13 @@ ...@@ -2145,7 +2163,13 @@
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "url": "https://api.github.com/repos/symfony/string/zipball/fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b", "reference": "fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b",
"shasum": "" "shasum": "",
"mirrors": [
{
"url": "https://mirrors.aliyun.com/composer/dists/%package%/%reference%.%type%",
"preferred": true
}
]
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
......
<?php return array ( <?php return array(
'root' => 'root' => array(
array ( 'pretty_version' => 'dev-master',
'pretty_version' => 'dev-develop', 'version' => 'dev-master',
'version' => 'dev-develop', 'type' => 'project',
'aliases' => 'install_path' => __DIR__ . '/../../',
array ( 'aliases' => array(),
), 'reference' => '2af24ef59d9888a3a8c64df2ea4efd62c8a675a1',
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e',
'name' => 'yidian/yaf_demo', 'name' => 'yidian/yaf_demo',
), 'dev' => true,
'versions' => ),
array ( 'versions' => array(
'api/php_services' => 'api/php_services' => array(
array ( 'pretty_version' => '1.0.15',
'pretty_version' => '1.0.14', 'version' => '1.0.15.0',
'version' => '1.0.14.0', 'type' => 'library',
'aliases' => 'install_path' => __DIR__ . '/../api/php_services',
array ( 'aliases' => array(),
), 'reference' => '590b209014d0ccb8de96dd4cb243eeee41cae47d',
'reference' => 'f2ba54cfaff45ffa8c0c4864f3b4935e1fcb3cfa', 'dev_requirement' => false,
), ),
'api/php_utils' => 'api/php_utils' => array(
array (
'pretty_version' => 'v1.0.17', 'pretty_version' => 'v1.0.17',
'version' => '1.0.17.0', 'version' => '1.0.17.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../api/php_utils',
), 'aliases' => array(),
'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87', 'reference' => 'aa70ccdd545f3e421eaf717274954990f1805b87',
'dev_requirement' => false,
), ),
'bacon/bacon-qr-code' => 'bacon/bacon-qr-code' => array(
array (
'pretty_version' => '2.0.4', 'pretty_version' => '2.0.4',
'version' => '2.0.4.0', 'version' => '2.0.4.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../bacon/bacon-qr-code',
), 'aliases' => array(),
'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09', 'reference' => 'f73543ac4e1def05f1a70bcd1525c8a157a1ad09',
'dev_requirement' => false,
), ),
'dasprid/enum' => 'dasprid/enum' => array(
array (
'pretty_version' => '1.0.3', 'pretty_version' => '1.0.3',
'version' => '1.0.3.0', 'version' => '1.0.3.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../dasprid/enum',
), 'aliases' => array(),
'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2', 'reference' => '5abf82f213618696dda8e3bf6f64dd042d8542b2',
'dev_requirement' => false,
), ),
'elasticsearch/elasticsearch' => 'elasticsearch/elasticsearch' => array(
array (
'pretty_version' => '7.11.x-dev', 'pretty_version' => '7.11.x-dev',
'version' => '7.11.9999999.9999999-dev', 'version' => '7.11.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../elasticsearch/elasticsearch',
), 'aliases' => array(),
'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf', 'reference' => '8d08050fef9d89004702b1428b8c1f7f4f6162cf',
'dev_requirement' => false,
), ),
'endroid/qr-code' => 'endroid/qr-code' => array(
array (
'pretty_version' => '3.9.6', 'pretty_version' => '3.9.6',
'version' => '3.9.6.0', 'version' => '3.9.6.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../endroid/qr-code',
), 'aliases' => array(),
'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f', 'reference' => '9cdd4f5d609bfc8811ca4a62b4d23eb16976242f',
'dev_requirement' => false,
), ),
'ezimuel/guzzlestreams' => 'ezimuel/guzzlestreams' => array(
array (
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../ezimuel/guzzlestreams',
'aliases' => array(
0 => '3.0.x-dev', 0 => '3.0.x-dev',
), ),
'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8', 'reference' => 'abe3791d231167f14eb80d413420d1eab91163a8',
'dev_requirement' => false,
), ),
'ezimuel/ringphp' => 'ezimuel/ringphp' => array(
array (
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../ezimuel/ringphp',
'aliases' => array(
0 => '1.1.x-dev', 0 => '1.1.x-dev',
), ),
'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b', 'reference' => '0b78f89d8e0bb9e380046c31adfa40347e9f663b',
'dev_requirement' => false,
), ),
'guzzlehttp/guzzle' => 'guzzlehttp/guzzle' => array(
array (
'pretty_version' => '6.3.0', 'pretty_version' => '6.3.0',
'version' => '6.3.0.0', 'version' => '6.3.0.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../guzzlehttp/guzzle',
), 'aliases' => array(),
'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699', 'reference' => 'f4db5a78a5ea468d4831de7f0bf9d9415e348699',
'dev_requirement' => false,
), ),
'guzzlehttp/promises' => 'guzzlehttp/promises' => array(
array (
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../guzzlehttp/promises',
'aliases' => array(
0 => '1.4.x-dev', 0 => '1.4.x-dev',
), ),
'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa', 'reference' => 'c1dd809c8f51a477701052f4b9e5b4bb5c1061aa',
'dev_requirement' => false,
), ),
'guzzlehttp/psr7' => 'guzzlehttp/psr7' => array(
array (
'pretty_version' => '1.x-dev', 'pretty_version' => '1.x-dev',
'version' => '1.9999999.9999999.9999999-dev', 'version' => '1.9999999.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../guzzlehttp/psr7',
), 'aliases' => array(),
'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f', 'reference' => '9d006741ba865a45adccfac45d8e1053086a5a3f',
'dev_requirement' => false,
), ),
'khanamiryan/qrcode-detector-decoder' => 'khanamiryan/qrcode-detector-decoder' => array(
array (
'pretty_version' => '1.0.5.2', 'pretty_version' => '1.0.5.2',
'version' => '1.0.5.2', 'version' => '1.0.5.2',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../khanamiryan/qrcode-detector-decoder',
), 'aliases' => array(),
'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1', 'reference' => '04fdd58d86a387065f707dc6d3cc304c719910c1',
'dev_requirement' => false,
), ),
'mongodb/mongodb' => 'mongodb/mongodb' => array(
array (
'pretty_version' => '1.4.3', 'pretty_version' => '1.4.3',
'version' => '1.4.3.0', 'version' => '1.4.3.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../mongodb/mongodb',
), 'aliases' => array(),
'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96', 'reference' => '18fca8cc8d0c2cc07f76605760d20632bb3dab96',
'dev_requirement' => false,
), ),
'myclabs/php-enum' => 'myclabs/php-enum' => array(
array (
'pretty_version' => '1.7.7', 'pretty_version' => '1.7.7',
'version' => '1.7.7.0', 'version' => '1.7.7.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../myclabs/php-enum',
), 'aliases' => array(),
'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7', 'reference' => 'd178027d1e679832db9f38248fcc7200647dc2b7',
'dev_requirement' => false,
), ),
'perftools/php-profiler' => 'perftools/php-profiler' => array(
array (
'pretty_version' => '0.18.0', 'pretty_version' => '0.18.0',
'version' => '0.18.0.0', 'version' => '0.18.0.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../perftools/php-profiler',
), 'aliases' => array(),
'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae', 'reference' => '794c435f615ab9ca4347e386b4d8c6524fe9e3ae',
'dev_requirement' => false,
), ),
'psr/http-message' => 'psr/http-message' => array(
array (
'pretty_version' => 'dev-master', 'pretty_version' => 'dev-master',
'version' => 'dev-master', 'version' => 'dev-master',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../psr/http-message',
'aliases' => array(
0 => '1.0.x-dev', 0 => '1.0.x-dev',
), ),
'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4', 'reference' => 'efd67d1dc14a7ef4fc4e518e7dee91c271d524e4',
'dev_requirement' => false,
), ),
'psr/http-message-implementation' => 'psr/http-message-implementation' => array(
array ( 'dev_requirement' => false,
'provided' => 'provided' => array(
array (
0 => '1.0', 0 => '1.0',
), ),
), ),
'psr/log' => 'psr/log' => array(
array (
'pretty_version' => '1.1.4', 'pretty_version' => '1.1.4',
'version' => '1.1.4.0', 'version' => '1.1.4.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../psr/log',
), 'aliases' => array(),
'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11', 'reference' => 'd49695b909c3b7628b6289db5479a1c204601f11',
'dev_requirement' => false,
), ),
'ralouphie/getallheaders' => 'ralouphie/getallheaders' => array(
array (
'pretty_version' => '3.0.3', 'pretty_version' => '3.0.3',
'version' => '3.0.3.0', 'version' => '3.0.3.0',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../ralouphie/getallheaders',
), 'aliases' => array(),
'reference' => '120b605dfeb996808c31b6477290a714d356e822', 'reference' => '120b605dfeb996808c31b6477290a714d356e822',
'dev_requirement' => false,
), ),
'react/promise' => 'react/promise' => array(
array (
'pretty_version' => '2.x-dev', 'pretty_version' => '2.x-dev',
'version' => '2.9999999.9999999.9999999-dev', 'version' => '2.9999999.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../react/promise',
), 'aliases' => array(),
'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31', 'reference' => 'a9752a861e21c0fe0b380c9f9e55beddc0ed7d31',
'dev_requirement' => false,
), ),
'symfony/deprecation-contracts' => 'symfony/deprecation-contracts' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/deprecation-contracts',
'aliases' => array(
0 => '2.5.x-dev', 0 => '2.5.x-dev',
), ),
'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8', 'reference' => '6f981ee24cf69ee7ce9736146d1c57c2780598a8',
'dev_requirement' => false,
), ),
'symfony/options-resolver' => 'symfony/options-resolver' => array(
array (
'pretty_version' => '5.4.x-dev', 'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev', 'version' => '5.4.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/options-resolver',
), 'aliases' => array(),
'reference' => 'f1b99f10ea04aa9d0aafddcd8ba3d65545403bab', 'reference' => 'cd63dbab0428a47f8576e4e58148aeae2e32e91c',
'dev_requirement' => false,
), ),
'symfony/polyfill-ctype' => 'symfony/polyfill-ctype' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/polyfill-ctype',
'aliases' => array(
0 => '1.23.x-dev', 0 => '1.23.x-dev',
), ),
'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce', 'reference' => '46cd95797e9df938fdd2b03693b5fca5e64b01ce',
'dev_requirement' => false,
), ),
'symfony/polyfill-intl-grapheme' => 'symfony/polyfill-intl-grapheme' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/polyfill-intl-grapheme',
'aliases' => array(
0 => '1.23.x-dev', 0 => '1.23.x-dev',
), ),
'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535', 'reference' => '16880ba9c5ebe3642d1995ab866db29270b36535',
'dev_requirement' => false,
), ),
'symfony/polyfill-intl-normalizer' => 'symfony/polyfill-intl-normalizer' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
'aliases' => array(
0 => '1.23.x-dev', 0 => '1.23.x-dev',
), ),
'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8', 'reference' => '8590a5f561694770bdcd3f9b5c69dde6945028e8',
'dev_requirement' => false,
), ),
'symfony/polyfill-mbstring' => 'symfony/polyfill-mbstring' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
'aliases' => array(
0 => '1.23.x-dev', 0 => '1.23.x-dev',
), ),
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6', 'reference' => '344e456152e22a1bce3048c6c311059ea14bde47',
'dev_requirement' => false,
), ),
'symfony/polyfill-php73' => 'symfony/polyfill-php73' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/polyfill-php73',
'aliases' => array(
0 => '1.23.x-dev', 0 => '1.23.x-dev',
), ),
'reference' => 'fba8933c384d6476ab14fb7b8526e5287ca7e010', 'reference' => 'cc5db0e22b3cb4111010e48785a97f670b350ca5',
'dev_requirement' => false,
), ),
'symfony/polyfill-php80' => 'symfony/polyfill-php80' => array(
array (
'pretty_version' => 'dev-main', 'pretty_version' => 'dev-main',
'version' => 'dev-main', 'version' => 'dev-main',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/polyfill-php80',
'aliases' => array(
0 => '1.23.x-dev', 0 => '1.23.x-dev',
), ),
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be', 'reference' => '57b712b08eddb97c762a8caa32c84e037892d2e9',
'dev_requirement' => false,
), ),
'symfony/property-access' => 'symfony/property-access' => array(
array (
'pretty_version' => '5.4.x-dev', 'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev', 'version' => '5.4.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/property-access',
'aliases' => array(),
'reference' => 'bd3efa2a2d856d167dde8e7b883c65119064b7f5',
'dev_requirement' => false,
), ),
'reference' => '7831b0331b786db39026d190faa4914f94adb212', 'symfony/property-info' => array(
),
'symfony/property-info' =>
array (
'pretty_version' => '5.4.x-dev', 'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev', 'version' => '5.4.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/property-info',
), 'aliases' => array(),
'reference' => '903f3f3f6a360bc4739f8390e5031acc70d9cd9f', 'reference' => '903f3f3f6a360bc4739f8390e5031acc70d9cd9f',
'dev_requirement' => false,
), ),
'symfony/string' => 'symfony/string' => array(
array (
'pretty_version' => '5.4.x-dev', 'pretty_version' => '5.4.x-dev',
'version' => '5.4.9999999.9999999-dev', 'version' => '5.4.9999999.9999999-dev',
'aliases' => 'type' => 'library',
array ( 'install_path' => __DIR__ . '/../symfony/string',
), 'aliases' => array(),
'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b', 'reference' => 'fa2c5cc3f7dac23d87429652fe0daf28d65cbd5b',
'dev_requirement' => false,
), ),
'yidian/yaf_demo' => 'yidian/yaf_demo' => array(
array ( 'pretty_version' => 'dev-master',
'pretty_version' => 'dev-develop', 'version' => 'dev-master',
'version' => 'dev-develop', 'type' => 'project',
'aliases' => 'install_path' => __DIR__ . '/../../',
array ( 'aliases' => array(),
), 'reference' => '2af24ef59d9888a3a8c64df2ea4efd62c8a675a1',
'reference' => '8f346c81d3f2e7e81c7870acbece3051b1016b7e', 'dev_requirement' => false,
), ),
), ),
); );
...@@ -434,6 +434,8 @@ class OptionsResolver implements Options ...@@ -434,6 +434,8 @@ class OptionsResolver implements Options
* @param string $package The name of the composer package that is triggering the deprecation * @param string $package The name of the composer package that is triggering the deprecation
* @param string $version The version of the package that introduced the deprecation * @param string $version The version of the package that introduced the deprecation
* @param string|\Closure $message The deprecation message to use * @param string|\Closure $message The deprecation message to use
*
* @return $this
*/ */
public function setDeprecated(string $option/*, string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self public function setDeprecated(string $option/*, string $package, string $version, $message = 'The option "%name%" is deprecated.' */): self
{ {
......
...@@ -602,6 +602,9 @@ final class Mbstring ...@@ -602,6 +602,9 @@ final class Mbstring
if (80000 > \PHP_VERSION_ID) { if (80000 > \PHP_VERSION_ID) {
return false; return false;
} }
if (\is_int($c) || 'long' === $c || 'entity' === $c) {
return false;
}
throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint'); throw new \ValueError('Argument #1 ($substitute_character) must be "none", "long", "entity" or a valid codepoint');
} }
......
...@@ -9,6 +9,8 @@ ...@@ -9,6 +9,8 @@
* file that was distributed with this source code. * file that was distributed with this source code.
*/ */
class JsonException extends Exception if (\PHP_VERSION_ID < 70300) {
{ class JsonException extends Exception
{
}
} }
<?php <?php
class UnhandledMatchError extends Error if (\PHP_VERSION_ID < 80000) {
{ class UnhandledMatchError extends Error
{
}
} }
<?php <?php
class ValueError extends Error if (\PHP_VERSION_ID < 80000) {
{ class ValueError extends Error
{
}
} }
...@@ -313,11 +313,9 @@ class PropertyAccessor implements PropertyAccessorInterface ...@@ -313,11 +313,9 @@ class PropertyAccessor implements PropertyAccessorInterface
if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) { if (!$zval[self::VALUE] instanceof \ArrayAccess && !\is_array($zval[self::VALUE])) {
return false; return false;
} }
} else { } elseif (!\is_object($zval[self::VALUE]) || !$this->isPropertyWritable($zval[self::VALUE], $propertyPath->getElement($i))) {
if (!$this->isPropertyWritable($zval[self::VALUE], $propertyPath->getElement($i))) {
return false; return false;
} }
}
if (\is_object($zval[self::VALUE])) { if (\is_object($zval[self::VALUE])) {
return true; return true;
...@@ -663,10 +661,6 @@ class PropertyAccessor implements PropertyAccessorInterface ...@@ -663,10 +661,6 @@ class PropertyAccessor implements PropertyAccessorInterface
*/ */
private function isPropertyWritable(object $object, string $property): bool private function isPropertyWritable(object $object, string $property): bool
{ {
if (!\is_object($object)) {
return false;
}
$mutatorForArray = $this->getWriteInfo(\get_class($object), $property, []); $mutatorForArray = $this->getWriteInfo(\get_class($object), $property, []);
if (PropertyWriteInfo::TYPE_NONE !== $mutatorForArray->getType() || ($object instanceof \stdClass && property_exists($object, $property))) { if (PropertyWriteInfo::TYPE_NONE !== $mutatorForArray->getType() || ($object instanceof \stdClass && property_exists($object, $property))) {
......
...@@ -44,6 +44,8 @@ class PropertyAccessorBuilder ...@@ -44,6 +44,8 @@ class PropertyAccessorBuilder
/** /**
* Enables the use of all magic methods by the PropertyAccessor. * Enables the use of all magic methods by the PropertyAccessor.
*
* @return $this
*/ */
public function enableMagicMethods(): self public function enableMagicMethods(): self
{ {
...@@ -54,6 +56,8 @@ class PropertyAccessorBuilder ...@@ -54,6 +56,8 @@ class PropertyAccessorBuilder
/** /**
* Disable the use of all magic methods by the PropertyAccessor. * Disable the use of all magic methods by the PropertyAccessor.
*
* @return $this
*/ */
public function disableMagicMethods(): self public function disableMagicMethods(): self
{ {
...@@ -86,6 +90,8 @@ class PropertyAccessorBuilder ...@@ -86,6 +90,8 @@ class PropertyAccessorBuilder
/** /**
* Enables the use of "__set" by the PropertyAccessor. * Enables the use of "__set" by the PropertyAccessor.
*
* @return $this
*/ */
public function enableMagicSet(): self public function enableMagicSet(): self
{ {
...@@ -108,6 +114,8 @@ class PropertyAccessorBuilder ...@@ -108,6 +114,8 @@ class PropertyAccessorBuilder
/** /**
* Disables the use of "__get" by the PropertyAccessor. * Disables the use of "__get" by the PropertyAccessor.
*
* @return $this
*/ */
public function disableMagicGet(): self public function disableMagicGet(): self
{ {
...@@ -118,6 +126,8 @@ class PropertyAccessorBuilder ...@@ -118,6 +126,8 @@ class PropertyAccessorBuilder
/** /**
* Disables the use of "__set" by the PropertyAccessor. * Disables the use of "__set" by the PropertyAccessor.
*
* @return $this
*/ */
public function disableMagicSet(): self public function disableMagicSet(): self
{ {
...@@ -227,7 +237,7 @@ class PropertyAccessorBuilder ...@@ -227,7 +237,7 @@ class PropertyAccessorBuilder
/** /**
* Sets a cache system. * Sets a cache system.
* *
* @return PropertyAccessorBuilder * @return $this
*/ */
public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null) public function setCacheItemPool(CacheItemPoolInterface $cacheItemPool = null)
{ {
......
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