升级框架核心,新增注册发帖评论配置
This commit is contained in:
parent
040f6eece8
commit
0b79c6d52c
@ -7,8 +7,8 @@
|
||||
* 后台:http://adm.aieok.com:888
|
||||
* 账号:test
|
||||
* 密码:test123
|
||||
* 版本:TaoLer 1.7.28
|
||||
* 日期:2021.8.03
|
||||
* 版本:TaoLer 1.8.1
|
||||
* 日期:2021.8.4
|
||||
|
||||
#### 项目地址
|
||||
|
||||
|
@ -2,13 +2,14 @@
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\controller\AdminController;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\View;
|
||||
use think\facade\Request;
|
||||
use think\facade\Db;
|
||||
use think\facade\Cache;
|
||||
use think\facade\Config;
|
||||
use app\admin\model\System;
|
||||
use app\admin\model\MailServer;
|
||||
use think\facade\Config;
|
||||
use think\exception\ValidateException;
|
||||
use taoler\com\Files;
|
||||
use taoler\com\Api;
|
||||
use app\common\lib\SetConf;
|
||||
@ -25,7 +26,8 @@ class Set extends AdminController
|
||||
{
|
||||
$mailserver = MailServer::find(1);
|
||||
$template = Files::getDirName('../view');
|
||||
View::assign(['sysInfo'=>$this->sysInfo,'mailserver'=>$mailserver,'template'=>$template]);
|
||||
$email = Db::name('admin')->where('id',1)->value('email');
|
||||
View::assign(['sysInfo'=>$this->sysInfo,'mailserver'=>$mailserver,'template'=>$template,'email'=>$email]);
|
||||
return View::fetch('set/system/website');
|
||||
}
|
||||
|
||||
@ -67,6 +69,42 @@ class Set extends AdminController
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function sendMailCode()
|
||||
{
|
||||
if(Request::isPost()){
|
||||
$email = Request::param('email');
|
||||
$code = mt_rand('1111','9999');
|
||||
Cache::set('test_code',$code,600);
|
||||
$result = mailto($email,'邮箱服务配置','Hi亲爱的管理员:</br>您正在配置您站点的邮箱服务,配置成功后,可以收到来自网站的发帖,评论等即时信息。请在10分钟内把激活码填入激活码框内,您的激活码为:'.$code);
|
||||
if($result){
|
||||
$res = ['code'=>0,'msg'=>'请去邮箱获取测试码'];
|
||||
}else{
|
||||
$res = ['code'=>-1,'msg'=>'邮箱配置错误或无服务能力,请排查!'];
|
||||
}
|
||||
}
|
||||
return json($res);
|
||||
}
|
||||
|
||||
public function activeMailServer()
|
||||
{
|
||||
if(Request::isPost()){
|
||||
$eCode = Request::param('code');
|
||||
$sCode = Cache::get('test_code');
|
||||
if($eCode == $sCode){
|
||||
$result = Db::name('mail_server')->update(['id'=>1,'active'=>1]);
|
||||
if($result){
|
||||
$res = ['code'=>0,'msg'=>'邮箱服务激活成功'];
|
||||
} else {
|
||||
$res = ['code'=>-1,'msg'=>'激活服务出错!'];
|
||||
}
|
||||
}else{
|
||||
$res = ['code'=>-1,'msg'=>'激活码错误!!!'];
|
||||
}
|
||||
}
|
||||
return json($res);
|
||||
}
|
||||
|
||||
/**配置设置
|
||||
* parem $id
|
||||
*/
|
||||
@ -75,6 +113,9 @@ class Set extends AdminController
|
||||
$conf = Config::get('taoler.config');
|
||||
if(Request::isPost()){
|
||||
$data = Request::param();
|
||||
if(!isset($data['regist_check'])) $data['regist_check'] =1;
|
||||
if(!isset($data['posts_check'])) $data['posts_check'] =1;
|
||||
if(!isset($data['commnets_check'])) $data['commnets_check'] =1;
|
||||
foreach($conf as $c=>$f){
|
||||
|
||||
if(array_key_exists($c,$data)){
|
||||
|
@ -169,15 +169,57 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{//邮箱发送测试}
|
||||
<div class="layui-form" wid100 >
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">测试邮箱</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="email" value="{$email}" lay-verify="email" class="layui-input">
|
||||
</div>
|
||||
<button class="layui-btn" lay-submit lay-filter="test_system_email">发送测试码</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form" wid100>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">输入测试码</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="code" value="" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<button class="layui-btn" lay-submit lay-filter="active_system_email">确认激活</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-tab-item">
|
||||
<div class="layui-form" wid100 lay-filter="config">
|
||||
{if($mailserver.active == 1)}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">邮件通知:</label>
|
||||
<div class="layui-input-inline" style="width: 30px;">
|
||||
<input type="checkbox" name="email_notice" lay-skin="primary" value=1 {if config('taoler.config.email_notice') == 1} checked {/if}>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">是否显示发帖及评论等邮件提醒(需先配置邮箱服务)</div>
|
||||
<div class="layui-form-mid layui-word-aux">发帖及评论等邮件提醒(邮箱服务未激活无法设置)</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">注册审核:</label>
|
||||
<div class="layui-input-inline" style="width: 30px;">
|
||||
<input type="checkbox" name="regist_check" lay-skin="primary" value=0 {if config('taoler.config.regist_check') == 0} checked {/if}>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">注册是否需要审核</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">发帖审核:</label>
|
||||
<div class="layui-input-inline" style="width: 30px;">
|
||||
<input type="checkbox" name="posts_check" lay-skin="primary" value=0 {if config('taoler.config.posts_check') == 0} checked {/if}>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">发帖是否需要审核</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">评论审核:</label>
|
||||
<div class="layui-input-inline" style="width: 30px;">
|
||||
<input type="checkbox" name="commnets_check" lay-skin="primary" value=0 {if config('taoler.config.commnets_check') == 0} checked {/if}>
|
||||
</div>
|
||||
<div class="layui-form-mid layui-word-aux">评论是否需要审核</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">分类显示:</label>
|
||||
@ -252,24 +294,48 @@
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//网站配置
|
||||
form.on('submit(set_system_config)', function(data){
|
||||
var field = data.field;
|
||||
$.post("{:url('admin/set/config')}",field,function(res){
|
||||
if(res.code == 0){
|
||||
layer.msg(res.msg,{
|
||||
icon:6,
|
||||
tiye:2000
|
||||
layer.msg(res.msg,{icon:6,tiye:2000
|
||||
},function(){
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.open({
|
||||
title:"设置失败",
|
||||
content:res.msg,
|
||||
icon:5,
|
||||
anim:6
|
||||
layer.open({title:"设置失败",content:res.msg,icon:5,anim:6});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
//邮箱发送测试码
|
||||
form.on('submit(test_system_email)', function(data){
|
||||
var field = data.field;
|
||||
$.post("{:url('admin/set/sendMailCode')}",field,function(res){
|
||||
if(res.code == 0){
|
||||
layer.msg(res.msg,{icon:6,tiye:2000
|
||||
},function(){
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.open({title:"设置失败",content:res.msg,icon:5,anim:6});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//邮箱激活
|
||||
form.on('submit(active_system_email)', function(data){
|
||||
var field = data.field;
|
||||
$.post("{:url('admin/set/activeMailServer')}",field,function(res){
|
||||
if(res.code == 0){
|
||||
layer.msg(res.msg,{icon:6,tiye:2000
|
||||
},function(){
|
||||
location.reload();
|
||||
});
|
||||
} else {
|
||||
layer.open({title:"设置失败",content:res.msg,icon:5,anim:6});
|
||||
}
|
||||
});
|
||||
return false;
|
||||
|
@ -6,6 +6,7 @@ namespace app\common\model;
|
||||
use think\Model;
|
||||
use think\model\concern\SoftDelete;
|
||||
use think\facade\Cache;
|
||||
use think\facade\Config;
|
||||
|
||||
class Article extends Model
|
||||
{
|
||||
@ -56,10 +57,11 @@ class Article extends Model
|
||||
*/
|
||||
public function add(array $data)
|
||||
{
|
||||
$data['status'] = Config::get('taoler.config.posts_check');
|
||||
$msg = $data['status'] ? '发布成功' : '发布成功,请等待审核';
|
||||
$result = $this->save($data);
|
||||
|
||||
if($result) {
|
||||
return 1;
|
||||
return ['code'=>1,'msg'=>$msg];
|
||||
} else {
|
||||
return 'add_error';
|
||||
}
|
||||
|
@ -111,9 +111,11 @@ class User extends Model
|
||||
$data['create_time'] = time();
|
||||
$salt = substr(md5($data['create_time']),-6);
|
||||
$data['password'] = substr_replace(md5($data['password']),$salt,0,6);
|
||||
$data['status'] = Config::get('taoler.config.regist_check');
|
||||
$msg = $data['status'] ? '注册成功请登录' : '注册成功,请等待审核';
|
||||
$result = $this->save($data);
|
||||
if ($result) {
|
||||
return 1;
|
||||
return ['code'=>1,'msg'=>$msg];
|
||||
} else{
|
||||
return '注册失败';
|
||||
}
|
||||
|
@ -119,6 +119,8 @@ class Article extends BaseController
|
||||
if(empty($data['content'])){
|
||||
return json(['code'=>0, 'msg'=>'评论不能为空!']);
|
||||
}
|
||||
$data['status'] = Config::get('taoler.config.commnets_check');
|
||||
$msg = $data['status'] ? '留言成功' : '留言成功,请等待审核';
|
||||
|
||||
//用户留言存入数据库
|
||||
if (Comment::create($data)) {
|
||||
@ -138,7 +140,7 @@ class Article extends BaseController
|
||||
$data = ['title'=>$title,'content'=>'评论通知','link'=>$link,'user_id'=>$sendId,'type'=>2]; //type=2为评论留言
|
||||
Message::sendMsg($sendId,$receveId,$data);
|
||||
if(Config::get('taoler.config.email_notice')) mailto($this->showUser(1)['email'],'评论审核通知','Hi亲爱的管理员:</br>用户'.$this->showUser($this->uid)['name'].'刚刚对 <b>'.$title.'</b> 发表了评论,请尽快处理。');
|
||||
$res = ['code'=>0, 'msg'=>'留言成功'];
|
||||
$res = ['code'=>0, 'msg'=>$msg];
|
||||
} else {
|
||||
$res = ['code'=>-1, 'msg'=>'留言失败'];
|
||||
}
|
||||
@ -166,13 +168,17 @@ class Article extends BaseController
|
||||
|
||||
$article = new ArticleModel();
|
||||
$result = $article->add($data);
|
||||
if ($result == 1) {
|
||||
if ($result['code'] == 1) {
|
||||
if(Config::get('taoler.config.posts_check')){
|
||||
$aid = Db::name('article')->max('id');
|
||||
$link = (string)url('article/detail', ['id' => $aid]);
|
||||
}else{
|
||||
$link = (string)url('index/');
|
||||
}
|
||||
//清除文章tag缓存
|
||||
Cache::tag('tagArtDetail')->clear();
|
||||
if(Config::get('taoler.config.email_notice')) mailto($this->showUser(1)['email'],'发帖审核通知','Hi亲爱的管理员:</br>用户'.$this->showUser($this->uid)['name'].'刚刚发表了 <b>'.$data['title'].'</b> 新的帖子,请尽快处理。');
|
||||
$res = Msgres::success('add_success', $link);
|
||||
$res = Msgres::success($result['msg'], $link);
|
||||
} else {
|
||||
$res = Msgres::error('add_error');
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ class Login extends BaseController
|
||||
$user = new User();
|
||||
$result = $user->reg($data);
|
||||
|
||||
if ($result == 1) {
|
||||
$res = ['code'=>0,'msg'=>'注册成功','url'=>(string) url('login/index')];
|
||||
if ($result['code'] == 1) {
|
||||
$res = ['code'=>0,'msg'=>$result['msg'],'url'=>(string) url('login/index')];
|
||||
if(Config::get('taoler.config.email_notice')) mailto($this->showUser(1)['email'],'注册新用户通知','Hi亲爱的管理员:</br>新用户 <b>'.$data['name'].'</b> 刚刚注册了新的账号,请尽快处理。');
|
||||
}else {
|
||||
$res = ['code'=>-1,'msg'=>$result];
|
||||
@ -137,7 +137,7 @@ class Login extends BaseController
|
||||
|
||||
$result = mailto($data['email'],'重置密码','Hi亲爱的'.$user['name'].':</br>您正在维护您的信息,请在10分钟内验证,您的验证码为:'.$code);
|
||||
if($result){
|
||||
Cache::set('repass',1,60); //设置repass标志为1存入Cache
|
||||
Cache::set('repass','postcode',60); //设置repass标志为1存入Cache
|
||||
$res = ['code'=>0,'msg'=>'验证码已发送成功,请去邮箱查看!','url'=>(string) url('login/postcode')];
|
||||
} else {
|
||||
$res = ['code'=>-1,'msg'=>'验证码发送失败!'];
|
||||
@ -153,7 +153,7 @@ class Login extends BaseController
|
||||
//接收验证码
|
||||
public function postcode()
|
||||
{
|
||||
if(Cache::get('repass') != 1){
|
||||
if(Cache::get('repass') !== 'postcode'){
|
||||
return redirect((string) url('login/forget'));
|
||||
}
|
||||
if(Request::isAjax()){
|
||||
@ -168,7 +168,7 @@ class Login extends BaseController
|
||||
|
||||
if(Cache::get('code')==$code['code']) { //无任何输入情况下需排除code为0和Cache为0的情况
|
||||
//Cache::delete('repass');
|
||||
Cache::set('repass',2,60);
|
||||
Cache::set('repass','resetpass',60);
|
||||
$res = ['code'=>0,'msg'=>'验证成功','url'=>(string) url('login/respass')];
|
||||
} else {
|
||||
$res = ['code'=>-1,'msg'=>'验证码错误或已过期!'];
|
||||
@ -181,7 +181,7 @@ class Login extends BaseController
|
||||
//忘记密码找回重置
|
||||
public function respass()
|
||||
{
|
||||
if(Cache::get('repass') != 2){
|
||||
if(Cache::get('repass') !== 'resetpass'){
|
||||
return redirect((string) url('login/forget'));
|
||||
}
|
||||
if(Request::isAjax()){
|
||||
|
118
composer.lock
generated
118
composer.lock
generated
@ -8,16 +8,16 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "firebase/php-jwt",
|
||||
"version": "v5.3.0",
|
||||
"version": "v5.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/firebase/php-jwt.git",
|
||||
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1"
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
||||
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -32,6 +32,9 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=4.8 <=9"
|
||||
},
|
||||
"suggest": {
|
||||
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
|
||||
},
|
||||
"type": "library",
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
@ -62,22 +65,22 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/firebase/php-jwt/issues",
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.3.0"
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.4.0"
|
||||
},
|
||||
"time": "2021-05-20T17:37:02+00:00"
|
||||
"time": "2021-06-23T19:00:23+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.1.3",
|
||||
"version": "1.1.4",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
|
||||
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
|
||||
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -99,7 +102,6 @@
|
||||
"phpunit/phpunit": "^8.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
"ext-ftp": "Allows you to use FTP server storage",
|
||||
"ext-openssl": "Allows you to use FTPS server storage",
|
||||
"league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
|
||||
@ -157,7 +159,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.x"
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -165,7 +167,7 @@
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2020-08-23T07:39:11+00:00"
|
||||
"time": "2021-06-23T21:56:05+00:00"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem-cached-adapter",
|
||||
@ -338,16 +340,16 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.4.1",
|
||||
"version": "v6.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
|
||||
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
|
||||
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c",
|
||||
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -408,7 +410,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -416,7 +418,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-04-29T12:25:04+00:00"
|
||||
"time": "2021-06-16T14:33:43+00:00"
|
||||
},
|
||||
{
|
||||
"name": "psr/cache",
|
||||
@ -701,16 +703,16 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/framework",
|
||||
"version": "v6.0.8",
|
||||
"version": "v6.0.9",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/framework.git",
|
||||
"reference": "4789343672aef06d571d556da369c0e156609bce"
|
||||
"reference": "0b5fb453f0e533de3af3a1ab6a202510b61be617"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/framework/zipball/4789343672aef06d571d556da369c0e156609bce",
|
||||
"reference": "4789343672aef06d571d556da369c0e156609bce",
|
||||
"url": "https://api.github.com/repos/top-think/framework/zipball/0b5fb453f0e533de3af3a1ab6a202510b61be617",
|
||||
"reference": "0b5fb453f0e533de3af3a1ab6a202510b61be617",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -722,9 +724,9 @@
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"league/flysystem": "^1.0",
|
||||
"league/flysystem": "^1.1.4",
|
||||
"league/flysystem-cached-adapter": "^1.0",
|
||||
"php": ">=7.1.0",
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "~1.0",
|
||||
"psr/log": "~1.0",
|
||||
"psr/simple-cache": "^1.0",
|
||||
@ -766,9 +768,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/framework/issues",
|
||||
"source": "https://github.com/top-think/framework/tree/v6.0.8"
|
||||
"source": "https://github.com/top-think/framework/tree/v6.0.9"
|
||||
},
|
||||
"time": "2021-04-27T00:41:08+00:00"
|
||||
"time": "2021-07-22T03:24:49+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-captcha",
|
||||
@ -831,16 +833,16 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-helper",
|
||||
"version": "v3.1.4",
|
||||
"version": "v3.1.5",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-helper.git",
|
||||
"reference": "c28d37743bda4a0455286ca85b17b5791d626e10"
|
||||
"reference": "f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10",
|
||||
"reference": "c28d37743bda4a0455286ca85b17b5791d626e10",
|
||||
"url": "https://api.github.com/repos/top-think/think-helper/zipball/f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905",
|
||||
"reference": "f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -874,9 +876,9 @@
|
||||
"description": "The ThinkPHP6 Helper Package",
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-helper/issues",
|
||||
"source": "https://github.com/top-think/think-helper/tree/3.0"
|
||||
"source": "https://github.com/top-think/think-helper/tree/v3.1.5"
|
||||
},
|
||||
"time": "2019-11-08T08:01:10+00:00"
|
||||
"time": "2021-06-21T06:17:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-multi-app",
|
||||
@ -934,16 +936,16 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-orm",
|
||||
"version": "v2.0.40",
|
||||
"version": "v2.0.44",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "1119d979b850849f3725856460cf108eec1c3eb8"
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/1119d979b850849f3725856460cf108eec1c3eb8",
|
||||
"reference": "1119d979b850849f3725856460cf108eec1c3eb8",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -989,9 +991,9 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-orm/issues",
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.40"
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.44"
|
||||
},
|
||||
"time": "2021-04-19T13:29:37+00:00"
|
||||
"time": "2021-07-21T02:22:31+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-template",
|
||||
@ -1204,16 +1206,16 @@
|
||||
"packages-dev": [
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.23.0",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
|
||||
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1270,7 +1272,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1286,7 +1288,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-27T09:27:20+00:00"
|
||||
"time": "2021-05-27T12:26:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
@ -1372,16 +1374,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.23.0",
|
||||
"version": "v1.23.1",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
|
||||
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
|
||||
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1441,7 +1443,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1457,20 +1459,20 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-02-19T12:13:01+00:00"
|
||||
"time": "2021-07-28T13:41:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.25",
|
||||
"version": "v4.4.27",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0"
|
||||
"reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0",
|
||||
"reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/391d6d0e7a06ab54eb7c38fab29b8d174471b3ba",
|
||||
"reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1483,7 +1485,7 @@
|
||||
"php": ">=7.1.3",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php72": "~1.5",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
|
||||
@ -1536,7 +1538,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.25"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.27"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1552,7 +1554,7 @@
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2021-05-27T09:48:32+00:00"
|
||||
"time": "2021-07-23T15:41:52+00:00"
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-trace",
|
||||
|
@ -7,16 +7,19 @@ return [
|
||||
//应用名,此项不可更改
|
||||
'appname' => 'TaoLer',
|
||||
//版本配置
|
||||
'version' => '1.7.28',
|
||||
'version' => '1.8.1',
|
||||
//加盐
|
||||
'salt' => 'taoler',
|
||||
//数据库备份目录
|
||||
'databasebackdir' => app()->getRootPath() .'data/',
|
||||
//配置
|
||||
'config' =>[
|
||||
'email_notice' => 1,
|
||||
'email_notice' => 0,
|
||||
'cate_show' => 0,
|
||||
'area_show' => 0,
|
||||
'regist_check' => 0,
|
||||
'posts_check' => 0,
|
||||
'commnets_check' => 0,
|
||||
|
||||
]
|
||||
|
||||
|
54
vendor/composer/InstalledVersions.php
vendored
54
vendor/composer/InstalledVersions.php
vendored
@ -26,21 +26,21 @@ private static $installed = array (
|
||||
array (
|
||||
'firebase/php-jwt' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.3.0',
|
||||
'version' => '5.3.0.0',
|
||||
'pretty_version' => 'v5.4.0',
|
||||
'version' => '5.4.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '3c2d70f2e64e2922345e89f2ceae47d2463faae1',
|
||||
'reference' => 'd2113d9b2e0e349796e72d2a63cf9319100382d2',
|
||||
),
|
||||
'league/flysystem' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.3',
|
||||
'version' => '1.1.3.0',
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
|
||||
'reference' => 'f3ad69181b8afed2c9edf7be5a2918144ff4ea32',
|
||||
),
|
||||
'league/flysystem-cached-adapter' =>
|
||||
array (
|
||||
@ -71,12 +71,12 @@ private static $installed = array (
|
||||
),
|
||||
'phpmailer/phpmailer' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.4.1',
|
||||
'version' => '6.4.1.0',
|
||||
'pretty_version' => 'v6.5.0',
|
||||
'version' => '6.5.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9256f12d8fb0cd0500f93b19e18c356906cbed3d',
|
||||
'reference' => 'a5b5c43e50b7fba655f793ad27303cd74c57363c',
|
||||
),
|
||||
'psr/cache' =>
|
||||
array (
|
||||
@ -116,12 +116,12 @@ private static $installed = array (
|
||||
),
|
||||
'symfony/polyfill-mbstring' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '2df51500adbaebdc4c38dea4c89a2e131c45c8a1',
|
||||
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
|
||||
),
|
||||
'symfony/polyfill-php72' =>
|
||||
array (
|
||||
@ -134,21 +134,21 @@ private static $installed = array (
|
||||
),
|
||||
'symfony/polyfill-php80' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'eca0bf41ed421bed1b57c4958bab16aa86b757d0',
|
||||
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
|
||||
),
|
||||
'symfony/var-dumper' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.4.25',
|
||||
'version' => '4.4.25.0',
|
||||
'pretty_version' => 'v4.4.27',
|
||||
'version' => '4.4.27.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0',
|
||||
'reference' => '391d6d0e7a06ab54eb7c38fab29b8d174471b3ba',
|
||||
),
|
||||
'taoser/taoler' =>
|
||||
array (
|
||||
@ -170,12 +170,12 @@ private static $installed = array (
|
||||
),
|
||||
'topthink/framework' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.0.8',
|
||||
'version' => '6.0.8.0',
|
||||
'pretty_version' => 'v6.0.9',
|
||||
'version' => '6.0.9.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '4789343672aef06d571d556da369c0e156609bce',
|
||||
'reference' => '0b5fb453f0e533de3af3a1ab6a202510b61be617',
|
||||
),
|
||||
'topthink/think-captcha' =>
|
||||
array (
|
||||
@ -188,12 +188,12 @@ private static $installed = array (
|
||||
),
|
||||
'topthink/think-helper' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.1.4',
|
||||
'version' => '3.1.4.0',
|
||||
'pretty_version' => 'v3.1.5',
|
||||
'version' => '3.1.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
|
||||
'reference' => 'f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905',
|
||||
),
|
||||
'topthink/think-multi-app' =>
|
||||
array (
|
||||
@ -206,12 +206,12 @@ private static $installed = array (
|
||||
),
|
||||
'topthink/think-orm' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.0.40',
|
||||
'version' => '2.0.40.0',
|
||||
'pretty_version' => 'v2.0.44',
|
||||
'version' => '2.0.44.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
|
||||
'reference' => '5d3d5c1ebf8bfccf34bacd90edb42989b16ea409',
|
||||
),
|
||||
'topthink/think-template' =>
|
||||
array (
|
||||
|
146
vendor/composer/installed.json
vendored
146
vendor/composer/installed.json
vendored
@ -2,17 +2,17 @@
|
||||
"packages": [
|
||||
{
|
||||
"name": "firebase/php-jwt",
|
||||
"version": "v5.3.0",
|
||||
"version_normalized": "5.3.0.0",
|
||||
"version": "v5.4.0",
|
||||
"version_normalized": "5.4.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/firebase/php-jwt.git",
|
||||
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1"
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
||||
"reference": "3c2d70f2e64e2922345e89f2ceae47d2463faae1",
|
||||
"url": "https://api.github.com/repos/firebase/php-jwt/zipball/d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"reference": "d2113d9b2e0e349796e72d2a63cf9319100382d2",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -27,7 +27,10 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": ">=4.8 <=9"
|
||||
},
|
||||
"time": "2021-05-20T17:37:02+00:00",
|
||||
"suggest": {
|
||||
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
|
||||
},
|
||||
"time": "2021-06-23T19:00:23+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -59,23 +62,23 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/firebase/php-jwt/issues",
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.3.0"
|
||||
"source": "https://github.com/firebase/php-jwt/tree/v5.4.0"
|
||||
},
|
||||
"install-path": "../firebase/php-jwt"
|
||||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.1.3",
|
||||
"version_normalized": "1.1.3.0",
|
||||
"version": "1.1.4",
|
||||
"version_normalized": "1.1.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a"
|
||||
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"reference": "9be3b16c877d477357c015cec057548cf9b2a14a",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
|
||||
"reference": "f3ad69181b8afed2c9edf7be5a2918144ff4ea32",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -97,7 +100,6 @@
|
||||
"phpunit/phpunit": "^8.5.8"
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
"ext-ftp": "Allows you to use FTP server storage",
|
||||
"ext-openssl": "Allows you to use FTPS server storage",
|
||||
"league/flysystem-aws-s3-v2": "Allows you to use S3 storage with AWS SDK v2",
|
||||
@ -112,7 +114,7 @@
|
||||
"spatie/flysystem-dropbox": "Allows you to use Dropbox storage",
|
||||
"srmklive/flysystem-dropbox-v2": "Allows you to use Dropbox storage for PHP 5 applications"
|
||||
},
|
||||
"time": "2020-08-23T07:39:11+00:00",
|
||||
"time": "2021-06-23T21:56:05+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -155,6 +157,16 @@
|
||||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/flysystem/issues",
|
||||
"source": "https://github.com/thephpleague/flysystem/tree/1.1.4"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://offset.earth/frankdejonge",
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"install-path": "../league/flysystem"
|
||||
},
|
||||
{
|
||||
@ -333,17 +345,17 @@
|
||||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.4.1",
|
||||
"version_normalized": "6.4.1.0",
|
||||
"version": "v6.5.0",
|
||||
"version_normalized": "6.5.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d"
|
||||
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/9256f12d8fb0cd0500f93b19e18c356906cbed3d",
|
||||
"reference": "9256f12d8fb0cd0500f93b19e18c356906cbed3d",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/a5b5c43e50b7fba655f793ad27303cd74c57363c",
|
||||
"reference": "a5b5c43e50b7fba655f793ad27303cd74c57363c",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -374,7 +386,7 @@
|
||||
"stevenmaguire/oauth2-microsoft": "Needed for Microsoft XOAUTH2 authentication",
|
||||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)"
|
||||
},
|
||||
"time": "2021-04-29T12:25:04+00:00",
|
||||
"time": "2021-06-16T14:33:43+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -406,7 +418,7 @@
|
||||
"description": "PHPMailer is a full-featured email creation and transfer class for PHP",
|
||||
"support": {
|
||||
"issues": "https://github.com/PHPMailer/PHPMailer/issues",
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.4.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.5.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -646,17 +658,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.23.0",
|
||||
"version_normalized": "1.23.0.0",
|
||||
"version": "v1.23.1",
|
||||
"version_normalized": "1.23.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1"
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
|
||||
"reference": "2df51500adbaebdc4c38dea4c89a2e131c45c8a1",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"reference": "9174a3d80210dca8daa7f31fec659150bbeabfc6",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -671,7 +683,7 @@
|
||||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"time": "2021-05-27T09:27:20+00:00",
|
||||
"time": "2021-05-27T12:26:48+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -715,7 +727,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.23.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -820,17 +832,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.23.0",
|
||||
"version_normalized": "1.23.0.0",
|
||||
"version": "v1.23.1",
|
||||
"version_normalized": "1.23.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0"
|
||||
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/eca0bf41ed421bed1b57c4958bab16aa86b757d0",
|
||||
"reference": "eca0bf41ed421bed1b57c4958bab16aa86b757d0",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||
"reference": "1100343ed1a92e3a38f9ae122fc0eb21602547be",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -842,7 +854,7 @@
|
||||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"time": "2021-02-19T12:13:01+00:00",
|
||||
"time": "2021-07-28T13:41:28+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
@ -892,7 +904,7 @@
|
||||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.0"
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.23.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -912,17 +924,17 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/var-dumper",
|
||||
"version": "v4.4.25",
|
||||
"version_normalized": "4.4.25.0",
|
||||
"version": "v4.4.27",
|
||||
"version_normalized": "4.4.27.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/var-dumper.git",
|
||||
"reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0"
|
||||
"reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0",
|
||||
"reference": "31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0",
|
||||
"url": "https://api.github.com/repos/symfony/var-dumper/zipball/391d6d0e7a06ab54eb7c38fab29b8d174471b3ba",
|
||||
"reference": "391d6d0e7a06ab54eb7c38fab29b8d174471b3ba",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -935,7 +947,7 @@
|
||||
"php": ">=7.1.3",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php72": "~1.5",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"conflict": {
|
||||
"phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
|
||||
@ -952,7 +964,7 @@
|
||||
"ext-intl": "To show region name in time zone dump",
|
||||
"symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
|
||||
},
|
||||
"time": "2021-05-27T09:48:32+00:00",
|
||||
"time": "2021-07-23T15:41:52+00:00",
|
||||
"bin": [
|
||||
"Resources/bin/var-dump-server"
|
||||
],
|
||||
@ -990,7 +1002,7 @@
|
||||
"dump"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.25"
|
||||
"source": "https://github.com/symfony/var-dumper/tree/v4.4.27"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@ -1068,17 +1080,17 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/framework",
|
||||
"version": "v6.0.8",
|
||||
"version_normalized": "6.0.8.0",
|
||||
"version": "v6.0.9",
|
||||
"version_normalized": "6.0.9.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/framework.git",
|
||||
"reference": "4789343672aef06d571d556da369c0e156609bce"
|
||||
"reference": "0b5fb453f0e533de3af3a1ab6a202510b61be617"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/framework/zipball/4789343672aef06d571d556da369c0e156609bce",
|
||||
"reference": "4789343672aef06d571d556da369c0e156609bce",
|
||||
"url": "https://api.github.com/repos/top-think/framework/zipball/0b5fb453f0e533de3af3a1ab6a202510b61be617",
|
||||
"reference": "0b5fb453f0e533de3af3a1ab6a202510b61be617",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1090,9 +1102,9 @@
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"league/flysystem": "^1.0",
|
||||
"league/flysystem": "^1.1.4",
|
||||
"league/flysystem-cached-adapter": "^1.0",
|
||||
"php": ">=7.1.0",
|
||||
"php": ">=7.2.5",
|
||||
"psr/container": "~1.0",
|
||||
"psr/log": "~1.0",
|
||||
"psr/simple-cache": "^1.0",
|
||||
@ -1104,7 +1116,7 @@
|
||||
"mockery/mockery": "^1.2",
|
||||
"phpunit/phpunit": "^7.0"
|
||||
},
|
||||
"time": "2021-04-27T00:41:08+00:00",
|
||||
"time": "2021-07-22T03:24:49+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1136,7 +1148,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/framework/issues",
|
||||
"source": "https://github.com/top-think/framework/tree/v6.0.8"
|
||||
"source": "https://github.com/top-think/framework/tree/v6.0.9"
|
||||
},
|
||||
"install-path": "../topthink/framework"
|
||||
},
|
||||
@ -1200,17 +1212,17 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-helper",
|
||||
"version": "v3.1.4",
|
||||
"version_normalized": "3.1.4.0",
|
||||
"version": "v3.1.5",
|
||||
"version_normalized": "3.1.5.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-helper.git",
|
||||
"reference": "c28d37743bda4a0455286ca85b17b5791d626e10"
|
||||
"reference": "f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-helper/zipball/c28d37743bda4a0455286ca85b17b5791d626e10",
|
||||
"reference": "c28d37743bda4a0455286ca85b17b5791d626e10",
|
||||
"url": "https://api.github.com/repos/top-think/think-helper/zipball/f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905",
|
||||
"reference": "f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1222,7 +1234,7 @@
|
||||
"require": {
|
||||
"php": ">=7.1.0"
|
||||
},
|
||||
"time": "2019-11-08T08:01:10+00:00",
|
||||
"time": "2021-06-21T06:17:31+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1244,6 +1256,10 @@
|
||||
}
|
||||
],
|
||||
"description": "The ThinkPHP6 Helper Package",
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-helper/issues",
|
||||
"source": "https://github.com/top-think/think-helper/tree/v3.1.5"
|
||||
},
|
||||
"install-path": "../topthink/think-helper"
|
||||
},
|
||||
{
|
||||
@ -1301,17 +1317,17 @@
|
||||
},
|
||||
{
|
||||
"name": "topthink/think-orm",
|
||||
"version": "v2.0.40",
|
||||
"version_normalized": "2.0.40.0",
|
||||
"version": "v2.0.44",
|
||||
"version_normalized": "2.0.44.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/top-think/think-orm.git",
|
||||
"reference": "1119d979b850849f3725856460cf108eec1c3eb8"
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/1119d979b850849f3725856460cf108eec1c3eb8",
|
||||
"reference": "1119d979b850849f3725856460cf108eec1c3eb8",
|
||||
"url": "https://api.github.com/repos/top-think/think-orm/zipball/5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"reference": "5d3d5c1ebf8bfccf34bacd90edb42989b16ea409",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
@ -1331,7 +1347,7 @@
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7|^8|^9.5"
|
||||
},
|
||||
"time": "2021-04-19T13:29:37+00:00",
|
||||
"time": "2021-07-21T02:22:31+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
@ -1359,7 +1375,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/top-think/think-orm/issues",
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.40"
|
||||
"source": "https://github.com/top-think/think-orm/tree/v2.0.44"
|
||||
},
|
||||
"install-path": "../topthink/think-orm"
|
||||
},
|
||||
|
54
vendor/composer/installed.php
vendored
54
vendor/composer/installed.php
vendored
@ -13,21 +13,21 @@
|
||||
array (
|
||||
'firebase/php-jwt' =>
|
||||
array (
|
||||
'pretty_version' => 'v5.3.0',
|
||||
'version' => '5.3.0.0',
|
||||
'pretty_version' => 'v5.4.0',
|
||||
'version' => '5.4.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '3c2d70f2e64e2922345e89f2ceae47d2463faae1',
|
||||
'reference' => 'd2113d9b2e0e349796e72d2a63cf9319100382d2',
|
||||
),
|
||||
'league/flysystem' =>
|
||||
array (
|
||||
'pretty_version' => '1.1.3',
|
||||
'version' => '1.1.3.0',
|
||||
'pretty_version' => '1.1.4',
|
||||
'version' => '1.1.4.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9be3b16c877d477357c015cec057548cf9b2a14a',
|
||||
'reference' => 'f3ad69181b8afed2c9edf7be5a2918144ff4ea32',
|
||||
),
|
||||
'league/flysystem-cached-adapter' =>
|
||||
array (
|
||||
@ -58,12 +58,12 @@
|
||||
),
|
||||
'phpmailer/phpmailer' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.4.1',
|
||||
'version' => '6.4.1.0',
|
||||
'pretty_version' => 'v6.5.0',
|
||||
'version' => '6.5.0.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '9256f12d8fb0cd0500f93b19e18c356906cbed3d',
|
||||
'reference' => 'a5b5c43e50b7fba655f793ad27303cd74c57363c',
|
||||
),
|
||||
'psr/cache' =>
|
||||
array (
|
||||
@ -103,12 +103,12 @@
|
||||
),
|
||||
'symfony/polyfill-mbstring' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '2df51500adbaebdc4c38dea4c89a2e131c45c8a1',
|
||||
'reference' => '9174a3d80210dca8daa7f31fec659150bbeabfc6',
|
||||
),
|
||||
'symfony/polyfill-php72' =>
|
||||
array (
|
||||
@ -121,21 +121,21 @@
|
||||
),
|
||||
'symfony/polyfill-php80' =>
|
||||
array (
|
||||
'pretty_version' => 'v1.23.0',
|
||||
'version' => '1.23.0.0',
|
||||
'pretty_version' => 'v1.23.1',
|
||||
'version' => '1.23.1.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'eca0bf41ed421bed1b57c4958bab16aa86b757d0',
|
||||
'reference' => '1100343ed1a92e3a38f9ae122fc0eb21602547be',
|
||||
),
|
||||
'symfony/var-dumper' =>
|
||||
array (
|
||||
'pretty_version' => 'v4.4.25',
|
||||
'version' => '4.4.25.0',
|
||||
'pretty_version' => 'v4.4.27',
|
||||
'version' => '4.4.27.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '31ea689a8e7d2410016b0d25fc15a1ba05a6e2e0',
|
||||
'reference' => '391d6d0e7a06ab54eb7c38fab29b8d174471b3ba',
|
||||
),
|
||||
'taoser/taoler' =>
|
||||
array (
|
||||
@ -157,12 +157,12 @@
|
||||
),
|
||||
'topthink/framework' =>
|
||||
array (
|
||||
'pretty_version' => 'v6.0.8',
|
||||
'version' => '6.0.8.0',
|
||||
'pretty_version' => 'v6.0.9',
|
||||
'version' => '6.0.9.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '4789343672aef06d571d556da369c0e156609bce',
|
||||
'reference' => '0b5fb453f0e533de3af3a1ab6a202510b61be617',
|
||||
),
|
||||
'topthink/think-captcha' =>
|
||||
array (
|
||||
@ -175,12 +175,12 @@
|
||||
),
|
||||
'topthink/think-helper' =>
|
||||
array (
|
||||
'pretty_version' => 'v3.1.4',
|
||||
'version' => '3.1.4.0',
|
||||
'pretty_version' => 'v3.1.5',
|
||||
'version' => '3.1.5.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => 'c28d37743bda4a0455286ca85b17b5791d626e10',
|
||||
'reference' => 'f98e3ad44acd27ae85a4d923b1bdfd16c6d8d905',
|
||||
),
|
||||
'topthink/think-multi-app' =>
|
||||
array (
|
||||
@ -193,12 +193,12 @@
|
||||
),
|
||||
'topthink/think-orm' =>
|
||||
array (
|
||||
'pretty_version' => 'v2.0.40',
|
||||
'version' => '2.0.40.0',
|
||||
'pretty_version' => 'v2.0.44',
|
||||
'version' => '2.0.44.0',
|
||||
'aliases' =>
|
||||
array (
|
||||
),
|
||||
'reference' => '1119d979b850849f3725856460cf108eec1c3eb8',
|
||||
'reference' => '5d3d5c1ebf8bfccf34bacd90edb42989b16ea409',
|
||||
),
|
||||
'topthink/think-template' =>
|
||||
array (
|
||||
|
@ -1,18 +0,0 @@
|
||||
#!/bin/sh -l
|
||||
|
||||
apt-get update && \
|
||||
apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
zip \
|
||||
curl \
|
||||
unzip \
|
||||
wget
|
||||
|
||||
curl --silent --show-error https://getcomposer.org/installer | php
|
||||
php composer.phar self-update
|
||||
|
||||
echo "---Installing dependencies ---"
|
||||
php composer.phar update
|
||||
|
||||
echo "---Running unit tests ---"
|
||||
vendor/bin/phpunit
|
@ -1,77 +0,0 @@
|
||||
name: Test Suite
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
php: [ "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0" ]
|
||||
name: PHP ${{matrix.php }} Unit Test
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
- name: Install Dependencies
|
||||
uses: nick-invision/retry@v1
|
||||
with:
|
||||
timeout_minutes: 10
|
||||
max_attempts: 3
|
||||
command: composer install
|
||||
- name: Run Script
|
||||
run: vendor/bin/phpunit
|
||||
|
||||
# use dockerfiles for old versions of php (setup-php times out for those).
|
||||
test_php55:
|
||||
name: "PHP 5.5 Unit Test"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Run Unit Tests
|
||||
uses: docker://php:5.5-cli
|
||||
with:
|
||||
entrypoint: ./.github/actions/entrypoint.sh
|
||||
|
||||
test_php54:
|
||||
name: "PHP 5.4 Unit Test"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Run Unit Tests
|
||||
uses: docker://php:5.4-cli
|
||||
with:
|
||||
entrypoint: ./.github/actions/entrypoint.sh
|
||||
|
||||
test_php53:
|
||||
name: "PHP 5.3 Unit Test"
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: Run Unit Tests
|
||||
uses: docker://tomsowerby/php-5.3:cli
|
||||
with:
|
||||
entrypoint: ./.github/actions/entrypoint.sh
|
||||
|
||||
style:
|
||||
runs-on: ubuntu-latest
|
||||
name: PHP Style Check
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: "7.0"
|
||||
- name: Run Script
|
||||
run: |
|
||||
composer require friendsofphp/php-cs-fixer
|
||||
vendor/bin/php-cs-fixer fix --diff --dry-run .
|
||||
vendor/bin/php-cs-fixer fix --rules=native_function_invocation --allow-risky=yes --diff src
|
37
vendor/firebase/php-jwt/README.md
vendored
37
vendor/firebase/php-jwt/README.md
vendored
@ -16,6 +16,13 @@ Use composer to manage your dependencies and download PHP-JWT:
|
||||
composer require firebase/php-jwt
|
||||
```
|
||||
|
||||
Optionally, install the `paragonie/sodium_compat` package from composer if your
|
||||
php is < 7.2 or does not have libsodium installed:
|
||||
|
||||
```bash
|
||||
composer require paragonie/sodium_compat
|
||||
```
|
||||
|
||||
Example
|
||||
-------
|
||||
```php
|
||||
@ -144,6 +151,36 @@ $decoded = JWT::decode($jwt, $publicKey, array('RS256'));
|
||||
echo "Decode:\n" . print_r((array) $decoded, true) . "\n";
|
||||
```
|
||||
|
||||
Example with EdDSA (libsodium and Ed25519 signature)
|
||||
----------------------------
|
||||
```php
|
||||
use Firebase\JWT\JWT;
|
||||
|
||||
// Public and private keys are expected to be Base64 encoded. The last
|
||||
// non-empty line is used so that keys can be generated with
|
||||
// sodium_crypto_sign_keypair(). The secret keys generated by other tools may
|
||||
// need to be adjusted to match the input expected by libsodium.
|
||||
|
||||
$keyPair = sodium_crypto_sign_keypair();
|
||||
|
||||
$privateKey = base64_encode(sodium_crypto_sign_secretkey($keyPair));
|
||||
|
||||
$publicKey = base64_encode(sodium_crypto_sign_publickey($keyPair));
|
||||
|
||||
$payload = array(
|
||||
"iss" => "example.org",
|
||||
"aud" => "example.com",
|
||||
"iat" => 1356999524,
|
||||
"nbf" => 1357000000
|
||||
);
|
||||
|
||||
$jwt = JWT::encode($payload, $privateKey, 'EdDSA');
|
||||
echo "Encode:\n" . print_r($jwt, true) . "\n";
|
||||
|
||||
$decoded = JWT::decode($jwt, $publicKey, array('EdDSA'));
|
||||
echo "Decode:\n" . print_r((array) $decoded, true) . "\n";
|
||||
````
|
||||
|
||||
Using JWKs
|
||||
----------
|
||||
|
||||
|
3
vendor/firebase/php-jwt/composer.json
vendored
3
vendor/firebase/php-jwt/composer.json
vendored
@ -22,6 +22,9 @@
|
||||
"require": {
|
||||
"php": ">=5.3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"paragonie/sodium_compat": "Support EdDSA (Ed25519) signatures when libsodium is not present"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"Firebase\\JWT\\": "src"
|
||||
|
2
vendor/firebase/php-jwt/src/JWK.php
vendored
2
vendor/firebase/php-jwt/src/JWK.php
vendored
@ -71,7 +71,7 @@ class JWK
|
||||
*
|
||||
* @uses createPemFromModulusAndExponent
|
||||
*/
|
||||
private static function parseKey(array $jwk)
|
||||
public static function parseKey(array $jwk)
|
||||
{
|
||||
if (empty($jwk)) {
|
||||
throw new InvalidArgumentException('JWK must not be empty');
|
||||
|
34
vendor/firebase/php-jwt/src/JWT.php
vendored
34
vendor/firebase/php-jwt/src/JWT.php
vendored
@ -3,6 +3,7 @@
|
||||
namespace Firebase\JWT;
|
||||
|
||||
use DomainException;
|
||||
use Exception;
|
||||
use InvalidArgumentException;
|
||||
use UnexpectedValueException;
|
||||
use DateTime;
|
||||
@ -50,6 +51,7 @@ class JWT
|
||||
'RS256' => array('openssl', 'SHA256'),
|
||||
'RS384' => array('openssl', 'SHA384'),
|
||||
'RS512' => array('openssl', 'SHA512'),
|
||||
'EdDSA' => array('sodium_crypto', 'EdDSA'),
|
||||
);
|
||||
|
||||
/**
|
||||
@ -198,7 +200,7 @@ class JWT
|
||||
*
|
||||
* @return string An encrypted message
|
||||
*
|
||||
* @throws DomainException Unsupported algorithm was specified
|
||||
* @throws DomainException Unsupported algorithm or bad key was specified
|
||||
*/
|
||||
public static function sign($msg, $key, $alg = 'HS256')
|
||||
{
|
||||
@ -214,14 +216,24 @@ class JWT
|
||||
$success = \openssl_sign($msg, $signature, $key, $algorithm);
|
||||
if (!$success) {
|
||||
throw new DomainException("OpenSSL unable to sign data");
|
||||
} else {
|
||||
}
|
||||
if ($alg === 'ES256') {
|
||||
$signature = self::signatureFromDER($signature, 256);
|
||||
}
|
||||
if ($alg === 'ES384') {
|
||||
} elseif ($alg === 'ES384') {
|
||||
$signature = self::signatureFromDER($signature, 384);
|
||||
}
|
||||
return $signature;
|
||||
case 'sodium_crypto':
|
||||
if (!function_exists('sodium_crypto_sign_detached')) {
|
||||
throw new DomainException('libsodium is not available');
|
||||
}
|
||||
try {
|
||||
// The last non-empty line is used as the key.
|
||||
$lines = array_filter(explode("\n", $key));
|
||||
$key = base64_decode(end($lines));
|
||||
return sodium_crypto_sign_detached($msg, $key);
|
||||
} catch (Exception $e) {
|
||||
throw new DomainException($e->getMessage(), 0, $e);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -237,7 +249,7 @@ class JWT
|
||||
*
|
||||
* @return bool
|
||||
*
|
||||
* @throws DomainException Invalid Algorithm or OpenSSL failure
|
||||
* @throws DomainException Invalid Algorithm, bad key, or OpenSSL failure
|
||||
*/
|
||||
private static function verify($msg, $signature, $key, $alg)
|
||||
{
|
||||
@ -258,6 +270,18 @@ class JWT
|
||||
throw new DomainException(
|
||||
'OpenSSL error: ' . \openssl_error_string()
|
||||
);
|
||||
case 'sodium_crypto':
|
||||
if (!function_exists('sodium_crypto_sign_verify_detached')) {
|
||||
throw new DomainException('libsodium is not available');
|
||||
}
|
||||
try {
|
||||
// The last non-empty line is used as the key.
|
||||
$lines = array_filter(explode("\n", $key));
|
||||
$key = base64_decode(end($lines));
|
||||
return sodium_crypto_sign_verify_detached($signature, $msg, $key);
|
||||
} catch (Exception $e) {
|
||||
throw new DomainException($e->getMessage(), 0, $e);
|
||||
}
|
||||
case 'hash_hmac':
|
||||
default:
|
||||
$hash = \hash_hmac($algorithm, $msg, $key, true);
|
||||
|
1
vendor/league/flysystem/composer.json
vendored
1
vendor/league/flysystem/composer.json
vendored
@ -40,7 +40,6 @@
|
||||
}
|
||||
},
|
||||
"suggest": {
|
||||
"ext-fileinfo": "Required for MimeType",
|
||||
"league/flysystem-eventable-filesystem": "Allows you to use EventableFilesystem",
|
||||
"league/flysystem-rackspace": "Allows you to use Rackspace Cloud Files",
|
||||
"league/flysystem-azure": "Allows you to use Windows Azure Blob storage",
|
||||
|
17
vendor/league/flysystem/src/CorruptedPathDetected.php
vendored
Normal file
17
vendor/league/flysystem/src/CorruptedPathDetected.php
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace League\Flysystem;
|
||||
|
||||
use LogicException;
|
||||
|
||||
class CorruptedPathDetected extends LogicException implements FilesystemException
|
||||
{
|
||||
/**
|
||||
* @param string $path
|
||||
* @return CorruptedPathDetected
|
||||
*/
|
||||
public static function forPath($path)
|
||||
{
|
||||
return new CorruptedPathDetected("Corrupted path detected: " . $path);
|
||||
}
|
||||
}
|
7
vendor/league/flysystem/src/Filesystem.php
vendored
7
vendor/league/flysystem/src/Filesystem.php
vendored
@ -8,12 +8,13 @@ use League\Flysystem\Plugin\PluggableTrait;
|
||||
use League\Flysystem\Util\ContentListingFormatter;
|
||||
|
||||
/**
|
||||
* @method array getWithMetadata(string $path, array $metadata)
|
||||
* @method void emptyDir(string $dirname)
|
||||
* @method array|false getWithMetadata(string $path, string[] $metadata)
|
||||
* @method bool forceCopy(string $path, string $newpath)
|
||||
* @method bool forceRename(string $path, string $newpath)
|
||||
* @method array listFiles(string $path = '', boolean $recursive = false)
|
||||
* @method array listPaths(string $path = '', boolean $recursive = false)
|
||||
* @method array listWith(array $keys = [], $directory = '', $recursive = false)
|
||||
* @method string[] listPaths(string $path = '', boolean $recursive = false)
|
||||
* @method array listWith(string[] $keys = [], $directory = '', $recursive = false)
|
||||
*/
|
||||
class Filesystem implements FilesystemInterface
|
||||
{
|
||||
|
2
vendor/league/flysystem/src/MountManager.php
vendored
2
vendor/league/flysystem/src/MountManager.php
vendored
@ -20,8 +20,6 @@ use League\Flysystem\Plugin\PluginNotFoundException;
|
||||
* @method void assertPresent($path)
|
||||
* @method void assertAbsent($path)
|
||||
* @method Filesystem addPlugin(PluginInterface $plugin)
|
||||
*
|
||||
* @deprecated This functionality will be removed in 2.0
|
||||
*/
|
||||
class MountManager implements FilesystemInterface
|
||||
{
|
||||
|
@ -21,7 +21,7 @@ class GetWithMetadata extends AbstractPlugin
|
||||
* Get metadata for an object with required metadata.
|
||||
*
|
||||
* @param string $path path to file
|
||||
* @param array $metadata metadata keys
|
||||
* @param string[] $metadata metadata keys
|
||||
*
|
||||
* @throws InvalidArgumentException
|
||||
* @throws FileNotFoundException
|
||||
|
@ -20,7 +20,7 @@ class ListPaths extends AbstractPlugin
|
||||
* @param string $directory
|
||||
* @param bool $recursive
|
||||
*
|
||||
* @return array paths
|
||||
* @return string[] paths
|
||||
*/
|
||||
public function handle($directory = '', $recursive = false)
|
||||
{
|
||||
|
@ -17,7 +17,7 @@ class ListWith extends AbstractPlugin
|
||||
/**
|
||||
* List contents with metadata.
|
||||
*
|
||||
* @param array $keys
|
||||
* @param string[] $keys
|
||||
* @param string $directory
|
||||
* @param bool $recursive
|
||||
*
|
||||
|
17
vendor/league/flysystem/src/Util.php
vendored
17
vendor/league/flysystem/src/Util.php
vendored
@ -5,6 +5,8 @@ namespace League\Flysystem;
|
||||
use League\Flysystem\Util\MimeType;
|
||||
use LogicException;
|
||||
|
||||
use function strcmp;
|
||||
|
||||
class Util
|
||||
{
|
||||
/**
|
||||
@ -103,7 +105,6 @@ class Util
|
||||
{
|
||||
$path = str_replace('\\', '/', $path);
|
||||
$path = static::removeFunkyWhiteSpace($path);
|
||||
|
||||
$parts = [];
|
||||
|
||||
foreach (explode('/', $path) as $part) {
|
||||
@ -127,11 +128,13 @@ class Util
|
||||
}
|
||||
}
|
||||
|
||||
return implode('/', $parts);
|
||||
$path = implode('/', $parts);
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes unprintable characters and invalid unicode characters.
|
||||
* Rejects unprintable characters and invalid unicode characters.
|
||||
*
|
||||
* @param string $path
|
||||
*
|
||||
@ -139,10 +142,8 @@ class Util
|
||||
*/
|
||||
protected static function removeFunkyWhiteSpace($path)
|
||||
{
|
||||
// We do this check in a loop, since removing invalid unicode characters
|
||||
// can lead to new characters being created.
|
||||
while (preg_match('#\p{C}+|^\./#u', $path)) {
|
||||
$path = preg_replace('#\p{C}+|^\./#u', '', $path);
|
||||
if (preg_match('#\p{C}+#u', $path)) {
|
||||
throw CorruptedPathDetected::forPath($path);
|
||||
}
|
||||
|
||||
return $path;
|
||||
@ -205,7 +206,7 @@ class Util
|
||||
$listedDirectories = [];
|
||||
|
||||
foreach ($listing as $object) {
|
||||
list($directories, $listedDirectories) = static::emulateObjectDirectories($object, $directories, $listedDirectories);
|
||||
[$directories, $listedDirectories] = static::emulateObjectDirectories($object, $directories, $listedDirectories);
|
||||
}
|
||||
|
||||
$directories = array_diff(array_unique($directories), array_unique($listedDirectories));
|
||||
|
5
vendor/phpmailer/phpmailer/SECURITY.md
vendored
5
vendor/phpmailer/phpmailer/SECURITY.md
vendored
@ -2,6 +2,11 @@
|
||||
|
||||
Please disclose any security issues or vulnerabilities found through [Tidelift's coordinated disclosure system](https://tidelift.com/security) or to the maintainers privately.
|
||||
|
||||
PHPMailer 6.4.1 and earlier contain a vulnerability that can result in untrusted code being called (if such code is injected into the host project's scope by other means). If the `$patternselect` parameter to `validateAddress()` is set to `'php'` (the default, defined by `PHPMailer::$validator`), and the global namespace contains a function called `php`, it will be called in preference to the built-in validator of the same name. Mitigated in PHPMailer 6.5.0 by denying the use of simple strings as validator function names. Recorded as [CVE-2021-3603](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-3603). Reported by [Vikrant Singh Chauhan](mailto:vi@hackberry.xyz) via [huntr.dev](https://www.huntr.dev/).
|
||||
|
||||
PHPMailer versions 6.4.1 and earlier contain a possible remote code execution vulnerability through the `$lang_path` parameter of the `setLanguage()` method. If the `$lang_path` parameter is passed unfiltered from user input, it can be set to [a UNC path](https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats#unc-paths), and if an attacker is also able to persuade the server to load a file from that UNC path, a script file under their control may be executed. This vulnerability only applies to systems that resolve UNC paths, typically only Microsoft Windows.
|
||||
PHPMailer 6.5.0 mitigates this by no longer treating translation files as PHP code, but by parsing their text content directly. This approach avoids the possibility of executing unknown code while retaining backward compatibility. This isn't ideal, so the current translation format is deprecated and will be replaced in the next major release. Recorded as [CVE-2021-34551](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2021-34551). Reported by [Jilin Diting Information Technology Co., Ltd](https://listensec.com) via Tidelift.
|
||||
|
||||
PHPMailer versions between 6.1.8 and 6.4.0 contain a regression of the earlier CVE-2018-19296 object injection vulnerability as a result of [a fix for Windows UNC paths in 6.1.8](https://github.com/PHPMailer/PHPMailer/commit/e2e07a355ee8ff36aba21d0242c5950c56e4c6f9). Recorded as [CVE-2020-36326](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-36326). Reported by Fariskhi Vidyan via Tidelift. 6.4.1 fixes this issue, and also enforces stricter checks for URL schemes in local path contexts.
|
||||
|
||||
PHPMailer versions 6.1.5 and earlier contain an output escaping bug that occurs in `Content-Type` and `Content-Disposition` when filenames passed into `addAttachment` and other methods that accept attachment names contain double quote characters, in contravention of RFC822 3.4.1. No specific vulnerability has been found relating to this, but it could allow file attachments to bypass attachment filters that are based on matching filename extensions. Recorded as [CVE-2020-13625](https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2020-13625). Reported by Elar Lang of Clarified Security.
|
||||
|
2
vendor/phpmailer/phpmailer/VERSION
vendored
2
vendor/phpmailer/phpmailer/VERSION
vendored
@ -1 +1 @@
|
||||
6.4.1
|
||||
6.5.0
|
@ -19,8 +19,7 @@ $PHPMAILER_LANG['instantiate'] = 'لا يمكن توفير خدمة ا
|
||||
$PHPMAILER_LANG['invalid_address'] = 'الإرسال غير ممكن لأن عنوان البريد الإلكتروني غير صالح: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' برنامج الإرسال غير مدعوم.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'يجب توفير عنوان البريد الإلكتروني لمستلم واحد على الأقل.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية ' .
|
||||
'فشل في الارسال لكل من : ';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'خطأ SMTP: الأخطاء التالية فشل في الارسال لكل من : ';
|
||||
$PHPMAILER_LANG['signing'] = 'خطأ في التوقيع: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() غير ممكن.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'خطأ على مستوى الخادم SMTP: ';
|
||||
|
42
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
42
vendor/phpmailer/phpmailer/src/PHPMailer.php
vendored
@ -428,9 +428,11 @@ class PHPMailer
|
||||
public $Debugoutput = 'echo';
|
||||
|
||||
/**
|
||||
* Whether to keep SMTP connection open after each message.
|
||||
* If this is set to true then to close the connection
|
||||
* requires an explicit call to smtpClose().
|
||||
* Whether to keep the SMTP connection open after each message.
|
||||
* If this is set to true then the connection will remain open after a send,
|
||||
* and closing the connection will require an explicit call to smtpClose().
|
||||
* It's a good idea to use this if you are sending multiple messages as it reduces overhead.
|
||||
* See the mailing list example for how to use it.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
@ -748,7 +750,7 @@ class PHPMailer
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.4.1';
|
||||
const VERSION = '6.5.0';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
@ -1335,7 +1337,8 @@ class PHPMailer
|
||||
if (null === $patternselect) {
|
||||
$patternselect = static::$validator;
|
||||
}
|
||||
if (is_callable($patternselect)) {
|
||||
//Don't allow strings as callables, see SECURITY.md and CVE-2021-3603
|
||||
if (is_callable($patternselect) && !is_string($patternselect)) {
|
||||
return call_user_func($patternselect, $address);
|
||||
}
|
||||
//Reject line breaks in addresses; it's valid RFC5322, but not RFC5321
|
||||
@ -2182,7 +2185,8 @@ class PHPMailer
|
||||
* The default language is English.
|
||||
*
|
||||
* @param string $langcode ISO 639-1 2-character language code (e.g. French is "fr")
|
||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash)
|
||||
* @param string $lang_path Path to the language file directory, with trailing separator (slash).D
|
||||
* Do not set this from user input!
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
@ -2244,14 +2248,32 @@ class PHPMailer
|
||||
if (!static::fileIsAccessible($lang_file)) {
|
||||
$foundlang = false;
|
||||
} else {
|
||||
//Overwrite language-specific strings.
|
||||
//This way we'll never have missing translation keys.
|
||||
$foundlang = include $lang_file;
|
||||
//$foundlang = include $lang_file;
|
||||
$lines = file($lang_file);
|
||||
foreach ($lines as $line) {
|
||||
//Translation file lines look like this:
|
||||
//$PHPMAILER_LANG['authenticate'] = 'SMTP-Fehler: Authentifizierung fehlgeschlagen.';
|
||||
//These files are parsed as text and not PHP so as to avoid the possibility of code injection
|
||||
//See https://blog.stevenlevithan.com/archives/match-quoted-string
|
||||
$matches = [];
|
||||
if (
|
||||
preg_match(
|
||||
'/^\$PHPMAILER_LANG\[\'([a-z\d_]+)\'\]\s*=\s*(["\'])(.+)*?\2;/',
|
||||
$line,
|
||||
$matches
|
||||
) &&
|
||||
//Ignore unknown translation keys
|
||||
array_key_exists($matches[1], $PHPMAILER_LANG)
|
||||
) {
|
||||
//Overwrite language-specific strings so we'll never have missing translation keys.
|
||||
$PHPMAILER_LANG[$matches[1]] = (string)$matches[3];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$this->language = $PHPMAILER_LANG;
|
||||
|
||||
return (bool) $foundlang; //Returns false if language not found
|
||||
return $foundlang; //Returns false if language not found
|
||||
}
|
||||
|
||||
/**
|
||||
|
2
vendor/phpmailer/phpmailer/src/POP3.php
vendored
2
vendor/phpmailer/phpmailer/src/POP3.php
vendored
@ -46,7 +46,7 @@ class POP3
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.4.1';
|
||||
const VERSION = '6.5.0';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
|
3
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
3
vendor/phpmailer/phpmailer/src/SMTP.php
vendored
@ -35,7 +35,7 @@ class SMTP
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.4.1';
|
||||
const VERSION = '6.5.0';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
@ -186,6 +186,7 @@ class SMTP
|
||||
'Amazon_SES' => '/[\d]{3} Ok (.*)/',
|
||||
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
|
||||
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
|
||||
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
|
||||
];
|
||||
|
||||
/**
|
||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
// This file is automatically generated at:2021-06-09 14:46:43
|
||||
// This file is automatically generated at:2021-08-04 18:41:10
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\captcha\\CaptchaService',
|
||||
|
11
vendor/symfony/polyfill-mbstring/Mbstring.php
vendored
11
vendor/symfony/polyfill-mbstring/Mbstring.php
vendored
@ -69,14 +69,15 @@ final class Mbstring
|
||||
{
|
||||
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
||||
|
||||
private static $encodingList = ['ASCII', 'UTF-8'];
|
||||
private static $language = 'neutral';
|
||||
private static $internalEncoding = 'UTF-8';
|
||||
private static $caseFold = [
|
||||
private const CASE_FOLD = [
|
||||
['µ', 'ſ', "\xCD\x85", 'ς', "\xCF\x90", "\xCF\x91", "\xCF\x95", "\xCF\x96", "\xCF\xB0", "\xCF\xB1", "\xCF\xB5", "\xE1\xBA\x9B", "\xE1\xBE\xBE"],
|
||||
['μ', 's', 'ι', 'σ', 'β', 'θ', 'φ', 'π', 'κ', 'ρ', 'ε', "\xE1\xB9\xA1", 'ι'],
|
||||
];
|
||||
|
||||
private static $encodingList = ['ASCII', 'UTF-8'];
|
||||
private static $language = 'neutral';
|
||||
private static $internalEncoding = 'UTF-8';
|
||||
|
||||
public static function mb_convert_encoding($s, $toEncoding, $fromEncoding = null)
|
||||
{
|
||||
if (\is_array($fromEncoding) || false !== strpos($fromEncoding, ',')) {
|
||||
@ -300,7 +301,7 @@ final class Mbstring
|
||||
$map = $upper;
|
||||
} else {
|
||||
if (self::MB_CASE_FOLD === $mode) {
|
||||
$s = str_replace(self::$caseFold[0], self::$caseFold[1], $s);
|
||||
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
||||
}
|
||||
|
||||
static $lower = null;
|
||||
|
2
vendor/symfony/polyfill-php80/README.md
vendored
2
vendor/symfony/polyfill-php80/README.md
vendored
@ -16,7 +16,7 @@ This component provides features added to PHP 8.0 core:
|
||||
- [`get_resource_id`](https://php.net/get_resource_id)
|
||||
|
||||
More information can be found in the
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/master/README.md).
|
||||
[main Polyfill README](https://github.com/symfony/polyfill/blob/main/README.md).
|
||||
|
||||
License
|
||||
=======
|
||||
|
6
vendor/symfony/polyfill-php80/bootstrap.php
vendored
6
vendor/symfony/polyfill-php80/bootstrap.php
vendored
@ -26,13 +26,13 @@ if (!function_exists('preg_last_error_msg')) {
|
||||
function preg_last_error_msg(): string { return p\Php80::preg_last_error_msg(); }
|
||||
}
|
||||
if (!function_exists('str_contains')) {
|
||||
function str_contains(string $haystack, string $needle): bool { return p\Php80::str_contains($haystack, $needle); }
|
||||
function str_contains(?string $haystack, ?string $needle): bool { return p\Php80::str_contains($haystack ?? '', $needle ?? ''); }
|
||||
}
|
||||
if (!function_exists('str_starts_with')) {
|
||||
function str_starts_with(string $haystack, string $needle): bool { return p\Php80::str_starts_with($haystack, $needle); }
|
||||
function str_starts_with(?string $haystack, ?string $needle): bool { return p\Php80::str_starts_with($haystack ?? '', $needle ?? ''); }
|
||||
}
|
||||
if (!function_exists('str_ends_with')) {
|
||||
function str_ends_with(string $haystack, string $needle): bool { return p\Php80::str_ends_with($haystack, $needle); }
|
||||
function str_ends_with(?string $haystack, ?string $needle): bool { return p\Php80::str_ends_with($haystack ?? '', $needle ?? ''); }
|
||||
}
|
||||
if (!function_exists('get_debug_type')) {
|
||||
function get_debug_type($value): string { return p\Php80::get_debug_type($value); }
|
||||
|
@ -55,7 +55,7 @@ class ClassStub extends ConstStub
|
||||
}
|
||||
}
|
||||
|
||||
if (false !== strpos($identifier, "@anonymous\0")) {
|
||||
if (str_contains($identifier, "@anonymous\0")) {
|
||||
$this->value = $identifier = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
|
||||
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
|
||||
}, $identifier);
|
||||
@ -65,7 +65,7 @@ class ClassStub extends ConstStub
|
||||
$s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE);
|
||||
$s = ReflectionCaster::getSignature($s);
|
||||
|
||||
if ('()' === substr($identifier, -2)) {
|
||||
if (str_ends_with($identifier, '()')) {
|
||||
$this->value = substr_replace($identifier, $s, -2);
|
||||
} else {
|
||||
$this->value .= $s;
|
||||
|
@ -149,7 +149,7 @@ class ExceptionCaster
|
||||
$f = self::castFrameStub($frame, [], $frame, true);
|
||||
if (isset($f[$prefix.'src'])) {
|
||||
foreach ($f[$prefix.'src']->value as $label => $frame) {
|
||||
if (0 === strpos($label, "\0~collapse=0")) {
|
||||
if (str_starts_with($label, "\0~collapse=0")) {
|
||||
if ($collapse) {
|
||||
$label = substr_replace($label, '1', 11, 1);
|
||||
} else {
|
||||
@ -281,7 +281,7 @@ class ExceptionCaster
|
||||
}
|
||||
unset($a[$xPrefix.'string'], $a[Caster::PREFIX_DYNAMIC.'xdebug_message'], $a[Caster::PREFIX_DYNAMIC.'__destructorException']);
|
||||
|
||||
if (isset($a[Caster::PREFIX_PROTECTED.'message']) && false !== strpos($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) {
|
||||
if (isset($a[Caster::PREFIX_PROTECTED.'message']) && str_contains($a[Caster::PREFIX_PROTECTED.'message'], "@anonymous\0")) {
|
||||
$a[Caster::PREFIX_PROTECTED.'message'] = preg_replace_callback('/[a-zA-Z_\x7f-\xff][\\\\a-zA-Z0-9_\x7f-\xff]*+@anonymous\x00.*?\.php(?:0x?|:[0-9]++\$)[0-9a-fA-F]++/', function ($m) {
|
||||
return class_exists($m[0], false) ? (get_parent_class($m[0]) ?: key(class_implements($m[0])) ?: 'class').'@anonymous' : $m[0];
|
||||
}, $a[Caster::PREFIX_PROTECTED.'message']);
|
||||
|
10
vendor/symfony/var-dumper/Caster/LinkStub.php
vendored
10
vendor/symfony/var-dumper/Caster/LinkStub.php
vendored
@ -23,7 +23,7 @@ class LinkStub extends ConstStub
|
||||
private static $vendorRoots;
|
||||
private static $composerRoots;
|
||||
|
||||
public function __construct($label, int $line = 0, $href = null)
|
||||
public function __construct(string $label, int $line = 0, string $href = null)
|
||||
{
|
||||
$this->value = $label;
|
||||
|
||||
@ -33,12 +33,12 @@ class LinkStub extends ConstStub
|
||||
if (!\is_string($href)) {
|
||||
return;
|
||||
}
|
||||
if (0 === strpos($href, 'file://')) {
|
||||
if (str_starts_with($href, 'file://')) {
|
||||
if ($href === $label) {
|
||||
$label = substr($label, 7);
|
||||
}
|
||||
$href = substr($href, 7);
|
||||
} elseif (false !== strpos($href, '://')) {
|
||||
} elseif (str_contains($href, '://')) {
|
||||
$this->attr['href'] = $href;
|
||||
|
||||
return;
|
||||
@ -69,7 +69,7 @@ class LinkStub extends ConstStub
|
||||
self::$vendorRoots = [];
|
||||
|
||||
foreach (get_declared_classes() as $class) {
|
||||
if ('C' === $class[0] && 0 === strpos($class, 'ComposerAutoloaderInit')) {
|
||||
if ('C' === $class[0] && str_starts_with($class, 'ComposerAutoloaderInit')) {
|
||||
$r = new \ReflectionClass($class);
|
||||
$v = \dirname($r->getFileName(), 2);
|
||||
if (file_exists($v.'/composer/installed.json')) {
|
||||
@ -85,7 +85,7 @@ class LinkStub extends ConstStub
|
||||
}
|
||||
|
||||
foreach (self::$vendorRoots as $root) {
|
||||
if ($inVendor = 0 === strpos($file, $root)) {
|
||||
if ($inVendor = str_starts_with($file, $root)) {
|
||||
return $root;
|
||||
}
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ class MemcachedCaster
|
||||
|
||||
$optionConstants = [];
|
||||
foreach ($reflectedMemcached->getConstants() as $constantKey => $value) {
|
||||
if (0 === strpos($constantKey, 'OPT_')) {
|
||||
if (str_starts_with($constantKey, 'OPT_')) {
|
||||
$optionConstants[$constantKey] = $value;
|
||||
}
|
||||
}
|
||||
|
@ -42,7 +42,7 @@ class ReflectionCaster
|
||||
|
||||
$a = static::castFunctionAbstract($c, $a, $stub, $isNested, $filter);
|
||||
|
||||
if (false === strpos($c->name, '{closure}')) {
|
||||
if (!str_contains($c->name, '{closure}')) {
|
||||
$stub->class = isset($a[$prefix.'class']) ? $a[$prefix.'class']->value.'::'.$c->name : $c->name;
|
||||
unset($a[$prefix.'class']);
|
||||
}
|
||||
@ -102,7 +102,7 @@ class ReflectionCaster
|
||||
$prefix.'allowsNull' => $c->allowsNull(),
|
||||
$prefix.'isBuiltin' => $c->isBuiltin(),
|
||||
];
|
||||
} elseif ($c instanceof \ReflectionUnionType) {
|
||||
} elseif ($c instanceof \ReflectionUnionType || $c instanceof \ReflectionIntersectionType) {
|
||||
$a[$prefix.'allowsNull'] = $c->allowsNull();
|
||||
self::addMap($a, $c, [
|
||||
'types' => 'getTypes',
|
||||
@ -353,7 +353,7 @@ class ReflectionCaster
|
||||
} elseif (\is_array($v)) {
|
||||
$signature .= $v ? '[…'.\count($v).']' : '[]';
|
||||
} elseif (\is_string($v)) {
|
||||
$signature .= 10 > \strlen($v) && false === strpos($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'";
|
||||
$signature .= 10 > \strlen($v) && !str_contains($v, '\\') ? "'{$v}'" : "'…".\strlen($v)."'";
|
||||
} elseif (\is_bool($v)) {
|
||||
$signature .= $v ? 'true' : 'false';
|
||||
} else {
|
||||
|
@ -48,7 +48,7 @@ class ResourceCaster
|
||||
public static function castStream($stream, array $a, Stub $stub, $isNested)
|
||||
{
|
||||
$a = stream_get_meta_data($stream) + static::castStreamContext($stream, $a, $stub, $isNested);
|
||||
if (isset($a['uri'])) {
|
||||
if ($a['uri'] ?? false) {
|
||||
$a['uri'] = new LinkStub($a['uri']);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ class SplCaster
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($a[$prefix.'realPath'])) {
|
||||
if ($a[$prefix.'realPath'] ?? false) {
|
||||
$a[$prefix.'realPath'] = new LinkStub($a[$prefix.'realPath']);
|
||||
}
|
||||
|
||||
|
@ -300,7 +300,7 @@ abstract class AbstractCloner implements ClonerInterface
|
||||
$obj = $stub->value;
|
||||
$class = $stub->class;
|
||||
|
||||
if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : false !== strpos($class, "@anonymous\0")) {
|
||||
if (\PHP_VERSION_ID < 80000 ? "\0" === ($class[15] ?? null) : str_contains($class, "@anonymous\0")) {
|
||||
$stub->class = get_debug_type($obj);
|
||||
}
|
||||
if (isset($this->classInfo[$class])) {
|
||||
|
9
vendor/symfony/var-dumper/Cloner/Data.php
vendored
9
vendor/symfony/var-dumper/Cloner/Data.php
vendored
@ -155,16 +155,25 @@ class Data implements \ArrayAccess, \Countable, \IteratorAggregate
|
||||
return $this->__isset($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return mixed
|
||||
*/
|
||||
public function offsetGet($key)
|
||||
{
|
||||
return $this->__get($key);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function offsetSet($key, $value)
|
||||
{
|
||||
throw new \BadMethodCallException(self::class.' objects are immutable.');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return void
|
||||
*/
|
||||
public function offsetUnset($key)
|
||||
{
|
||||
throw new \BadMethodCallException(self::class.' objects are immutable.');
|
||||
|
@ -42,7 +42,7 @@ class CliDescriptor implements DumpDescriptorInterface
|
||||
$io = $output instanceof SymfonyStyle ? $output : new SymfonyStyle(new ArrayInput([]), $output);
|
||||
$this->dumper->setColors($output->isDecorated());
|
||||
|
||||
$rows = [['date', date('r', $context['timestamp'])]];
|
||||
$rows = [['date', date('r', (int) $context['timestamp'])]];
|
||||
$lastIdentifier = $this->lastIdentifier;
|
||||
$this->lastIdentifier = $clientId;
|
||||
|
||||
|
@ -94,7 +94,7 @@ HTML
|
||||
|
||||
private function extractDate(array $context, string $format = 'r'): string
|
||||
{
|
||||
return date($format, $context['timestamp']);
|
||||
return date($format, (int) $context['timestamp']);
|
||||
}
|
||||
|
||||
private function renderTags(array $tags): string
|
||||
|
@ -63,7 +63,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
|
||||
*/
|
||||
public function setOutput($output)
|
||||
{
|
||||
$prev = null !== $this->outputStream ? $this->outputStream : $this->lineDumper;
|
||||
$prev = $this->outputStream ?? $this->lineDumper;
|
||||
|
||||
if (\is_callable($output)) {
|
||||
$this->outputStream = null;
|
||||
|
@ -154,7 +154,7 @@ class CliDumper extends AbstractDumper
|
||||
case is_nan($value): $value = 'NAN'; break;
|
||||
default:
|
||||
$value = (string) $value;
|
||||
if (false === strpos($value, $this->decimalPoint)) {
|
||||
if (!str_contains($value, $this->decimalPoint)) {
|
||||
$value .= $this->decimalPoint.'0';
|
||||
}
|
||||
break;
|
||||
@ -445,7 +445,7 @@ class CliDumper extends AbstractDumper
|
||||
|
||||
if (isset($attr['ellipsis'], $attr['ellipsis-type'])) {
|
||||
$prefix = substr($value, 0, -$attr['ellipsis']);
|
||||
if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && 0 === strpos($prefix, $_SERVER[$pwd])) {
|
||||
if ('cli' === \PHP_SAPI && 'path' === $attr['ellipsis-type'] && isset($_SERVER[$pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD' : 'PWD']) && str_starts_with($prefix, $_SERVER[$pwd])) {
|
||||
$prefix = '.'.substr($prefix, \strlen($_SERVER[$pwd]));
|
||||
}
|
||||
if (!empty($attr['ellipsis-tail'])) {
|
||||
@ -479,7 +479,7 @@ class CliDumper extends AbstractDumper
|
||||
} else {
|
||||
$value = "\033[{$this->styles[$style]}m".$value;
|
||||
}
|
||||
if ($cchrCount && $endCchr === substr($value, -\strlen($endCchr))) {
|
||||
if ($cchrCount && str_ends_with($value, $endCchr)) {
|
||||
$value = substr($value, 0, -\strlen($endCchr));
|
||||
} else {
|
||||
$value .= "\033[{$this->styles['default']}m";
|
||||
|
@ -56,7 +56,7 @@ final class SourceContextProvider implements ContextProviderInterface
|
||||
$line = $trace[$i]['line'] ?? $line;
|
||||
|
||||
while (++$i < $this->limit) {
|
||||
if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && 0 !== strpos($trace[$i]['function'], 'call_user_func')) {
|
||||
if (isset($trace[$i]['function'], $trace[$i]['file']) && empty($trace[$i]['class']) && !str_starts_with($trace[$i]['function'], 'call_user_func')) {
|
||||
$file = $trace[$i]['file'];
|
||||
$line = $trace[$i]['line'];
|
||||
|
||||
@ -98,7 +98,7 @@ final class SourceContextProvider implements ContextProviderInterface
|
||||
|
||||
if (null !== $this->projectDir) {
|
||||
$context['project_dir'] = $this->projectDir;
|
||||
if (0 === strpos($file, $this->projectDir)) {
|
||||
if (str_starts_with($file, $this->projectDir)) {
|
||||
$context['file_relative'] = ltrim(substr($file, \strlen($this->projectDir)), \DIRECTORY_SEPARATOR);
|
||||
}
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ class HtmlDumper extends CliDumper
|
||||
*/
|
||||
protected function getDumpHeader()
|
||||
{
|
||||
$this->headerIsDumped = null !== $this->outputStream ? $this->outputStream : $this->lineDumper;
|
||||
$this->headerIsDumped = $this->outputStream ?? $this->lineDumper;
|
||||
|
||||
if (null !== $this->dumpHeader) {
|
||||
return $this->dumpHeader;
|
||||
@ -964,7 +964,7 @@ EOHTML
|
||||
if (-1 === $this->lastDepth) {
|
||||
$this->line = sprintf($this->dumpPrefix, $this->dumpId, $this->indentPad).$this->line;
|
||||
}
|
||||
if ($this->headerIsDumped !== (null !== $this->outputStream ? $this->outputStream : $this->lineDumper)) {
|
||||
if ($this->headerIsDumped !== ($this->outputStream ?? $this->lineDumper)) {
|
||||
$this->line = $this->getDumpHeader().$this->line;
|
||||
}
|
||||
|
||||
@ -998,7 +998,7 @@ EOHTML
|
||||
}
|
||||
}
|
||||
|
||||
function esc($str)
|
||||
function esc(string $str)
|
||||
{
|
||||
return htmlspecialchars($str, \ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
|
@ -31,7 +31,7 @@ class Connection
|
||||
*/
|
||||
public function __construct(string $host, array $contextProviders = [])
|
||||
{
|
||||
if (false === strpos($host, '://')) {
|
||||
if (!str_contains($host, '://')) {
|
||||
$host = 'tcp://'.$host;
|
||||
}
|
||||
|
||||
@ -78,7 +78,7 @@ class Connection
|
||||
return false;
|
||||
}
|
||||
|
||||
private static function nullErrorHandler($t, $m)
|
||||
private static function nullErrorHandler(int $t, string $m)
|
||||
{
|
||||
// no-op
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ class DumpServer
|
||||
|
||||
public function __construct(string $host, LoggerInterface $logger = null)
|
||||
{
|
||||
if (false === strpos($host, '://')) {
|
||||
if (!str_contains($host, '://')) {
|
||||
$host = 'tcp://'.$host;
|
||||
}
|
||||
|
||||
|
2
vendor/symfony/var-dumper/composer.json
vendored
2
vendor/symfony/var-dumper/composer.json
vendored
@ -19,7 +19,7 @@
|
||||
"php": ">=7.1.3",
|
||||
"symfony/polyfill-mbstring": "~1.0",
|
||||
"symfony/polyfill-php72": "~1.5",
|
||||
"symfony/polyfill-php80": "^1.15"
|
||||
"symfony/polyfill-php80": "^1.16"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-iconv": "*",
|
||||
|
2
vendor/topthink/framework/.travis.yml
vendored
2
vendor/topthink/framework/.travis.yml
vendored
@ -4,9 +4,9 @@ language: php
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 7.1
|
||||
- php: 7.2
|
||||
- php: 7.3
|
||||
- php: 8.0
|
||||
|
||||
cache:
|
||||
directories:
|
||||
|
4
vendor/topthink/framework/composer.json
vendored
4
vendor/topthink/framework/composer.json
vendored
@ -19,10 +19,10 @@
|
||||
}
|
||||
],
|
||||
"require": {
|
||||
"php": ">=7.1.0",
|
||||
"php": ">=7.2.5",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*",
|
||||
"league/flysystem": "^1.0",
|
||||
"league/flysystem": "^1.1.4",
|
||||
"league/flysystem-cached-adapter": "^1.0",
|
||||
"psr/log": "~1.0",
|
||||
"psr/container": "~1.0",
|
||||
|
2
vendor/topthink/framework/src/think/App.php
vendored
2
vendor/topthink/framework/src/think/App.php
vendored
@ -39,7 +39,7 @@ use think\initializer\RegisterService;
|
||||
*/
|
||||
class App extends Container
|
||||
{
|
||||
const VERSION = '6.0.8';
|
||||
const VERSION = '6.0.9';
|
||||
|
||||
/**
|
||||
* 应用调试模式
|
||||
|
@ -37,6 +37,7 @@ class Event
|
||||
'HttpEnd' => event\HttpEnd::class,
|
||||
'RouteLoaded' => event\RouteLoaded::class,
|
||||
'LogWrite' => event\LogWrite::class,
|
||||
'LogRecord' => event\LogRecord::class,
|
||||
];
|
||||
|
||||
/**
|
||||
@ -215,6 +216,14 @@ class Event
|
||||
|
||||
$result = [];
|
||||
$listeners = $this->listener[$event] ?? [];
|
||||
|
||||
if (strpos($event, '.')) {
|
||||
[$prefix, $event] = explode('.', $event, 2);
|
||||
if (isset($this->listener[$prefix . '.*'])) {
|
||||
$listeners = array_merge($listeners, $this->listener[$prefix . '.*']);
|
||||
}
|
||||
}
|
||||
|
||||
$listeners = array_unique($listeners, SORT_REGULAR);
|
||||
|
||||
foreach ($listeners as $key => $listener) {
|
||||
|
14
vendor/topthink/framework/src/think/Request.php
vendored
14
vendor/topthink/framework/src/think/Request.php
vendored
@ -408,7 +408,8 @@ class Request implements ArrayAccess
|
||||
$rootDomain = $this->rootDomain();
|
||||
|
||||
if ($rootDomain) {
|
||||
$this->subDomain = rtrim(stristr($this->host(), $rootDomain, true), '.');
|
||||
$sub = stristr($this->host(), $rootDomain, true);
|
||||
$this->subDomain = $sub ? rtrim($sub, '.') : '';
|
||||
} else {
|
||||
$this->subDomain = '';
|
||||
}
|
||||
@ -878,10 +879,12 @@ class Request implements ArrayAccess
|
||||
*/
|
||||
public function all($name = '', $filter = '')
|
||||
{
|
||||
$data = array_merge($this->param(), $this->file());
|
||||
$data = array_merge($this->param(), $this->file() ?: []);
|
||||
|
||||
if (is_array($name)) {
|
||||
$data = $this->only($name, $data, $filter);
|
||||
} elseif ($name) {
|
||||
$data = $data[$name] ?? null;
|
||||
}
|
||||
|
||||
return $data;
|
||||
@ -1147,7 +1150,6 @@ class Request implements ArrayAccess
|
||||
{
|
||||
$files = $this->file;
|
||||
if (!empty($files)) {
|
||||
|
||||
if (strpos($name, '.')) {
|
||||
[$name, $sub] = explode('.', $name);
|
||||
}
|
||||
@ -1307,12 +1309,12 @@ class Request implements ArrayAccess
|
||||
|
||||
/**
|
||||
* 强制类型转换
|
||||
* @access public
|
||||
* @access protected
|
||||
* @param mixed $data
|
||||
* @param string $type
|
||||
* @return mixed
|
||||
*/
|
||||
private function typeCast(&$data, string $type)
|
||||
protected function typeCast(&$data, string $type)
|
||||
{
|
||||
switch (strtolower($type)) {
|
||||
// 数组
|
||||
@ -1344,7 +1346,7 @@ class Request implements ArrayAccess
|
||||
|
||||
/**
|
||||
* 获取数据
|
||||
* @access public
|
||||
* @access protected
|
||||
* @param array $data 数据源
|
||||
* @param string $name 字段名
|
||||
* @param mixed $default 默认值
|
||||
|
@ -63,7 +63,7 @@ class RunServer extends Command
|
||||
escapeshellarg($root . DIRECTORY_SEPARATOR . 'router.php')
|
||||
);
|
||||
|
||||
$output->writeln(sprintf('ThinkPHP Development server is started On <http://%s:%s/>', '0.0.0.0' == $host ? '127.0.0.1' : $host, $port));
|
||||
$output->writeln(sprintf('ThinkPHP Development server is started On <http://%s:%s/>', $host, $port));
|
||||
$output->writeln(sprintf('You can exit with <info>`CTRL-C`</info>'));
|
||||
$output->writeln(sprintf('Document root is: %s', $root));
|
||||
passthru($command);
|
||||
|
@ -62,7 +62,7 @@ use think\route\Url as UrlBuild;
|
||||
* @method static RuleItem redirect(string $rule, string $route = '', int $status = 301) 注册重定向路由
|
||||
* @method static \think\Route rest(string|array $name, array|bool $resource = []) rest方法定义和修改
|
||||
* @method static array|null getRest(string $name = null) 获取rest方法定义的参数
|
||||
* @method static RuleItem miss(string|Closure $route, string $method = '*') 注册未匹配路由规则后的处理
|
||||
* @method static RuleItem miss(string|\Closure $route, string $method = '*') 注册未匹配路由规则后的处理
|
||||
* @method static Response dispatch(\think\Request $request, Closure|bool $withRoute = true) 路由调度
|
||||
* @method static Dispatch|false check() 检测URL路由
|
||||
* @method static Dispatch url(string $url) 默认URL解析
|
||||
|
@ -42,6 +42,12 @@ class ModelService extends Service
|
||||
$model->setDateFormat($config->get('database.datetime_format', 'Y-m-d H:i:s'));
|
||||
}
|
||||
|
||||
$timeField = $config->get('database.datetime_field');
|
||||
if (!empty($timeField)) {
|
||||
[$createTime, $updateTime] = explode(',', $timeField);
|
||||
$model->setTimeField($createTime, $updateTime);
|
||||
}
|
||||
|
||||
});
|
||||
}
|
||||
}
|
||||
|
20
vendor/topthink/think-helper/src/Collection.php
vendored
20
vendor/topthink/think-helper/src/Collection.php
vendored
@ -242,15 +242,17 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
|
||||
* @access public
|
||||
* @param mixed $value 元素
|
||||
* @param string $key KEY
|
||||
* @return void
|
||||
* @return $this
|
||||
*/
|
||||
public function push($value, string $key = null): void
|
||||
public function push($value, string $key = null)
|
||||
{
|
||||
if (is_null($key)) {
|
||||
$this->items[] = $value;
|
||||
} else {
|
||||
$this->items[$key] = $value;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -277,15 +279,17 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
|
||||
* @access public
|
||||
* @param mixed $value 元素
|
||||
* @param string $key KEY
|
||||
* @return void
|
||||
* @return $this
|
||||
*/
|
||||
public function unshift($value, string $key = null): void
|
||||
public function unshift($value, string $key = null)
|
||||
{
|
||||
if (is_null($key)) {
|
||||
array_unshift($this->items, $value);
|
||||
} else {
|
||||
$this->items = [$key => $value] + $this->items;
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -477,7 +481,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
|
||||
* @param string|null $indexKey 作为索引值的列
|
||||
* @return array
|
||||
*/
|
||||
public function column(?string $columnKey, string $indexKey = null)
|
||||
public function column( ? string $columnKey, string $indexKey = null)
|
||||
{
|
||||
return array_column($this->items, $columnKey, $indexKey);
|
||||
}
|
||||
@ -515,7 +519,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
|
||||
$fieldA = $a[$field] ?? null;
|
||||
$fieldB = $b[$field] ?? null;
|
||||
|
||||
return 'desc' == strtolower($order) ? $fieldB > $fieldA : $fieldA > $fieldB;
|
||||
return 'desc' == strtolower($order) ? intval($fieldB > $fieldA) : intval($fieldA > $fieldB);
|
||||
});
|
||||
}
|
||||
|
||||
@ -535,7 +539,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取最第一个单元数据
|
||||
* 获取第一个单元数据
|
||||
*
|
||||
* @access public
|
||||
* @param callable|null $callback
|
||||
@ -623,7 +627,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
|
||||
* @param integer $options json参数
|
||||
* @return string
|
||||
*/
|
||||
public function toJson(int $options = JSON_UNESCAPED_UNICODE): string
|
||||
public function toJson(int $options = JSON_UNESCAPED_UNICODE) : string
|
||||
{
|
||||
return json_encode($this->toArray(), $options);
|
||||
}
|
||||
|
2
vendor/topthink/think-orm/src/DbManager.php
vendored
2
vendor/topthink/think-orm/src/DbManager.php
vendored
@ -364,7 +364,7 @@ class DbManager
|
||||
{
|
||||
if (isset($this->event[$event])) {
|
||||
foreach ($this->event[$event] as $callback) {
|
||||
call_user_func_array($callback, [$this]);
|
||||
call_user_func_array($callback, [$params]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
2
vendor/topthink/think-orm/src/Paginator.php
vendored
2
vendor/topthink/think-orm/src/Paginator.php
vendored
@ -175,7 +175,7 @@ abstract class Paginator implements ArrayAccess, Countable, IteratorAggregate, J
|
||||
$path = $this->options['path'];
|
||||
} else {
|
||||
$parameters = [];
|
||||
$path = str_replace('[PAGE]', $page, $this->options['path']);
|
||||
$path = str_replace('[PAGE]', (string) $page, $this->options['path']);
|
||||
}
|
||||
|
||||
if (count($this->options['query']) > 0) {
|
||||
|
@ -621,7 +621,7 @@ abstract class BaseQuery
|
||||
|
||||
$bind = $this->bind;
|
||||
$total = $this->count();
|
||||
$results = $this->options($options)->bind($bind)->page($page, $listRows)->select();
|
||||
$results = $total > 0 ? $this->options($options)->bind($bind)->page($page, $listRows)->select() : [];
|
||||
} elseif ($simple) {
|
||||
$results = $this->limit(($page - 1) * $listRows, $listRows + 1)->select();
|
||||
$total = null;
|
||||
@ -1075,7 +1075,7 @@ abstract class BaseQuery
|
||||
* 查找记录
|
||||
* @access public
|
||||
* @param mixed $data 数据
|
||||
* @return Collection
|
||||
* @return Collection|array|static[]
|
||||
* @throws Exception
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
@ -1109,7 +1109,7 @@ abstract class BaseQuery
|
||||
* 查找单条记录
|
||||
* @access public
|
||||
* @param mixed $data 查询数据
|
||||
* @return array|Model|null
|
||||
* @return array|Model|null|static
|
||||
* @throws Exception
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
|
4
vendor/topthink/think-orm/src/db/Builder.php
vendored
4
vendor/topthink/think-orm/src/db/Builder.php
vendored
@ -969,8 +969,8 @@ abstract class Builder
|
||||
$sort = in_array($sort, ['ASC', 'DESC'], true) ? ' ' . $sort : '';
|
||||
$bind = $query->getFieldsBindType();
|
||||
|
||||
foreach ($val as $item) {
|
||||
$val[] = $this->parseDataBind($query, $key, $item, $bind);
|
||||
foreach ($val as $k => $item) {
|
||||
$val[$k] = $this->parseDataBind($query, $key, $item, $bind);
|
||||
}
|
||||
|
||||
return 'field(' . $this->parseKey($query, $key, true) . ',' . implode(',', $val) . ')' . $sort;
|
||||
|
@ -16,6 +16,7 @@ use Closure;
|
||||
use PDO;
|
||||
use PDOStatement;
|
||||
use think\db\exception\BindParamException;
|
||||
use think\db\exception\DbEventException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\PDOException;
|
||||
use think\Model;
|
||||
@ -865,18 +866,18 @@ abstract class PDOConnection extends Connection
|
||||
public function find(BaseQuery $query): array
|
||||
{
|
||||
// 事件回调
|
||||
$result = $this->db->trigger('before_find', $query);
|
||||
try {
|
||||
$this->db->trigger('before_find', $query);
|
||||
} catch (DbEventException $e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
if (!$result) {
|
||||
// 执行查询
|
||||
$resultSet = $this->pdoQuery($query, function ($query) {
|
||||
return $this->builder->select($query, true);
|
||||
});
|
||||
|
||||
$result = $resultSet[0] ?? [];
|
||||
}
|
||||
|
||||
return $result;
|
||||
return $resultSet[0] ?? [];
|
||||
}
|
||||
|
||||
/**
|
||||
@ -908,16 +909,16 @@ abstract class PDOConnection extends Connection
|
||||
*/
|
||||
public function select(BaseQuery $query): array
|
||||
{
|
||||
$resultSet = $this->db->trigger('before_select', $query);
|
||||
|
||||
if (!$resultSet) {
|
||||
// 执行查询操作
|
||||
$resultSet = $this->pdoQuery($query, function ($query) {
|
||||
return $this->builder->select($query);
|
||||
});
|
||||
try {
|
||||
$this->db->trigger('before_select', $query);
|
||||
} catch (DbEventException $e) {
|
||||
return [];
|
||||
}
|
||||
|
||||
return $resultSet;
|
||||
// 执行查询操作
|
||||
return $this->pdoQuery($query, function ($query) {
|
||||
return $this->builder->select($query);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1158,7 +1159,7 @@ abstract class PDOConnection extends Connection
|
||||
|
||||
$field = $aggregate . '(' . (!empty($distinct) ? 'DISTINCT ' : '') . $this->builder->parseKey($query, $field, true) . ') AS think_' . strtolower($aggregate);
|
||||
|
||||
$result = $this->value($query, $field, 0, false);
|
||||
$result = $this->value($query, $field, 0);
|
||||
|
||||
return $force ? (float) $result : $result;
|
||||
}
|
||||
@ -1448,7 +1449,7 @@ abstract class PDOConnection extends Connection
|
||||
}
|
||||
$this->reConnectTimes = 0;
|
||||
} catch (\Throwable | \Exception $e) {
|
||||
if ($this->transTimes === 1 && $this->reConnectTimes < 4 && $this->isBreak($e)) {
|
||||
if (1 === $this->transTimes && $this->reConnectTimes < 4 && $this->isBreak($e)) {
|
||||
--$this->transTimes;
|
||||
++$this->reConnectTimes;
|
||||
$this->close()->startTrans();
|
||||
|
@ -149,7 +149,7 @@ trait ResultOperation
|
||||
/**
|
||||
* 处理空数据
|
||||
* @access protected
|
||||
* @return array|Model|null
|
||||
* @return array|Model|null|static
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
@ -167,7 +167,7 @@ trait ResultOperation
|
||||
* 查找单条记录 不存在返回空数据(或者空模型)
|
||||
* @access public
|
||||
* @param mixed $data 数据
|
||||
* @return array|Model
|
||||
* @return array|Model|static
|
||||
*/
|
||||
public function findOrEmpty($data = null)
|
||||
{
|
||||
@ -226,7 +226,9 @@ trait ResultOperation
|
||||
* 查找多条记录 如果不存在则抛出异常
|
||||
* @access public
|
||||
* @param array|string|Query|Closure $data 数据
|
||||
* @return array|Model
|
||||
* @return array|Collection|static[]
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
*/
|
||||
public function selectOrFail($data = null)
|
||||
{
|
||||
@ -237,7 +239,9 @@ trait ResultOperation
|
||||
* 查找单条记录 如果不存在则抛出异常
|
||||
* @access public
|
||||
* @param array|string|Query|Closure $data 数据
|
||||
* @return array|Model
|
||||
* @return array|Model|static
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
*/
|
||||
public function findOrFail($data = null)
|
||||
{
|
||||
|
19
vendor/topthink/think-orm/src/db/exception/DbEventException.php
vendored
Normal file
19
vendor/topthink/think-orm/src/db/exception/DbEventException.php
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK IT ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: yunwuxin <448901948@qq.com>
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace think\db\exception;
|
||||
|
||||
/**
|
||||
* Db事件异常
|
||||
*/
|
||||
class DbEventException extends DbException
|
||||
{
|
||||
}
|
22
vendor/topthink/think-orm/src/model/Relation.php
vendored
22
vendor/topthink/think-orm/src/model/Relation.php
vendored
@ -79,6 +79,12 @@ abstract class Relation
|
||||
*/
|
||||
protected $withField;
|
||||
|
||||
/**
|
||||
* 排除关联数据字段
|
||||
* @var array
|
||||
*/
|
||||
protected $withoutField;
|
||||
|
||||
/**
|
||||
* 获取关联的所属模型
|
||||
* @access public
|
||||
@ -236,6 +242,22 @@ abstract class Relation
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排除关联数据的字段
|
||||
* @access public
|
||||
* @param array|string $field 关联字段限制
|
||||
* @return $this
|
||||
*/
|
||||
public function withoutField($field)
|
||||
{
|
||||
if (is_string($field)) {
|
||||
$field = array_map('trim', explode(',', $field));
|
||||
}
|
||||
|
||||
$this->withoutField = $field;
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断闭包的参数类型
|
||||
* @access protected
|
||||
|
@ -496,8 +496,10 @@ trait Attribute
|
||||
$value = $this->getJsonValue($fieldName, $value);
|
||||
} else {
|
||||
$closure = $this->withAttr[$fieldName];
|
||||
if ($closure instanceof \Closure) {
|
||||
$value = $closure($value, $this->data);
|
||||
}
|
||||
}
|
||||
} elseif (method_exists($this, $method)) {
|
||||
if ($relation) {
|
||||
$value = $this->getRelationValue($relation);
|
||||
|
@ -74,7 +74,7 @@ trait ModelEvent
|
||||
if (method_exists(static::class, $call)) {
|
||||
$result = call_user_func([static::class, $call], $this);
|
||||
} elseif (is_object(self::$event) && method_exists(self::$event, 'trigger')) {
|
||||
$result = self::$event->trigger(static::class . '.' . $event, $this);
|
||||
$result = self::$event->trigger('model.' . static::class . '.' . $event, $this);
|
||||
$result = empty($result) ? true : end($result);
|
||||
} else {
|
||||
$result = true;
|
||||
|
@ -151,8 +151,16 @@ trait SoftDelete
|
||||
*/
|
||||
public static function destroy($data, bool $force = false): bool
|
||||
{
|
||||
// 包含软删除数据
|
||||
$query = (new static())->withTrashedData(true)->db(false);
|
||||
// 传入空值(包括空字符串和空数组)的时候不会做任何的数据删除操作,但传入0则是有效的
|
||||
if(empty($data) && $data !== 0){
|
||||
return false;
|
||||
}
|
||||
// 仅当强制删除时包含软删除数据
|
||||
$model = (new static());
|
||||
if($force){
|
||||
$model->withTrashedData(true);
|
||||
}
|
||||
$query = $model->db(false);
|
||||
|
||||
if (is_array($data) && key($data) !== 0) {
|
||||
$query->where($data);
|
||||
|
@ -77,6 +77,21 @@ trait TimeStamp
|
||||
return $type;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置时间字段名称
|
||||
* @access public
|
||||
* @param string $createTime
|
||||
* @param string $updateTime
|
||||
* @return $this
|
||||
*/
|
||||
public function setTimeField(string $createTime, string $updateTime)
|
||||
{
|
||||
$this->createTime = $createTime;
|
||||
$this->updateTime = $updateTime;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取自动写入时间字段
|
||||
* @access public
|
||||
|
90
vendor/topthink/think-orm/src/model/concern/Virtual.php
vendored
Normal file
90
vendor/topthink/think-orm/src/model/concern/Virtual.php
vendored
Normal file
@ -0,0 +1,90 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2006~2019 http://thinkphp.cn All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: liu21st <liu21st@gmail.com>
|
||||
// +----------------------------------------------------------------------
|
||||
declare (strict_types = 1);
|
||||
|
||||
namespace think\model\concern;
|
||||
|
||||
use think\db\BaseQuery as Query;
|
||||
use think\db\exception\DbException as Exception;
|
||||
|
||||
/**
|
||||
* 虚拟模型
|
||||
*/
|
||||
trait Virtual
|
||||
{
|
||||
/**
|
||||
* 获取当前模型的数据库查询对象
|
||||
* @access public
|
||||
* @param array $scope 设置不使用的全局查询范围
|
||||
* @return Query
|
||||
*/
|
||||
public function db($scope = []): Query
|
||||
{
|
||||
throw new Exception('virtual model not support db query');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字段类型信息
|
||||
* @access public
|
||||
* @param string $field 字段名
|
||||
* @return string|null
|
||||
*/
|
||||
public function getFieldType(string $field)
|
||||
{}
|
||||
|
||||
/**
|
||||
* 保存当前数据对象
|
||||
* @access public
|
||||
* @param array $data 数据
|
||||
* @param string $sequence 自增序列名
|
||||
* @return bool
|
||||
*/
|
||||
public function save(array $data = [], string $sequence = null): bool
|
||||
{
|
||||
// 数据对象赋值
|
||||
$this->setAttrs($data);
|
||||
|
||||
if ($this->isEmpty() || false === $this->trigger('BeforeWrite')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 写入回调
|
||||
$this->trigger('AfterWrite');
|
||||
|
||||
$this->exists(true);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除当前的记录
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function delete(): bool
|
||||
{
|
||||
if (!$this->isExists() || $this->isEmpty() || false === $this->trigger('BeforeDelete')) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// 关联删除
|
||||
if (!empty($this->relationWrite)) {
|
||||
$this->autoRelationDelete();
|
||||
}
|
||||
|
||||
$this->trigger('AfterDelete');
|
||||
|
||||
$this->exists(false);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
@ -443,6 +443,11 @@ class BelongsToMany extends Relation
|
||||
if (empty($this->baseQuery)) {
|
||||
$tableName = $this->query->getTable();
|
||||
$table = $this->pivot->db()->getTable();
|
||||
|
||||
if ($this->withoutField) {
|
||||
$this->query->withoutField($this->withoutField);
|
||||
}
|
||||
|
||||
$fields = $this->getQueryFields($tableName);
|
||||
|
||||
if ($this->withLimit) {
|
||||
|
@ -206,6 +206,10 @@ class HasMany extends Relation
|
||||
$closure($this->getClosureType($closure));
|
||||
}
|
||||
|
||||
if ($this->withoutField) {
|
||||
$this->query->withoutField($this->withoutField);
|
||||
}
|
||||
|
||||
$list = $this->query
|
||||
->where($where)
|
||||
->cache($cache[0] ?? false, $cache[1] ?? null, $cache[2] ?? null)
|
||||
|
@ -366,6 +366,11 @@ class HasManyThrough extends Relation
|
||||
$pk = $this->throughPk;
|
||||
$throughKey = $this->throughKey;
|
||||
$modelTable = $this->parent->getTable();
|
||||
|
||||
if ($this->withoutField) {
|
||||
$this->query->withoutField($this->withoutField);
|
||||
}
|
||||
|
||||
$fields = $this->getQueryFields($alias);
|
||||
|
||||
$this->query
|
||||
|
@ -200,6 +200,11 @@ class MorphToMany extends BelongsToMany
|
||||
// 关联查询封装
|
||||
$tableName = $this->query->getTable();
|
||||
$table = $this->pivot->db()->getTable();
|
||||
|
||||
if ($this->withoutField) {
|
||||
$this->query->withoutField($this->withoutField);
|
||||
}
|
||||
|
||||
$fields = $this->getQueryFields($tableName);
|
||||
|
||||
if ($this->withLimit) {
|
||||
|
@ -305,6 +305,8 @@ abstract class OneToOne extends Relation
|
||||
|
||||
if ($this->withField) {
|
||||
$this->query->field($this->withField);
|
||||
} elseif ($this->withoutField) {
|
||||
$this->query->withoutField($this->withoutField);
|
||||
}
|
||||
|
||||
$list = $this->query
|
||||
|
Loading…
x
Reference in New Issue
Block a user