[更新]ComposerUpdate

This commit is contained in:
Anyon 2018-05-11 09:59:42 +08:00
parent 32ba05e724
commit a5f8c2b95f
9 changed files with 62 additions and 38 deletions

2
vendor/autoload.php vendored
View File

@ -4,4 +4,4 @@
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInit1fdfee53212f11ec783007c682345a6b::getLoader(); return ComposerAutoloaderInita33eeddf73f94e102eeb54914d7e1903::getLoader();

View File

@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer // autoload_real.php @generated by Composer
class ComposerAutoloaderInit1fdfee53212f11ec783007c682345a6b class ComposerAutoloaderInita33eeddf73f94e102eeb54914d7e1903
{ {
private static $loader; private static $loader;
@ -19,15 +19,15 @@ class ComposerAutoloaderInit1fdfee53212f11ec783007c682345a6b
return self::$loader; return self::$loader;
} }
spl_autoload_register(array('ComposerAutoloaderInit1fdfee53212f11ec783007c682345a6b', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInita33eeddf73f94e102eeb54914d7e1903', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(); self::$loader = $loader = new \Composer\Autoload\ClassLoader();
spl_autoload_unregister(array('ComposerAutoloaderInit1fdfee53212f11ec783007c682345a6b', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInita33eeddf73f94e102eeb54914d7e1903', '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_once __DIR__ . '/autoload_static.php'; require_once __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInit1fdfee53212f11ec783007c682345a6b::getInitializer($loader)); call_user_func(\Composer\Autoload\ComposerStaticInita33eeddf73f94e102eeb54914d7e1903::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) {
@ -48,19 +48,19 @@ class ComposerAutoloaderInit1fdfee53212f11ec783007c682345a6b
$loader->register(true); $loader->register(true);
if ($useStaticLoader) { if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInit1fdfee53212f11ec783007c682345a6b::$files; $includeFiles = Composer\Autoload\ComposerStaticInita33eeddf73f94e102eeb54914d7e1903::$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) {
composerRequire1fdfee53212f11ec783007c682345a6b($fileIdentifier, $file); composerRequirea33eeddf73f94e102eeb54914d7e1903($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequire1fdfee53212f11ec783007c682345a6b($fileIdentifier, $file) function composerRequirea33eeddf73f94e102eeb54914d7e1903($fileIdentifier, $file)
{ {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file; require $file;

View File

@ -4,7 +4,7 @@
namespace Composer\Autoload; namespace Composer\Autoload;
class ComposerStaticInit1fdfee53212f11ec783007c682345a6b class ComposerStaticInita33eeddf73f94e102eeb54914d7e1903
{ {
public static $files = array ( public static $files = array (
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
@ -276,9 +276,9 @@ class ComposerStaticInit1fdfee53212f11ec783007c682345a6b
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 = ComposerStaticInit1fdfee53212f11ec783007c682345a6b::$prefixLengthsPsr4; $loader->prefixLengthsPsr4 = ComposerStaticInita33eeddf73f94e102eeb54914d7e1903::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit1fdfee53212f11ec783007c682345a6b::$prefixDirsPsr4; $loader->prefixDirsPsr4 = ComposerStaticInita33eeddf73f94e102eeb54914d7e1903::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit1fdfee53212f11ec783007c682345a6b::$classMap; $loader->classMap = ComposerStaticInita33eeddf73f94e102eeb54914d7e1903::$classMap;
}, null, ClassLoader::class); }, null, ClassLoader::class);
} }

View File

@ -80,17 +80,17 @@
}, },
{ {
"name": "zoujingli/wechat-developer", "name": "zoujingli/wechat-developer",
"version": "v1.1.4", "version": "v1.1.5",
"version_normalized": "1.1.4.0", "version_normalized": "1.1.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/zoujingli/WeChatDeveloper.git", "url": "https://github.com/zoujingli/WeChatDeveloper.git",
"reference": "e72fb2f166ee1a3b4889845cd932a1ab9d2005ee" "reference": "4598856a9e19c81f76f7f7076c80acff8dc67644"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://files.phpcomposer.com/files/zoujingli/WeChatDeveloper/e72fb2f166ee1a3b4889845cd932a1ab9d2005ee.zip", "url": "https://files.phpcomposer.com/files/zoujingli/WeChatDeveloper/4598856a9e19c81f76f7f7076c80acff8dc67644.zip",
"reference": "e72fb2f166ee1a3b4889845cd932a1ab9d2005ee", "reference": "4598856a9e19c81f76f7f7076c80acff8dc67644",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -98,7 +98,7 @@
"ext-openssl": "*", "ext-openssl": "*",
"php": ">=5.4" "php": ">=5.4"
}, },
"time": "2018-05-09T05:38:00+00:00", "time": "2018-05-10T10:34:26+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {
@ -431,17 +431,17 @@
}, },
{ {
"name": "qiniu/php-sdk", "name": "qiniu/php-sdk",
"version": "v7.2.4", "version": "v7.2.5",
"version_normalized": "7.2.4.0", "version_normalized": "7.2.5.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/qiniu/php-sdk.git", "url": "https://github.com/qiniu/php-sdk.git",
"reference": "e5605b20aa4cab7d7ad38c2a510e7086d0d85534" "reference": "0a6e6c75cbc0429fac69ba9aaadb1f5d6c676fb0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://files.phpcomposer.com/files/qiniu/php-sdk/e5605b20aa4cab7d7ad38c2a510e7086d0d85534.zip", "url": "https://files.phpcomposer.com/files/qiniu/php-sdk/0a6e6c75cbc0429fac69ba9aaadb1f5d6c676fb0.zip",
"reference": "e5605b20aa4cab7d7ad38c2a510e7086d0d85534", "reference": "0a6e6c75cbc0429fac69ba9aaadb1f5d6c676fb0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -451,7 +451,7 @@
"phpunit/phpunit": "~4.0", "phpunit/phpunit": "~4.0",
"squizlabs/php_codesniffer": "~2.3" "squizlabs/php_codesniffer": "~2.3"
}, },
"time": "2018-05-09T08:33:46+00:00", "time": "2018-05-10T09:26:30+00:00",
"type": "library", "type": "library",
"installation-source": "dist", "installation-source": "dist",
"autoload": { "autoload": {

View File

@ -1,5 +1,8 @@
# Changelog # Changelog
## 7.2.5 (2018-05-10)
* 修复表单上传中多余的参数checkCrc导致的fname错位问题
## 7.2.4 (2018-05-09) ## 7.2.4 (2018-05-09)
### 增加 ### 增加
* 连麦功能 * 连麦功能

View File

@ -3,7 +3,7 @@ namespace Qiniu;
final class Config final class Config
{ {
const SDK_VER = '7.2.4'; const SDK_VER = '7.2.5';
const BLOCK_SIZE = 4194304; //4*1024*1024 分块上传块大小,该参数为接口规格,不能修改 const BLOCK_SIZE = 4194304; //4*1024*1024 分块上传块大小,该参数为接口规格,不能修改

View File

@ -108,7 +108,6 @@ final class UploadManager
$this->config, $this->config,
$params, $params,
$mime, $mime,
$checkCrc,
basename($filePath) basename($filePath)
); );
} }

View File

@ -46,15 +46,20 @@ class Media extends BasicWeChat
/** /**
* 获取临时素材 * 获取临时素材
* @param string $media_id * @param string $media_id
* @return bool|string * @param string $outType 返回处理函数
* @return array|string
* @throws Exceptions\LocalCacheException * @throws Exceptions\LocalCacheException
* @throws InvalidResponseException * @throws InvalidResponseException
*/ */
public function get($media_id) public function get($media_id, $outType = null)
{ {
$url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id={$media_id}"; $url = "https://api.weixin.qq.com/cgi-bin/media/get?access_token=ACCESS_TOKEN&media_id={$media_id}";
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());
return Tools::get($url); $result = Tools::get($url);
if (json_decode($result)) {
return Tools::json2arr($result);
}
return is_null($outType) ? $result : $outType($result);
} }
/** /**
@ -124,15 +129,20 @@ class Media extends BasicWeChat
/** /**
* 获取永久素材 * 获取永久素材
* @param string $media_id * @param string $media_id
* @return array * @param null|string $outType 输出类型
* @return array|string
* @throws Exceptions\LocalCacheException * @throws Exceptions\LocalCacheException
* @throws InvalidResponseException * @throws InvalidResponseException
*/ */
public function getMaterial($media_id) public function getMaterial($media_id, $outType = null)
{ {
$url = "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=ACCESS_TOKEN"; $url = "https://api.weixin.qq.com/cgi-bin/material/get_material?access_token=ACCESS_TOKEN";
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());
return $this->httpPostForJson($url, ['media_id' => $media_id]); $result = Tools::post($url, ['media_id' => $media_id]);
if (json_decode($result)) {
return Tools::json2arr($result);
}
return is_null($outType) ? $result : $outType($result);
} }
/** /**

View File

@ -32,17 +32,21 @@ class Qrcode extends BasicWeChat
* @param integer $width 二维码的宽度 * @param integer $width 二维码的宽度
* @param bool $auto_color 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 * @param bool $auto_color 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
* @param array $line_color auto_color false 时生效 * @param array $line_color auto_color false 时生效
* @param null|string $outType 输出类型
* @return array|string * @return array|string
* @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException * @throws \WeChat\Exceptions\LocalCacheException
*/ */
public function createMiniPath($path, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"]) public function createMiniPath($path, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $outType = null)
{ {
$url = 'https://api.weixin.qq.com/wxa/getwxacode?access_token=ACCESS_TOKEN'; $url = 'https://api.weixin.qq.com/wxa/getwxacode?access_token=ACCESS_TOKEN';
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());
$data = ['path' => $path, 'width' => $width, 'auto_color' => $auto_color, 'line_color' => $line_color]; $data = ['path' => $path, 'width' => $width, 'auto_color' => $auto_color, 'line_color' => $line_color];
$result = Tools::post($url, Tools::arr2json($data)); $result = Tools::post($url, Tools::arr2json($data));
return strlen($result) > 256 ? $result : Tools::json2arr($result); if (json_decode($result)) {
return Tools::json2arr($result);
}
return is_null($outType) ? $result : $outType($result);
} }
/** /**
@ -53,17 +57,21 @@ class Qrcode extends BasicWeChat
* @param integer $width 二维码的宽度 * @param integer $width 二维码的宽度
* @param bool $auto_color 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 * @param bool $auto_color 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调
* @param array $line_color auto_color false 时生效 * @param array $line_color auto_color false 时生效
* @param null|string $outType 输出类型
* @return array|string * @return array|string
* @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException * @throws \WeChat\Exceptions\LocalCacheException
*/ */
public function createMiniScene($scene, $page, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"]) public function createMiniScene($scene, $page, $width = 430, $auto_color = false, $line_color = ["r" => "0", "g" => "0", "b" => "0"], $outType = null)
{ {
$url = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN'; $url = 'https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=ACCESS_TOKEN';
$data = ['scene' => $scene, 'width' => $width, 'auto_color' => $auto_color, 'page' => $page, 'line_color' => $line_color]; $data = ['scene' => $scene, 'width' => $width, 'auto_color' => $auto_color, 'page' => $page, 'line_color' => $line_color];
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());
$result = Tools::post($url, Tools::arr2json($data)); $result = Tools::post($url, Tools::arr2json($data));
return strlen($result) > 256 ? $result : Tools::json2arr($result); if (json_decode($result)) {
return Tools::json2arr($result);
}
return is_null($outType) ? $result : $outType($result);
} }
/** /**
@ -71,16 +79,20 @@ class Qrcode extends BasicWeChat
* 接口C适用于需要的码数量较少的业务场景 * 接口C适用于需要的码数量较少的业务场景
* @param string $path 不能为空,最大长度 128 字节 * @param string $path 不能为空,最大长度 128 字节
* @param integer $width 二维码的宽度 * @param integer $width 二维码的宽度
* @param null|string $outType 输出类型
* @return array|string * @return array|string
* @throws \WeChat\Exceptions\InvalidResponseException * @throws \WeChat\Exceptions\InvalidResponseException
* @throws \WeChat\Exceptions\LocalCacheException * @throws \WeChat\Exceptions\LocalCacheException
*/ */
public function createDefault($path, $width = 430) public function createDefault($path, $width = 430, $outType = null)
{ {
$url = 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=ACCESS_TOKEN'; $url = 'https://api.weixin.qq.com/cgi-bin/wxaapp/createwxaqrcode?access_token=ACCESS_TOKEN';
$this->registerApi($url, __FUNCTION__, func_get_args()); $this->registerApi($url, __FUNCTION__, func_get_args());
$result = Tools::post($url, Tools::arr2json(['path' => $path, 'width' => $width])); $result = Tools::post($url, Tools::arr2json(['path' => $path, 'width' => $width]));
return strlen($result) > 256 ? $result : Tools::json2arr($result); if (json_decode($result)) {
return Tools::json2arr($result);
}
return is_null($outType) ? $result : $outType($result);
} }
} }