Commit d2fdbda9 authored by jianghaiming's avatar jianghaiming

update:修改简网超时

parent e57aa42c
<?php <?php
namespace App\Services\user\Weixin\Weixin;
use App\Libraries\Http; namespace App\Services\user\Weixin;
/** /**
* Created by PhpStorm. * Created by PhpStorm.
* User: shixing
* Date: 2018/9/12 * Date: 2018/9/12
* Time: 10:48 * Time: 10:48
*/ */
......
This diff is collapsed.
...@@ -38,7 +38,7 @@ class JwUser ...@@ -38,7 +38,7 @@ class JwUser
$params = ["mobilePhone" => $params['mobile']]; $params = ["mobilePhone" => $params['mobile']];
$begin = microtime(true); $begin = microtime(true);
$user_info = (new Request())->get($url, $params); $user_info = (new Request())->get($url, $params, 5000);
$end = microtime(true); $end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000; $total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) { if (!empty($user_info['response'])) {
...@@ -71,7 +71,7 @@ class JwUser ...@@ -71,7 +71,7 @@ class JwUser
$params = ["userId" => $params['user_id']]; $params = ["userId" => $params['user_id']];
$begin = microtime(true); $begin = microtime(true);
$user_info = (new Request())->post($url, $params); $user_info = (new Request())->post($url, $params, 5000);
$end = microtime(true); $end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000; $total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) { if (!empty($user_info['response'])) {
...@@ -102,7 +102,7 @@ class JwUser ...@@ -102,7 +102,7 @@ class JwUser
$params = ["userIds" => $params['user_id']]; $params = ["userIds" => $params['user_id']];
$begin = microtime(true); $begin = microtime(true);
$user_info = (new Request())->post($url, $params); $user_info = (new Request())->post($url, $params, 5000);
$end = microtime(true); $end = microtime(true);
$total_time = round(($end - $begin), 4) * 1000; $total_time = round(($end - $begin), 4) * 1000;
if (!empty($user_info['response'])) { if (!empty($user_info['response'])) {
...@@ -133,7 +133,7 @@ class JwUser ...@@ -133,7 +133,7 @@ class JwUser
} }
$params = []; $params = [];
//$city_list = (new TimeOut())->runGet($url, $params); //$city_list = (new TimeOut())->runGet($url, $params);
$city_list = (new Request())->get($url, $params); $city_list = (new Request())->get($url, $params, 5000);
FileLog::info('jw_user_getAllCityTree', json_encode($city_list)); FileLog::info('jw_user_getAllCityTree', json_encode($city_list));
if (!$city_list) { if (!$city_list) {
throw new CodeSpecialException("timeout"); throw new CodeSpecialException("timeout");
......
...@@ -180,4 +180,61 @@ class Ks3Api ...@@ -180,4 +180,61 @@ class Ks3Api
list($msec, $sec) = explode(' ', microtime()); list($msec, $sec) = explode(' ', microtime());
return (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000); return (float)sprintf('%.0f', (floatval($msec) + floatval($sec)) * 1000);
} }
/**
* 批量获取图片
* @param $imageIds image_id 数组
* @param int $widthSize
* @param int $highSize
* @param float|int $expirationTime
* @return array
*/
public static function concurrencyPicEncryptUrl($imageIds, $widthSize = 0, $highSize = 0, $expirationTime = 60 * 60 * 24 * 365)
{
$url = self::BASE_GEN_URL . self::PATH_PIC_ENCRYPT_URL;
$timestamp = self::msectime();
$extend = [];
$extend["expiration_time"] = $expirationTime;
if (!empty($widthSize) && !empty($highSize)) {
$extend["query"] = "type=thumbnail_" . $widthSize . "x" . $highSize;
}
$extendJsonStr = json_encode($extend);
$params = [];
$urls = [];
foreach ($imageIds as $imageId) {
$md5Str = $extendJsonStr . "&" . $imageId . "&" . self::AUDIT_ID . "&" . $timestamp . "&" . self::KSYUN_SK;
$signature = self::KSYUN_AK . ":" . md5($md5Str);
$contentType = 'multipart/form-data';
$param = [
"image_id" => $imageId,
"auth_id" => self::AUDIT_ID,
"timestamp" => $timestamp,
"signature" => $signature,
"content_type" => $contentType,
"extend" => $extendJsonStr,
];
$params[$imageId] = $param;
$urls[$imageId] = $url;
}
$data = [];
if (!empty($urls)) {
$begin = microtime(true);
$encryptRes = HttpUtil::concurrencyPost($urls, $params);
$end = microtime(true);
$totalTime = round(($end - $begin), 4) * 1000;
$resCode = $encryptRes["response"]['code'] === 0 ? 200 : $encryptRes["response"]['code'];
MonUtil::proxyMon($url, $resCode, 'ks3api', $totalTime);
if (!empty($encryptRes)) {
foreach ($encryptRes as $imageId => $item) {
if (!empty($item["response"]["data"]["url"])) {
$data[$imageId] = $item["response"]["data"]["url"];
}
}
}
}
return $data;
}
} }
\ No newline at end of file
...@@ -4,4 +4,4 @@ ...@@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit147d97defc074a277015f080b27e01c6::getLoader(); return ComposerAutoloaderInite9c1cf708c572b30ccbaa1adb865583e::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 true|null True if loaded, null otherwise * @return bool|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
...@@ -347,8 +347,6 @@ class ClassLoader ...@@ -347,8 +347,6 @@ class ClassLoader
return true; return true;
} }
return null;
} }
/** /**
......
This diff is collapsed.
...@@ -165,6 +165,7 @@ return array( ...@@ -165,6 +165,7 @@ return array(
'App\\Services\\tcc\\TccService' => $baseDir . '/application/services/tcc/TccService.php', 'App\\Services\\tcc\\TccService' => $baseDir . '/application/services/tcc/TccService.php',
'App\\Services\\user\\UserService' => $baseDir . '/application/services/user/UserService.php', 'App\\Services\\user\\UserService' => $baseDir . '/application/services/user/UserService.php',
'App\\Services\\user\\Weixin\\ErrorCode' => $baseDir . '/application/services/user/Weixin/ErrorCode.php', 'App\\Services\\user\\Weixin\\ErrorCode' => $baseDir . '/application/services/user/Weixin/ErrorCode.php',
'App\\Services\\user\\Weixin\\Weixin' => $baseDir . '/application/services/user/Weixin/Weixin.php',
'App\\Services\\user\\Weixin\\WxBizDataCrypt' => $baseDir . '/application/services/user/Weixin/WxBizDataCrypt.php', 'App\\Services\\user\\Weixin\\WxBizDataCrypt' => $baseDir . '/application/services/user/Weixin/WxBizDataCrypt.php',
'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', 'Attribute' => $vendorDir . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'BaconQrCode\\Common\\BitArray' => $vendorDir . '/bacon/bacon-qr-code/src/Common/BitArray.php', 'BaconQrCode\\Common\\BitArray' => $vendorDir . '/bacon/bacon-qr-code/src/Common/BitArray.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',
'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', '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',
'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 ComposerAutoloaderInit147d97defc074a277015f080b27e01c6 class ComposerAutoloaderInite9c1cf708c572b30ccbaa1adb865583e
{ {
private static $loader; private static $loader;
...@@ -24,15 +24,15 @@ class ComposerAutoloaderInit147d97defc074a277015f080b27e01c6 ...@@ -24,15 +24,15 @@ class ComposerAutoloaderInit147d97defc074a277015f080b27e01c6
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInit147d97defc074a277015f080b27e01c6', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInite9c1cf708c572b30ccbaa1adb865583e', '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('ComposerAutoloaderInit147d97defc074a277015f080b27e01c6', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInite9c1cf708c572b30ccbaa1adb865583e', '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\ComposerStaticInit147d97defc074a277015f080b27e01c6::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInite9c1cf708c572b30ccbaa1adb865583e::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 ComposerAutoloaderInit147d97defc074a277015f080b27e01c6 ...@@ -53,19 +53,19 @@ class ComposerAutoloaderInit147d97defc074a277015f080b27e01c6
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit147d97defc074a277015f080b27e01c6::$files; $includeFiles = Composer\Autoload\ComposerStaticInite9c1cf708c572b30ccbaa1adb865583e::$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) {
composerRequire147d97defc074a277015f080b27e01c6($fileIdentifier, $file); composerRequiree9c1cf708c572b30ccbaa1adb865583e($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequire147d97defc074a277015f080b27e01c6($fileIdentifier, $file) function composerRequiree9c1cf708c572b30ccbaa1adb865583e($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 ComposerStaticInit147d97defc074a277015f080b27e01c6 class ComposerStaticInite9c1cf708c572b30ccbaa1adb865583e
{ {
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',
'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', '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',
'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 (
...@@ -394,6 +394,7 @@ class ComposerStaticInit147d97defc074a277015f080b27e01c6 ...@@ -394,6 +394,7 @@ class ComposerStaticInit147d97defc074a277015f080b27e01c6
'App\\Services\\tcc\\TccService' => __DIR__ . '/../..' . '/application/services/tcc/TccService.php', 'App\\Services\\tcc\\TccService' => __DIR__ . '/../..' . '/application/services/tcc/TccService.php',
'App\\Services\\user\\UserService' => __DIR__ . '/../..' . '/application/services/user/UserService.php', 'App\\Services\\user\\UserService' => __DIR__ . '/../..' . '/application/services/user/UserService.php',
'App\\Services\\user\\Weixin\\ErrorCode' => __DIR__ . '/../..' . '/application/services/user/Weixin/ErrorCode.php', 'App\\Services\\user\\Weixin\\ErrorCode' => __DIR__ . '/../..' . '/application/services/user/Weixin/ErrorCode.php',
'App\\Services\\user\\Weixin\\Weixin' => __DIR__ . '/../..' . '/application/services/user/Weixin/Weixin.php',
'App\\Services\\user\\Weixin\\WxBizDataCrypt' => __DIR__ . '/../..' . '/application/services/user/Weixin/WxBizDataCrypt.php', 'App\\Services\\user\\Weixin\\WxBizDataCrypt' => __DIR__ . '/../..' . '/application/services/user/Weixin/WxBizDataCrypt.php',
'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php', 'Attribute' => __DIR__ . '/..' . '/symfony/polyfill-php80/Resources/stubs/Attribute.php',
'BaconQrCode\\Common\\BitArray' => __DIR__ . '/..' . '/bacon/bacon-qr-code/src/Common/BitArray.php', 'BaconQrCode\\Common\\BitArray' => __DIR__ . '/..' . '/bacon/bacon-qr-code/src/Common/BitArray.php',
...@@ -1315,9 +1316,9 @@ class ComposerStaticInit147d97defc074a277015f080b27e01c6 ...@@ -1315,9 +1316,9 @@ class ComposerStaticInit147d97defc074a277015f080b27e01c6
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 = ComposerStaticInit147d97defc074a277015f080b27e01c6::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInite9c1cf708c572b30ccbaa1adb865583e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit147d97defc074a277015f080b27e01c6::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInite9c1cf708c572b30ccbaa1adb865583e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit147d97defc074a277015f080b27e01c6::$classMap; $loader->classMap = ComposerStaticInite9c1cf708c572b30ccbaa1adb865583e::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }
......
This diff is collapsed.
This diff is collapsed.
...@@ -25,13 +25,13 @@ final class Ctype ...@@ -25,13 +25,13 @@ final class Ctype
* *
* @see https://php.net/ctype-alnum * @see https://php.net/ctype-alnum
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_alnum($text) public static function ctype_alnum($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z0-9]/', $text);
} }
...@@ -41,13 +41,13 @@ final class Ctype ...@@ -41,13 +41,13 @@ final class Ctype
* *
* @see https://php.net/ctype-alpha * @see https://php.net/ctype-alpha
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_alpha($text) public static function ctype_alpha($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^A-Za-z]/', $text);
} }
...@@ -57,13 +57,13 @@ final class Ctype ...@@ -57,13 +57,13 @@ final class Ctype
* *
* @see https://php.net/ctype-cntrl * @see https://php.net/ctype-cntrl
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_cntrl($text) public static function ctype_cntrl($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^\x00-\x1f\x7f]/', $text);
} }
...@@ -73,13 +73,13 @@ final class Ctype ...@@ -73,13 +73,13 @@ final class Ctype
* *
* @see https://php.net/ctype-digit * @see https://php.net/ctype-digit
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_digit($text) public static function ctype_digit($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^0-9]/', $text);
} }
...@@ -89,13 +89,13 @@ final class Ctype ...@@ -89,13 +89,13 @@ final class Ctype
* *
* @see https://php.net/ctype-graph * @see https://php.net/ctype-graph
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_graph($text) public static function ctype_graph($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^!-~]/', $text);
} }
...@@ -105,13 +105,13 @@ final class Ctype ...@@ -105,13 +105,13 @@ final class Ctype
* *
* @see https://php.net/ctype-lower * @see https://php.net/ctype-lower
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_lower($text) public static function ctype_lower($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^a-z]/', $text);
} }
...@@ -121,13 +121,13 @@ final class Ctype ...@@ -121,13 +121,13 @@ final class Ctype
* *
* @see https://php.net/ctype-print * @see https://php.net/ctype-print
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_print($text) public static function ctype_print($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^ -~]/', $text);
} }
...@@ -137,13 +137,13 @@ final class Ctype ...@@ -137,13 +137,13 @@ final class Ctype
* *
* @see https://php.net/ctype-punct * @see https://php.net/ctype-punct
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_punct($text) public static function ctype_punct($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^!-\/\:-@\[-`\{-~]/', $text);
} }
...@@ -153,13 +153,13 @@ final class Ctype ...@@ -153,13 +153,13 @@ final class Ctype
* *
* @see https://php.net/ctype-space * @see https://php.net/ctype-space
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_space($text) public static function ctype_space($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^\s]/', $text);
} }
...@@ -169,13 +169,13 @@ final class Ctype ...@@ -169,13 +169,13 @@ final class Ctype
* *
* @see https://php.net/ctype-upper * @see https://php.net/ctype-upper
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_upper($text) public static function ctype_upper($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^A-Z]/', $text);
} }
...@@ -185,13 +185,13 @@ final class Ctype ...@@ -185,13 +185,13 @@ final class Ctype
* *
* @see https://php.net/ctype-xdigit * @see https://php.net/ctype-xdigit
* *
* @param string|int $text * @param mixed $text
* *
* @return bool * @return bool
*/ */
public static function ctype_xdigit($text) public static function ctype_xdigit($text)
{ {
$text = self::convert_int_to_char_for_ctype($text); $text = self::convert_int_to_char_for_ctype($text, __FUNCTION__);
return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text); return \is_string($text) && '' !== $text && !preg_match('/[^A-Fa-f0-9]/', $text);
} }
...@@ -204,11 +204,12 @@ final class Ctype ...@@ -204,11 +204,12 @@ final class Ctype
* (negative values have 256 added in order to allow characters in the Extended ASCII range). * (negative values have 256 added in order to allow characters in the Extended ASCII range).
* Any other integer is interpreted as a string containing the decimal digits of the integer. * Any other integer is interpreted as a string containing the decimal digits of the integer.
* *
* @param string|int $int * @param mixed $int
* @param string $function
* *
* @return mixed * @return mixed
*/ */
private static function convert_int_to_char_for_ctype($int) private static function convert_int_to_char_for_ctype($int, $function)
{ {
if (!\is_int($int)) { if (!\is_int($int)) {
return $int; return $int;
...@@ -218,6 +219,10 @@ final class Ctype ...@@ -218,6 +219,10 @@ final class Ctype
return (string) $int; return (string) $int;
} }
if (\PHP_VERSION_ID >= 80100) {
@trigger_error($function.'(): Argument of type int will be interpreted as string in the future', \E_USER_DEPRECATED);
}
if ($int < 0) { if ($int < 0) {
$int += 256; $int += 256;
} }
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
/* /*
* This file has been auto-generated by the Symfony String Component for internal use. * This file has been auto-generated by the Symfony String Component for internal use.
* *
* Unicode version: 13.0.0 * Unicode version: 14.0.0
* Date: 2020-03-12T08:04:33+00:00 * Date: 2021-09-17T09:20:30+02:00
*/ */
return [ return [
...@@ -450,10 +450,6 @@ return [ ...@@ -450,10 +450,6 @@ return [
], ],
[ [
19968, 19968,
40956,
],
[
40957,
40959, 40959,
], ],
[ [
...@@ -840,13 +836,25 @@ return [ ...@@ -840,13 +836,25 @@ return [
101632, 101632,
101640, 101640,
], ],
[
110576,
110579,
],
[
110581,
110587,
],
[
110589,
110590,
],
[ [
110592, 110592,
110847, 110847,
], ],
[ [
110848, 110848,
110878, 110882,
], ],
[ [
110928, 110928,
...@@ -996,6 +1004,10 @@ return [ ...@@ -996,6 +1004,10 @@ return [
128725, 128725,
128727, 128727,
], ],
[
128733,
128735,
],
[ [
128747, 128747,
128748, 128748,
...@@ -1008,6 +1020,10 @@ return [ ...@@ -1008,6 +1020,10 @@ return [
128992, 128992,
129003, 129003,
], ],
[
129008,
129008,
],
[ [
129292, 129292,
129338, 129338,
...@@ -1018,14 +1034,6 @@ return [ ...@@ -1018,14 +1034,6 @@ return [
], ],
[ [
129351, 129351,
129400,
],
[
129402,
129483,
],
[
129485,
129535, 129535,
], ],
[ [
...@@ -1034,7 +1042,7 @@ return [ ...@@ -1034,7 +1042,7 @@ return [
], ],
[ [
129656, 129656,
129658, 129660,
], ],
[ [
129664, 129664,
...@@ -1042,34 +1050,42 @@ return [ ...@@ -1042,34 +1050,42 @@ return [
], ],
[ [
129680, 129680,
129704, 129708,
], ],
[ [
129712, 129712,
129718, 129722,
], ],
[ [
129728, 129728,
129730, 129733,
], ],
[ [
129744, 129744,
129750, 129753,
],
[
129760,
129767,
],
[
129776,
129782,
], ],
[ [
131072, 131072,
173789, 173791,
], ],
[ [
173790, 173792,
173823, 173823,
], ],
[ [
173824, 173824,
177972, 177976,
], ],
[ [
177973, 177977,
177983, 177983,
], ],
[ [
......
...@@ -3,8 +3,8 @@ ...@@ -3,8 +3,8 @@
/* /*
* This file has been auto-generated by the Symfony String Component for internal use. * This file has been auto-generated by the Symfony String Component for internal use.
* *
* Unicode version: 13.0.0 * Unicode version: 14.0.0
* Date: 2020-03-12T08:04:34+00:00 * Date: 2021-09-17T09:20:30+02:00
*/ */
return [ return [
...@@ -109,7 +109,11 @@ return [ ...@@ -109,7 +109,11 @@ return [
2139, 2139,
], ],
[ [
2259, 2200,
2207,
],
[
2250,
2273, 2273,
], ],
[ [
...@@ -272,6 +276,10 @@ return [ ...@@ -272,6 +276,10 @@ return [
3076, 3076,
3076, 3076,
], ],
[
3132,
3132,
],
[ [
3134, 3134,
3136, 3136,
...@@ -470,7 +478,7 @@ return [ ...@@ -470,7 +478,7 @@ return [
], ],
[ [
5938, 5938,
5940, 5939,
], ],
[ [
5970, 5970,
...@@ -504,6 +512,10 @@ return [ ...@@ -504,6 +512,10 @@ return [
6155, 6155,
6157, 6157,
], ],
[
6159,
6159,
],
[ [
6277, 6277,
6278, 6278,
...@@ -574,7 +586,7 @@ return [ ...@@ -574,7 +586,7 @@ return [
], ],
[ [
6847, 6847,
6848, 6862,
], ],
[ [
6912, 6912,
...@@ -666,10 +678,6 @@ return [ ...@@ -666,10 +678,6 @@ return [
], ],
[ [
7616, 7616,
7673,
],
[
7675,
7679, 7679,
], ],
[ [
...@@ -916,6 +924,10 @@ return [ ...@@ -916,6 +924,10 @@ return [
69446, 69446,
69456, 69456,
], ],
[
69506,
69509,
],
[ [
69633, 69633,
69633, 69633,
...@@ -924,6 +936,14 @@ return [ ...@@ -924,6 +936,14 @@ return [
69688, 69688,
69702, 69702,
], ],
[
69744,
69744,
],
[
69747,
69748,
],
[ [
69759, 69759,
69761, 69761,
...@@ -936,6 +956,10 @@ return [ ...@@ -936,6 +956,10 @@ return [
69817, 69817,
69818, 69818,
], ],
[
69826,
69826,
],
[ [
69888, 69888,
69890, 69890,
...@@ -1252,6 +1276,14 @@ return [ ...@@ -1252,6 +1276,14 @@ return [
113821, 113821,
113822, 113822,
], ],
[
118528,
118573,
],
[
118576,
118598,
],
[ [
119143, 119143,
119145, 119145,
...@@ -1320,6 +1352,10 @@ return [ ...@@ -1320,6 +1352,10 @@ return [
123184, 123184,
123190, 123190,
], ],
[
123566,
123566,
],
[ [
123628, 123628,
123631, 123631,
......
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