Commit bb5b1725 authored by wangdong1's avatar wangdong1

add: composer lock tag

parent 4e36f12b
......@@ -7,8 +7,8 @@
"php": "7.2.*",
"ext-json": "*",
"ext-openssl": "*",
"api/php_services": "dev-master",
"api/php_utils": "dev-master",
"api/php_services": "1.0.1",
"api/php_utils": "1.0.1",
"pingplusplus/pingpp-php": "2.5.0"
},
"minimum-stability": "dev",
......
......@@ -4,7 +4,6 @@
"type": "library",
"require": {
"php": "7.2.*",
"api/php_utils":"dev-master",
"perftools/php-profiler": "^0.18.0",
"endroid/qr-code": "^3.9"
},
......@@ -12,11 +11,5 @@
"psr-4": {
"Api\\PhpServices\\": "src/"
}
},
"repositories": {
"api/php_utils":{
"type":"vcs",
"url":"https://gitlab.yidian-inc.com/bp/php_utils.git"
}
}
}
......@@ -370,7 +370,7 @@ class HttpUtil
{
//过滤无意义的日志
$log = true;
$excludes = config('http_util', 'log.exclude');
$excludes = config('request', 'log.exclude');
if (!empty($excludes)) {
foreach ($excludes as $exclude) {
if (is_array($urls)) {
......
......@@ -2,10 +2,12 @@
namespace Api\PhpUtils\Log;
use Api\PhpUtils\Cache\ApcuUtil;
use Api\PhpUtils\Message\Email;
class FileLog
{
const PREFIX_FILELOG_ERROR = 'flerr:';
/**
* 用于记录info级别的错误
* 会记录请求上下文,不会发生报警邮件
......@@ -57,21 +59,33 @@ class FileLog
}
$log .= ' [exception info: ]' . $exception_info;
error_log($log);
if (!empty($mail_to)) {
$subject = 'App api #' . $signature . '# ' . $_SERVER['SERVER_NAME'] . ' (' . $_SERVER['SERVER_ADDR'] . ') Alert Message';
$body = 'Error: ' . $signature . "\n\n";
$body .= 'Detail info: ' . $detail_info . "\n\n";
$body .= 'Exception info: ' . $exception_info . "\n\n";
$body .= 'Request info: ' . self::accessLog() . "\n\n";
$body .= 'Machine: ' . gethostname();
if (!is_array($mail_to)) {
$mail_to = [$mail_to];
}
if (empty($mail_to)) {
$mail_to = [
'wangdanfeng@yidian-inc.com',
'cuiweifeng@yidian-inc.com',
'luhongguang@yidian-inc.com',
'wangdong1@yidian-inc.com',
'wanjilong@yidian-inc.com',
'jianghaiming@yidian-inc.com',
'songxiaohang@yidian-inc.com',
'genghongfei@yidian-inc.com',
'mengweifu@yidian-inc.com',
'guozhiyuan@yidian-inc.com',
'suntengda@yidian-inc.com'
];
}
$subject = 'App api #' . $signature . '# ' . $_SERVER['SERVER_NAME'] . ' (' . $_SERVER['SERVER_ADDR'] . ') Alert Message';
$body = 'Error: ' . $signature . "\n\n";
$body .= 'Detail info: ' . $detail_info . "\n\n";
$body .= 'Exception info: ' . $exception_info . "\n\n";
$body .= 'Request info: ' . self::accessLog() . "\n\n";
$body .= 'Machine: ' . gethostname();
if (!is_array($mail_to)) {
$mail_to = [$mail_to];
}
if (self::shouldSendEmail(md5($signature)) === true) {
foreach ($mail_to as $mail) {
$key = md5(sprintf("%s,%s", $mail, md5($signature)));
if (self::shouldSendEmail($key) === true) {
Email::sendMail('bp-noreply@yidian-inc.com', $mail, $subject, $body);
}
Email::sendMail('bp-noreply@yidian-inc.com', $mail, $subject, $body);
}
}
}
......@@ -122,10 +136,11 @@ class FileLog
private static function shouldSendEmail($key)
{
$result = true;
// $cache = new CommonCacheUtil(RedisUtil::CODIS_CLUSTER_ACTION);
// if ($cache->add($key, true, 60, CacheUtil::PREFIX_SEND_MAIL) === false) {
// $result = false;
// }
// 每分钟发一条
if (! ApcuUtil::apcu_add_one(self::PREFIX_FILELOG_ERROR, $key, 1, 60)) {
$result = false;
}
return $result;
}
}
......@@ -70,7 +70,7 @@ class MonUtil{
}
//接口返回状态码打点
if(!empty($code) && is_numeric($code)){
if(isset($code) && is_numeric($code)){
$result = self::counting($module . "." . (string)$request_uri, (string)$code,1) . "\n";
}else{
$result = self::counting($module . "." . (string)$request_uri, (string)-999,1) . "\n";
......
......@@ -1077,7 +1077,7 @@ class Medoo
$optimizer = '';
if(is_null($options)) {
// 默认1秒钟超时时间
$optimizer = ' /*+ max_execution_time(1000)*/ ';
$optimizer = ' /*+ max_execution_time(3000)*/ ';
}elseif(isset($options['max_execution_time'])) {
$ts = intval($options['max_execution_time']);
$optimizer = ' /*+ max_execution_time('. $ts .')*/ ';
......
......@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit449f7c51756999ca9c3a3daf8077484c::getLoader();
return ComposerAutoloaderInitf645053a764a0f2105ae2a0161741d9c::getLoader();
......@@ -8,18 +8,18 @@ $baseDir = dirname($vendorDir);
return array(
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => $vendorDir . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => $vendorDir . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => $vendorDir . '/symfony/polyfill-ctype/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'ad155f8f1cf0d418fe49e248db8c661b' => $vendorDir . '/react/promise/src/functions_include.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => $vendorDir . '/symfony/string/Resources/functions.php',
'c964ee0ededf28c96ebd9db5099ef910' => $vendorDir . '/guzzlehttp/promises/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => $vendorDir . '/guzzlehttp/psr7/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => $vendorDir . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'3a37ebac017bc098e9a86b35401e7a68' => $vendorDir . '/mongodb/mongodb/src/functions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => $vendorDir . '/elasticsearch/elasticsearch/src/autoload.php',
);
......@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInit449f7c51756999ca9c3a3daf8077484c
class ComposerAutoloaderInitf645053a764a0f2105ae2a0161741d9c
{
private static $loader;
......@@ -24,15 +24,15 @@ class ComposerAutoloaderInit449f7c51756999ca9c3a3daf8077484c
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit449f7c51756999ca9c3a3daf8077484c', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitf645053a764a0f2105ae2a0161741d9c', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInit449f7c51756999ca9c3a3daf8077484c', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf645053a764a0f2105ae2a0161741d9c', 'loadClassLoader'));
$useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit449f7c51756999ca9c3a3daf8077484c::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitf645053a764a0f2105ae2a0161741d9c::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
......@@ -53,19 +53,19 @@ class ComposerAutoloaderInit449f7c51756999ca9c3a3daf8077484c
$loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit449f7c51756999ca9c3a3daf8077484c::$files;
$includeFiles = Composer\Autoload\ComposerStaticInitf645053a764a0f2105ae2a0161741d9c::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequire449f7c51756999ca9c3a3daf8077484c($fileIdentifier, $file);
composerRequiref645053a764a0f2105ae2a0161741d9c($fileIdentifier, $file);
}
return $loader;
}
}
function composerRequire449f7c51756999ca9c3a3daf8077484c($fileIdentifier, $file)
function composerRequiref645053a764a0f2105ae2a0161741d9c($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
......
......@@ -4,25 +4,25 @@
namespace Composer\Autoload;
class ComposerStaticInit449f7c51756999ca9c3a3daf8077484c
class ComposerStaticInitf645053a764a0f2105ae2a0161741d9c
{
public static $files = array (
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'e69f7f6ee287b969198c3c9d6777bd38' => __DIR__ . '/..' . '/symfony/polyfill-intl-normalizer/bootstrap.php',
'8825ede83f2f289127722d4e842cf7e8' => __DIR__ . '/..' . '/symfony/polyfill-intl-grapheme/bootstrap.php',
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'ad155f8f1cf0d418fe49e248db8c661b' => __DIR__ . '/..' . '/react/promise/src/functions_include.php',
'b6b991a57620e2fb6b2f66f03fe9ddc2' => __DIR__ . '/..' . '/symfony/string/Resources/functions.php',
'c964ee0ededf28c96ebd9db5099ef910' => __DIR__ . '/..' . '/guzzlehttp/promises/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'a0edc8309cc5e1d60e3047b5df6b7052' => __DIR__ . '/..' . '/guzzlehttp/psr7/src/functions_include.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'a9ed0d27b5a698798a89181429f162c5' => __DIR__ . '/..' . '/khanamiryan/qrcode-detector-decoder/lib/Common/customFunctions.php',
'3a37ebac017bc098e9a86b35401e7a68' => __DIR__ . '/..' . '/mongodb/mongodb/src/functions.php',
'8592c7b0947d8a0965a9e8c3d16f9c24' => __DIR__ . '/..' . '/elasticsearch/elasticsearch/src/autoload.php',
);
public static $prefixLengthsPsr4 = array (
......@@ -1312,9 +1312,9 @@ class ComposerStaticInit449f7c51756999ca9c3a3daf8077484c
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInit449f7c51756999ca9c3a3daf8077484c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit449f7c51756999ca9c3a3daf8077484c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit449f7c51756999ca9c3a3daf8077484c::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitf645053a764a0f2105ae2a0161741d9c::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf645053a764a0f2105ae2a0161741d9c::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf645053a764a0f2105ae2a0161741d9c::$classMap;
}, null, ClassLoader::class);
}
......
This diff is collapsed.
<?php return array(
'root' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '4344b1a08092f0c211fa8f5d43917b561a12a704',
'reference' => '4e36f12bd47dd99fb0be8c36b6cd7beb31d36efd',
'name' => 'bp/pay',
'dev' => true,
),
'versions' => array(
'api/php_services' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'pretty_version' => 'v1.0.1',
'version' => '1.0.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_services',
'aliases' => array(
0 => '9999999-dev',
),
'reference' => '2a29f932b1ad8c1d5af3ca94269db3c04f794606',
'aliases' => array(),
'reference' => 'ab75ba5d34e8ee22e8628234a45de8a0dee0a51c',
'dev_requirement' => false,
),
'api/php_utils' => array(
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'pretty_version' => 'v1.0.1',
'version' => '1.0.1.0',
'type' => 'library',
'install_path' => __DIR__ . '/../api/php_utils',
'aliases' => array(
0 => '9999999-dev',
),
'reference' => '5409e99a7ab318bc7fe3cf8b8495f13527f8a6c7',
'aliases' => array(),
'reference' => '26abffd9afc5b90b7f42f10cf21813bbc3dd4f2d',
'dev_requirement' => false,
),
'bacon/bacon-qr-code' => array(
......@@ -42,12 +38,12 @@
'dev_requirement' => false,
),
'bp/pay' => array(
'pretty_version' => 'dev-develop',
'version' => 'dev-develop',
'pretty_version' => 'dev-master',
'version' => 'dev-master',
'type' => 'project',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
'reference' => '4344b1a08092f0c211fa8f5d43917b561a12a704',
'reference' => '4e36f12bd47dd99fb0be8c36b6cd7beb31d36efd',
'dev_requirement' => false,
),
'dasprid/enum' => array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment