mirror of https://github.com/1099438829/apeblog
Compare commits
7 Commits
f74d500055
...
a284ab8feb
| Author | SHA1 | Date |
|---|---|---|
|
|
a284ab8feb | |
|
|
903c3a4494 | |
|
|
b660d17646 | |
|
|
098c3d972f | |
|
|
df52b6c56c | |
|
|
6baa1003bf | |
|
|
fd2b715e0c |
|
|
@ -4,8 +4,8 @@ namespace app\admin\controller;
|
|||
|
||||
use app\admin\extend\FormBuilder as Form;
|
||||
use app\admin\extend\Util as Util;
|
||||
use app\common\model\Admin as aModel;
|
||||
use app\common\model\AdminRole as rModel;
|
||||
use app\admin\model\Admin as aModel;
|
||||
use app\admin\model\AdminRole as rModel;
|
||||
use app\common\model\User as userModel;
|
||||
use app\Request;
|
||||
use FormBuilder\Exception\FormBuilderException;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ namespace app\admin\controller;
|
|||
|
||||
use app\admin\extend\FormBuilder as Form;
|
||||
use app\admin\extend\Util as Util;
|
||||
use app\common\model\AdminAuth as aModel;
|
||||
use app\admin\model\AdminAuth as aModel;
|
||||
use app\Request;
|
||||
use Exception;
|
||||
use FormBuilder\Exception\FormBuilderException;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\extend\Util as Util;
|
||||
use app\common\model\AdminLog as lModel;
|
||||
use app\admin\model\AdminLog as lModel;
|
||||
use app\Request;
|
||||
use Exception;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\extend\Util as Util;
|
||||
use app\common\model\AdminNotify as nModel;
|
||||
use app\admin\model\AdminNotify as nModel;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@ namespace app\admin\controller;
|
|||
|
||||
use app\admin\extend\FormBuilder as Form;
|
||||
use app\admin\extend\Util as Util;
|
||||
use app\common\model\AdminAuth as aModel;
|
||||
use app\common\model\AdminRole as rModel;
|
||||
use app\admin\model\AdminAuth as aModel;
|
||||
use app\admin\model\AdminRole as rModel;
|
||||
use app\Request;
|
||||
use FormBuilder\Exception\FormBuilderException;
|
||||
use FormBuilder\Factory\Elm;
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\model\AdminAuth;
|
||||
use app\common\constant\Data;
|
||||
use app\common\model\AdminAuth;
|
||||
use think\facade\App;
|
||||
use think\facade\Lang;
|
||||
use think\facade\Session;
|
||||
|
|
@ -135,7 +135,7 @@ abstract class AuthController extends SystemBasic
|
|||
* 记录日志
|
||||
* @return bool
|
||||
*/
|
||||
protected function createLog()
|
||||
protected function createLog(): bool
|
||||
{
|
||||
// 不需要登录不能记录日志
|
||||
if (in_array($this->action, $this->noNeedLogin) || $this->noNeedLogin == ['*'] || $this->noNeedLogin == "*") return true;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,4 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | HulaCWMS 呼啦企业网站管理系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2021 https://www.kaifashu.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 开发树
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\controller;
|
||||
|
||||
|
|
|
|||
|
|
@ -122,8 +122,8 @@ class Image extends AuthController
|
|||
public function delCategory($id)
|
||||
{
|
||||
if ($id == 0) return app("json")->fail("未选择分类");
|
||||
if (Attachment::be($id, "cid")) return app("json")->fail("该分类下有图片不能删除");
|
||||
if (AttachmentCategory::be($id, "pid")) return app("json")->fail("该分类下有子分类不能删除");
|
||||
if (Attachment::isExist($id, "cid")) return app("json")->fail("该分类下有图片不能删除");
|
||||
if (AttachmentCategory::isExist($id, "pid")) return app("json")->fail("该分类下有子分类不能删除");
|
||||
return AttachmentCategory::del($id) ? app("json")->success("删除成功") : app("json")->fail("删除失败");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2,22 +2,11 @@
|
|||
|
||||
namespace app\admin\controller;
|
||||
|
||||
use app\common\model\AdminAuth;
|
||||
use app\common\model\Document;
|
||||
use app\common\model\Document as DocumentModel;
|
||||
use app\common\model\Tag as TagModel;
|
||||
use app\common\model\DocumentCategory;
|
||||
use app\common\model\DocumentCategory as DocumentCategoryModel;
|
||||
use app\common\model\FriendLink;
|
||||
use app\common\model\MessageForm;
|
||||
use app\common\model\AdminNotify;
|
||||
use app\common\model\Tag;
|
||||
use app\common\model\User;
|
||||
use app\admin\model\AdminAuth;
|
||||
use app\admin\model\AdminNotify;
|
||||
use app\common\model\{Document, FriendLink, MessageForm, User};
|
||||
use Exception;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\facade\Request;
|
||||
use think\db\exception\{DataNotFoundException, DbException, ModelNotFoundException};
|
||||
|
||||
class Index extends AuthController
|
||||
{
|
||||
|
|
@ -29,14 +18,8 @@ class Index extends AuthController
|
|||
public function index()
|
||||
{
|
||||
$this->assign("adminInfo", $this->adminInfo);
|
||||
$menuList = cache(AdminAuth::getMenuCacheKey($this->adminId));
|
||||
if ($menuList === null) {
|
||||
$menuList = AdminAuth::getMenu(0, $this->auth);
|
||||
cache(AdminAuth::getMenuCacheKey($this->adminId), $menuList, 1 * 60 * 60);
|
||||
}
|
||||
$this->assign("menu", $menuList);
|
||||
$messageList = AdminNotify::pageList(5);
|
||||
$this->assign("message", $messageList);
|
||||
$this->assign("menu", AdminAuth::getAuthList($this->adminId,$this->auth));
|
||||
$this->assign("message", AdminNotify::pageList(5));
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
|
@ -47,20 +30,11 @@ class Index extends AuthController
|
|||
*/
|
||||
public function main()
|
||||
{
|
||||
$documentCount = Document::counts(new Document());
|
||||
$this->assign("document_count", $documentCount);
|
||||
$userCount = User::counts(new User());
|
||||
$this->assign("user_count", $userCount);
|
||||
$FriendLinkCount = FriendLink::counts(new FriendLink());
|
||||
$this->assign("friend_link_count", $FriendLinkCount);
|
||||
$messageFormCount = MessageForm::counts(new MessageForm());
|
||||
$this->assign("message_form_count", $messageFormCount);
|
||||
$data =[
|
||||
"page"=> 0 ,
|
||||
"limit" => 5
|
||||
];
|
||||
$articleList = Document::systemPage($data)['data'];
|
||||
$this->assign("article_list", $articleList);
|
||||
$this->assign("document_count", (new Document)->count());
|
||||
$this->assign("user_count", (new User())->count());
|
||||
$this->assign("friend_link_count",(new FriendLink())->count());
|
||||
$this->assign("message_form_count", (new MessageForm())->count());
|
||||
$this->assign("article_list", Document::systemPage(["page"=> 0 ,"limit" => 5])['data']);
|
||||
return $this->fetch();
|
||||
}
|
||||
|
||||
|
|
@ -72,11 +46,6 @@ class Index extends AuthController
|
|||
*/
|
||||
public function menu()
|
||||
{
|
||||
$menuList = cache(AdminAuth::getMenuCacheKey($this->adminId));
|
||||
if ($menuList === null) {
|
||||
$menuList = AdminAuth::getMenu(0, $this->auth);
|
||||
cache(AdminAuth::getMenuCacheKey($this->adminId), $menuList, 1 * 60 * 60);
|
||||
}
|
||||
return app("json")->success($menuList);
|
||||
return app("json")->success(AdminAuth::getAuthList($this->adminId,$this->auth));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
namespace app\admin\controller;
|
||||
|
||||
use app\admin\extend\Util as Util;
|
||||
use app\common\model\Admin as adminModel;
|
||||
use app\admin\model\Admin as adminModel;
|
||||
use Exception;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\admin\model;
|
||||
|
||||
use app\common\constant\Data;
|
||||
use app\common\model\BaseModel;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
|
|
@ -78,7 +79,7 @@ class Admin extends BaseModel
|
|||
if ($where['tel'] != '') $model = $model->where("tel|mail", "like", "%$where[tel]%");
|
||||
if ($where['status'] != '') $model = $model->where("status", $where['status']);
|
||||
if ($where['role_id'] != '') $model = $model->where("role_id", $where['role_id']);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select()->each(function ($item) {
|
||||
unset($item['password']);
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\admin\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
|
|
@ -40,6 +41,24 @@ class AdminAuth extends BaseModel
|
|||
return $authList[$module . '_' . $controller . '_' . $action] ?? -1;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取用户权限列表
|
||||
* @param $admin_id
|
||||
* @param $auth
|
||||
* @return array|mixed|object|\think\App
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
* @throws ModelNotFoundException
|
||||
*/
|
||||
public static function getAuthList($admin_id,$auth){
|
||||
$menuList = cache(self::getMenuCacheKey($admin_id));
|
||||
if ($menuList === null) {
|
||||
$menuList = self::getMenu(0, $auth);
|
||||
cache(AdminAuth::getMenuCacheKey($admin_id), $menuList, 1 * 60 * 60);
|
||||
}
|
||||
return $menuList;
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取菜单
|
||||
* @param int $pid
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\admin\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\db\exception\DbException;
|
||||
|
||||
/**
|
||||
|
|
@ -50,7 +51,7 @@ class AdminLog extends BaseModel
|
|||
if ($where['ip'] != '') $model = $model->where('ip', "like", "%$where[ip]%");
|
||||
if ($where['start_time'] != '') $model = $model->where('create_time', '>', strtotime($where['start_time'] . " 00:00:00"));
|
||||
if ($where['end_time'] != '') $model = $model->where('create_time', '<', strtotime($where['end_time'] . " 23:59:59"));
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if (!empty($where['page']) && !empty($where['limit'])) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select()->each(function ($item) {
|
||||
$item['name'] = AdminAuth::getNameByAction($item['module'], $item['controller'], $item['action']);
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\admin\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
|
|
@ -58,7 +59,7 @@ class AdminNotify extends BaseModel
|
|||
{
|
||||
$model = new self;
|
||||
$model = $model->where("is_read", 0);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
$model = $model->order("create_time desc");
|
||||
$model = $model->page(1, $num);
|
||||
$data = $model->select();
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
<?php
|
||||
|
||||
|
||||
namespace app\common\model;
|
||||
namespace app\admin\model;
|
||||
|
||||
|
||||
use app\common\model\BaseModel;
|
||||
use FormBuilder\Factory\Elm;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
namespace app\admin\subscribes;
|
||||
|
||||
use app\common\model\AdminLog;
|
||||
use app\admin\model\AdminLog;
|
||||
|
||||
/**
|
||||
* 操作员日志记录
|
||||
|
|
|
|||
|
|
@ -69,22 +69,6 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="card-header"><h4>常用功能</h4></div>
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="example-box">
|
||||
<div class="col-sm-3 col-md-2">
|
||||
<a class="btn btn-primary btn-w-md" href="{:url('index/sitemap')}" type="button">网站地图</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
|
|
|
|||
|
|
@ -30,52 +30,5 @@ class Base extends BaseController
|
|||
protected function initialize()
|
||||
{
|
||||
parent::initialize();
|
||||
|
||||
$this->userInfo = Session::get(Data::SESSION_KEY_USER_INFO);
|
||||
$this->userId = Session::get(Data::SESSION_KEY_USER_ID);
|
||||
|
||||
if ($this->userId){
|
||||
//模板兼容性标签
|
||||
$this->assign('user_info', $this->userInfo);
|
||||
$this->assign('user_id', $this->userId);
|
||||
}
|
||||
//判断是否关闭站点。
|
||||
if (web_config('web_close')==1) {
|
||||
$this->error('网站暂时关闭!', '', 'stop');
|
||||
}
|
||||
//判断后台统计配置是否开启 1 开启
|
||||
if (web_config("web_statistics") == 1) {
|
||||
//pv表 zz_pv_log 栏目存在 点击进入页面后
|
||||
$pvLogModel = new PvLog();
|
||||
$pvLogModel->set_view();
|
||||
}
|
||||
cache(Data::CURR_CATEGORY_PATENT_ID, false);
|
||||
//模板兼容性标签
|
||||
$this->assign('id', false);
|
||||
$this->assign('cid', false);
|
||||
|
||||
//获取根域名
|
||||
//判断是否开启了伪静态
|
||||
// if (web_config('web_rewrite')=='0') {
|
||||
// $this->request->setRoot('/?s=');
|
||||
// } elseif(web_config('web_rewrite')=='1') {
|
||||
// $this->request->setRoot('/');
|
||||
// } else {
|
||||
// $this->request->setRoot('/index.php');
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* url 统计
|
||||
* @param $title
|
||||
* @author 木子的忧伤
|
||||
* @date 2021-05-09 23:44
|
||||
*/
|
||||
protected function urlrecord($title)
|
||||
{
|
||||
$urlLogModel = new UrlLog();
|
||||
//获取url
|
||||
$urlInfo = $this->request->url(true);
|
||||
$urlLogModel->set_url($title, $urlInfo);
|
||||
}
|
||||
}
|
||||
|
|
@ -10,7 +10,7 @@ use app\common\constant\Data;
|
|||
* Class Index
|
||||
* @package app\index\controller
|
||||
*/
|
||||
class Index extends AuthController
|
||||
class Index extends Base
|
||||
{
|
||||
/**
|
||||
* 入口跳转链接
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class Advert extends BaseModel
|
|||
if ($where['start_time'] != '') $model = $model->where("create_time", ">", strtotime($where['start_time'] . " 00:00:00"));
|
||||
if ($where['end_time'] != '') $model = $model->where("create_time", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
if ($where['status'] != '') $model = $model->where("status", $where['status']);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select()->each(function ($item) {
|
||||
if (!empty($item->pic)) {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class AdvertInfo extends BaseModel
|
|||
if ($where['start_time'] != '') $model = $model->where("create_time", ">", strtotime($where['start_time'] . " 00:00:00"));
|
||||
if ($where['end_time'] != '') $model = $model->where("create_time", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
if ($where['status'] != '') $model = $model->where("status", $where['status']);
|
||||
$count = self::counts($model);
|
||||
$count = $model->count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select()->each(function ($item) {
|
||||
if (!empty($item->pic)) {
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class Attachment extends BaseModel
|
|||
{
|
||||
$model = self::where("type", $where['type']);
|
||||
if ($where['cid'] != "") $model = $model->where("cid", $where['cid']);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
$model = $model->order("id desc");
|
||||
$model = $model->field("id,path");
|
||||
$data = $model->page((int)$where['page'], (int)$where['limit'])->select();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class Comment extends BaseModel
|
|||
if (isset($where['tel']) && $where['tel'] !== '') $model->where('tel', "like", "%$where[tel]%");
|
||||
if (isset($where['start_time']) && $where['start_time'] != '') $model = $model->where("m.created_at", ">", strtotime($where['start_time'] . " 00:00:00"));
|
||||
if (isset($where['end_time']) && $where['end_time'] != '') $model = $model->where("m.created_at", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ class Document extends BaseModel
|
|||
if (!empty($where['end_time'])) $model = $model->where("create_time", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
if (!empty($where['status'])) $model = $model->where("status", $where['status']);
|
||||
$model = $model->order("sort desc")->order("id desc");
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$categoryList = DocumentCategory::column('title', 'id');
|
||||
$data = $model->select()->each(function ($item) use ($categoryList) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ class DocumentProduct extends BaseModel
|
|||
public static function systemPage($where): array
|
||||
{
|
||||
$model = new self;
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ class FriendLink extends BaseModel
|
|||
if ($where['start_time'] != '') $model = $model->where("create_time", ">", strtotime($where['start_time'] . " 00:00:00"));
|
||||
if ($where['end_time'] != '') $model = $model->where("create_time", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
if ($where['status'] != '') $model = $model->where("status", $where['status']);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class InvitationCode extends BaseModel
|
|||
$model = new self;
|
||||
$model = $model->order('id', 'desc');
|
||||
if (isset($where['code']) && $where['code'] !== '') $model->where('code', "like", "%$where[code]%");
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class MessageForm extends BaseModel
|
|||
if (isset($where['tel']) && $where['tel'] !== '') $model->where('tel', "like", "%$where[tel]%");
|
||||
if (isset($where['start_time']) && $where['start_time'] != '') $model = $model->where("m.created_at", ">", strtotime($where['start_time'] . " 00:00:00"));
|
||||
if (isset($where['end_time']) && $where['end_time'] != '') $model = $model->where("m.created_at", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@
|
|||
namespace app\common\model;
|
||||
|
||||
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\db\Raw;
|
||||
use think\Model;
|
||||
|
||||
|
|
@ -25,18 +28,28 @@ trait ModelTrait
|
|||
return $this->error;
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws DataNotFoundException
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DbException
|
||||
*/
|
||||
public static function get($where)
|
||||
{
|
||||
if (!is_array($where)) {
|
||||
return self::find($where);
|
||||
return (new BaseModel)->find($where);
|
||||
} else {
|
||||
return self::where($where)->find();
|
||||
return (new BaseModel)->where($where)->find();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws ModelNotFoundException
|
||||
* @throws DataNotFoundException
|
||||
* @throws DbException
|
||||
*/
|
||||
public static function all($function)
|
||||
{
|
||||
$query = self::newQuery();
|
||||
$query = (new BaseModel)->newQuery();
|
||||
$function($query);
|
||||
return $query->select();
|
||||
}
|
||||
|
|
@ -45,11 +58,11 @@ trait ModelTrait
|
|||
* 添加多条数据
|
||||
* @param $group
|
||||
* @param bool $replace
|
||||
* @return mixed
|
||||
* @return int
|
||||
*/
|
||||
public static function setAll($group, $replace = false)
|
||||
public static function setAll($group, bool $replace = false)
|
||||
{
|
||||
return self::insertAll($group, $replace);
|
||||
return (new BaseModel)->insertAll($group, $replace);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -59,7 +72,7 @@ trait ModelTrait
|
|||
* @param $field
|
||||
* @return bool $type 返回成功失败
|
||||
*/
|
||||
public static function edit($data, $id, $field = null)
|
||||
public static function edit($data, $id, $field = null): bool
|
||||
{
|
||||
$model = new self;
|
||||
if (!$field) $field = $model->getPk();
|
||||
|
|
@ -80,8 +93,9 @@ trait ModelTrait
|
|||
* @param $map
|
||||
* @param string $field
|
||||
* @return bool 是否存在
|
||||
* @throws DbException
|
||||
*/
|
||||
public static function be($map, $field = '')
|
||||
public static function isExist($map, $field = ''): bool
|
||||
{
|
||||
$model = (new self);
|
||||
if (!is_array($map) && empty($field)) $field = $model->getPk();
|
||||
|
|
@ -106,9 +120,9 @@ trait ModelTrait
|
|||
* @param null $eachFn 处理结果函数
|
||||
* @param array $params 分页参数
|
||||
* @param int $limit 分页数
|
||||
* @return array
|
||||
* @return ModelTrait
|
||||
*/
|
||||
public static function page($model = null, $eachFn = null, $params = [], $limit = 20)
|
||||
public static function page($model = null, $eachFn = null, $params = [], $limit = 20): ModelTrait
|
||||
{
|
||||
if (is_numeric($eachFn) && is_numeric($model)) {
|
||||
return parent::page($model, $eachFn);
|
||||
|
|
@ -178,12 +192,12 @@ trait ModelTrait
|
|||
if (!empty($fieldOr) && is_array($fieldOr) && isset($fieldOr[0])) {
|
||||
if (($count = strpos($fieldOr[0], '.')) === false) {
|
||||
if (isset($where[$fieldOr[0]]) && $where[$fieldOr[0]] != '') {
|
||||
$model = $model->where(self::get_field($fieldOr), $like, "%" . $where[$fieldOr[0]] . "%");
|
||||
$model = $model->where(self::getField($fieldOr), $like, "%" . $where[$fieldOr[0]] . "%");
|
||||
}
|
||||
} else {
|
||||
$item_l = substr($fieldOr[0], $count + 1);
|
||||
if (isset($where[$item_l]) && $where[$item_l] != '') {
|
||||
$model = $model->where(self::get_field($fieldOr), $like, "%" . $where[$item_l] . "%");
|
||||
$model = $model->where(self::getField($fieldOr), $like, "%" . $where[$item_l] . "%");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -197,7 +211,7 @@ trait ModelTrait
|
|||
* @param string $str
|
||||
* @return string
|
||||
*/
|
||||
private static function get_field($id, $str = '|')
|
||||
private static function getField($id, $str = '|')
|
||||
{
|
||||
if (is_array($id)) {
|
||||
$sql = "";
|
||||
|
|
@ -282,14 +296,14 @@ trait ModelTrait
|
|||
* 截取中文指定字节
|
||||
* @param string $str
|
||||
* @param int $utf8len
|
||||
* @param string $chaet
|
||||
* @param string $charset
|
||||
* @param string $file
|
||||
* @return string
|
||||
*/
|
||||
public static function getSubstrUTf8($str, $utf8len = 100, $chaet = 'UTF-8', $file = '....')
|
||||
public static function getSubstrUTf8($str, int $utf8len = 100, string $charset = 'UTF-8', string $file = '....'): string
|
||||
{
|
||||
if (mb_strlen($str, $chaet) > $utf8len) {
|
||||
$str = mb_substr($str, 0, $utf8len, $chaet) . $file;
|
||||
if (mb_strlen($str, $charset) > $utf8len) {
|
||||
$str = mb_substr($str, 0, $utf8len, $charset) . $file;
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
|
@ -300,7 +314,7 @@ trait ModelTrait
|
|||
* @param string $ceil
|
||||
* @return array
|
||||
*/
|
||||
public static function getMonth($time = '', $ceil = 0)
|
||||
public static function getMonth($time = '', $ceil = 0): array
|
||||
{
|
||||
if ($ceil != 0)
|
||||
$season = ceil(date('n') / 3) - $ceil;
|
||||
|
|
@ -311,68 +325,6 @@ trait ModelTrait
|
|||
return array($firstday, $lastday);
|
||||
}
|
||||
|
||||
/**
|
||||
* 高精度 加法
|
||||
* @param int|string $uid id
|
||||
* @param string $decField 相加的字段
|
||||
* @param float|int $dec 加的值
|
||||
* @param string $keyField id的字段
|
||||
* @param int $acc 精度
|
||||
* @return bool
|
||||
*/
|
||||
public static function bcInc($key, $incField, $inc, $keyField = null, $acc = 2)
|
||||
{
|
||||
if (!is_numeric($inc)) return false;
|
||||
$model = new self();
|
||||
if ($keyField === null) $keyField = $model->getPk();
|
||||
$result = self::where($keyField, $key)->find();
|
||||
if (!$result) return false;
|
||||
$new = bcadd($result[$incField], $inc, $acc);
|
||||
return false !== $model->where($keyField, $key)->update([$incField => $new]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 高精度 减法
|
||||
* @param int|string $uid id
|
||||
* @param string $decField 相减的字段
|
||||
* @param float|int $dec 减的值
|
||||
* @param string $keyField id的字段
|
||||
* @param bool $minus 是否可以为负数
|
||||
* @param int $acc 精度
|
||||
* @return bool
|
||||
*/
|
||||
public static function bcDec($key, $decField, $dec, $keyField = null, $minus = false, $acc = 2)
|
||||
{
|
||||
if (!is_numeric($dec)) return false;
|
||||
$model = new self();
|
||||
if ($keyField === null) $keyField = $model->getPk();
|
||||
$result = self::where($keyField, $key)->find();
|
||||
if (!$result) return false;
|
||||
if (!$minus && $result[$decField] < $dec) return false;
|
||||
$new = bcsub($result[$decField], $dec, $acc);
|
||||
return false !== $model->where($keyField, $key)->update([$decField => $new]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @param null $model
|
||||
* @return Model
|
||||
*/
|
||||
protected static function getSelfModel($model = null)
|
||||
{
|
||||
return $model == null ? (new self()) : $model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 数据个数
|
||||
* @param string|Raw $model
|
||||
* @return int
|
||||
*/
|
||||
public static function counts($model): int
|
||||
{
|
||||
return $model->count();
|
||||
}
|
||||
|
||||
/**
|
||||
* 横线
|
||||
* @param int $num
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class SystemConfig extends BaseModel
|
|||
{
|
||||
$model = new self;
|
||||
if ($where['tab_id']) $model = $model->where('tab_id', $where['tab_id']);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class SystemConfigTab extends BaseModel
|
|||
$model = new self;
|
||||
if ($where['status'] != "") $model = $model->where("status", $where['status']);
|
||||
if (!empty($where['name'])) $model = $model->where("name", "like", "%$where[name]%");
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if (isset($where['page']) && isset($where['limit'])) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class Tag extends BaseModel
|
|||
if ($where['document_id'] != '') $model = $model->where("document_id", $where['document_id']);
|
||||
if ($where['start_time'] != '') $model = $model->where("create_time", ">", strtotime($where['start_time'] . " 00:00:00"));
|
||||
if ($where['end_time'] != '') $model = $model->where("create_time", "<", strtotime($where['end_time'] . " 23:59:59"));
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
if ($data) $data = $data->toArray();
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@ class User extends BaseModel
|
|||
$host = Request::domain();
|
||||
//TODO 这里暂时未完成 设计是 支持模板来配置这里的任务 后台可以编辑模板这样子
|
||||
$content = "您已经成功在蓝米云注册会员,请点击以下链接完成账号激活:{$host}/forget?action=rested&key={$key}&id=20
|
||||
请在24小时内完成激活,24小时后链接地址失效,如果通过点击以上链接无法访问,请将上面的地址复制到您使用的浏览器地址中进入,如果您并没有访问过蓝米云官网,或没有进行上述操作,请忽略这封邮件!此帐号将不会绑定您的邮箱。感谢您的访问,祝您使用愉快!";
|
||||
请在24小时内完成激活,24小时后链接地址失效,如果通过点击以上链接无法访问,请将上面的地址复制到您使用的浏览器地址中进入,如果您并没有访问过蓝米云官网,或没有进行上述操作,请忽略这封邮件!此账号将不会绑定您的邮箱。感谢您的访问,祝您使用愉快!";
|
||||
$mailer = new Mailer();
|
||||
$mailer->from(system_config('title'))
|
||||
->to($info->email)
|
||||
|
|
@ -182,7 +182,7 @@ class User extends BaseModel
|
|||
if ($where['tel'] != '') $model = $model->where("tel|email", "like", "%$where[tel]%");
|
||||
if ($where['status'] != '') $model = $model->where("status", $where['status']);
|
||||
if ($where['is_admin'] != '') $model = $model->where("is_admin", $where['is_admin']);
|
||||
$count = self::counts($model);
|
||||
$count = self::count();
|
||||
if ($where['page'] && $where['limit']) $model = $model->page((int)$where['page'], (int)$where['limit']);
|
||||
$data = $model->select();
|
||||
$data = $data ? $data->toArray() : [];
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | HulaCWMS 呼啦企业网站管理系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2021 https://www.kaifashu.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 开发树
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
/**
|
||||
* 后台菜单验证器
|
||||
*/
|
||||
class MessageForm extends Validate
|
||||
{
|
||||
|
||||
protected $rule = [
|
||||
'content' => 'require',
|
||||
'tel' => 'number|max:11',
|
||||
];
|
||||
protected $message = [
|
||||
'content.require' => '请输入留言内容!',
|
||||
'tel.number' => '手机号必须是数字!',
|
||||
'tel.max' => '手机号不得超过11位!',
|
||||
];
|
||||
}
|
||||
|
|
@ -7,11 +7,13 @@ use app\common\constant\Data;
|
|||
use app\common\model\Comment as commentModel;
|
||||
use app\common\model\Document;
|
||||
use app\common\model\DocumentCategory;
|
||||
use app\index\validate\Comment;
|
||||
use app\Request;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Exception;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Log;
|
||||
|
||||
/**
|
||||
|
|
@ -56,7 +58,7 @@ class Article extends Base
|
|||
//判断后台统计配置是否开启 1 开启
|
||||
if (web_config("web_statistics") == 1) {
|
||||
//统计url
|
||||
$this->urlrecord($dc['title']);
|
||||
$this->urlRecord($dc['title']);
|
||||
}
|
||||
//读取列表页模板
|
||||
$template = Data::DOCUMENT_CATEGORY . '/' . ($dc['template'] ?: 'list_default.html');
|
||||
|
|
@ -138,7 +140,7 @@ class Article extends Base
|
|||
//判断后台统计配置是否开启 1 开启
|
||||
if (web_config("web_statistics") == 1) {
|
||||
//统计url
|
||||
$this->urlrecord($article['title']);
|
||||
$this->urlRecord($article['title']);
|
||||
}
|
||||
Log::info('详情页模板路径:' . $templateFile);
|
||||
//去除后缀
|
||||
|
|
@ -163,16 +165,19 @@ class Article extends Base
|
|||
['email', ''],
|
||||
['content', ''],
|
||||
]);
|
||||
if (!web_config('comment_close')) {
|
||||
if (!web_config('comment_close')){
|
||||
$this->error('非法操作,请检查后重试', null);
|
||||
}
|
||||
if (web_config('comment_visitor')) {
|
||||
if ($data['author'] == "") $this->error("昵称不能为空");
|
||||
if ($data['email'] == "") $this->error("邮箱不能为空");
|
||||
if ($data['url'] == "") $this->error("url不能为空");
|
||||
} else {
|
||||
$data['author'] = $this->userInfo['nickname'] ?: $this->userInfo['username'];
|
||||
$data['email'] = $this->userInfo['email'] ?: '';
|
||||
if (web_config('comment_visitor')){
|
||||
try {
|
||||
validate(Comment::class)->check($data);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
$this->error($e->getError(), null);
|
||||
}
|
||||
}elseif(web_config('is_register')){
|
||||
$data['author'] = $this->userInfo['nickname']?:$this->userInfo['username'];
|
||||
$data['email'] = $this->userInfo['email']?:'';
|
||||
$data['url'] = '';
|
||||
}
|
||||
if ($data['document_id'] == "") $this->error("文章id不能为空");
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class Base extends BaseController
|
|||
* @author 木子的忧伤
|
||||
* @date 2021-05-09 23:44
|
||||
*/
|
||||
protected function urlrecord($title)
|
||||
protected function urlRecord($title)
|
||||
{
|
||||
$urlLogModel = new UrlLog();
|
||||
//获取url
|
||||
|
|
|
|||
|
|
@ -10,7 +10,8 @@ use app\common\model\DocumentCategory as DocumentCategoryModel;
|
|||
use app\common\model\FriendLink as friendLinkModel;
|
||||
use app\common\model\MessageForm as MessageFormModel;
|
||||
use app\common\model\Tag as TagModel;
|
||||
use app\common\validate\MessageForm as MessageformValidate;
|
||||
use app\index\validate\Msg as MsgValidate;
|
||||
use app\index\validate\FriendLink as FriendLinkValidate;
|
||||
use app\Request;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
|
|
@ -33,7 +34,7 @@ class Index extends Base
|
|||
//判断后台统计配置是否开启 1 开启
|
||||
if (web_config("web_statistics") == 1) {
|
||||
//统计url
|
||||
$this->urlrecord('网站首页');
|
||||
$this->urlRecord('网站首页');
|
||||
}
|
||||
//清除可能存在的栏目分类树id
|
||||
cache(Data::CURR_CATEGORY_PATENT_ID, false);
|
||||
|
|
@ -64,8 +65,10 @@ class Index extends Base
|
|||
['description', ''],
|
||||
|
||||
]);
|
||||
if ($data['title'] == "") $this->error("链接名称不能为空");
|
||||
if ($data['url'] == "") $this->error("链接地址不能为空");
|
||||
$friendLinkValidate = new FriendLinkValidate();
|
||||
if (!$friendLinkValidate->check($data)) {
|
||||
$this->error($friendLinkValidate->getError());
|
||||
}
|
||||
//判断下用户是否存在
|
||||
$info = friendLinkModel::where('url', $data['url'])->find();
|
||||
if ($info) {
|
||||
|
|
@ -109,7 +112,7 @@ class Index extends Base
|
|||
]);
|
||||
$data['create_time'] = time();
|
||||
$data['reply_content'] = '';
|
||||
$messageFormValidate = new MessageFormValidate();
|
||||
$messageFormValidate = new MsgValidate();
|
||||
if (!$messageFormValidate->check($data)) {
|
||||
$this->error($messageFormValidate->getError());
|
||||
}
|
||||
|
|
@ -168,7 +171,7 @@ class Index extends Base
|
|||
//判断后台统计配置是否开启 1 开启
|
||||
if (web_config("web_statistics") == 1) {
|
||||
//统计url
|
||||
$this->urlrecord($article['title']);
|
||||
$this->urlRecord($article['title']);
|
||||
}
|
||||
Log::info('详情页模板路径:' . $templateFile);
|
||||
//去除后缀
|
||||
|
|
|
|||
|
|
@ -6,11 +6,13 @@ use app\admin\extend\Util as Util;
|
|||
use app\common\constant\Data;
|
||||
use app\common\model\Comment as commentModel;
|
||||
use app\common\model\Document;
|
||||
use app\index\validate\Comment;
|
||||
use app\Request;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\Exception;
|
||||
use think\exception\ValidateException;
|
||||
use think\facade\Log;
|
||||
|
||||
/**
|
||||
|
|
@ -66,7 +68,7 @@ class Page extends Base
|
|||
//判断后台统计配置是否开启 1 开启
|
||||
if (web_config("web_statistics") == 1) {
|
||||
//统计url
|
||||
$this->urlrecord($article['title']);
|
||||
$this->urlRecord($article['title']);
|
||||
}
|
||||
Log::info('详情页模板路径:' . $templateFile);
|
||||
//去除后缀
|
||||
|
|
@ -95,10 +97,13 @@ class Page extends Base
|
|||
$this->error('非法操作,请检查后重试', null);
|
||||
}
|
||||
if (web_config('comment_visitor')){
|
||||
if ($data['author'] == "") $this->error("昵称不能为空");
|
||||
if ($data['email'] == "") $this->error("邮箱不能为空");
|
||||
if ($data['url'] == "") $this->error("url不能为空");
|
||||
}else{
|
||||
try {
|
||||
validate(Comment::class)->check($data);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
$this->error($e->getError(), null);
|
||||
}
|
||||
}elseif(web_config('is_register')){
|
||||
$data['author'] = $this->userInfo['nickname']?:$this->userInfo['username'];
|
||||
$data['email'] = $this->userInfo['email']?:'';
|
||||
$data['url'] = '';
|
||||
|
|
|
|||
|
|
@ -9,11 +9,15 @@ namespace app\index\controller;
|
|||
use app\admin\extend\Util;
|
||||
use app\common\model\Document;
|
||||
use app\common\model\User as userModel;
|
||||
use app\index\validate\Comment;
|
||||
use app\index\validate\Login;
|
||||
use app\index\validate\Register;
|
||||
use Exception;
|
||||
use think\App;
|
||||
use think\db\exception\DataNotFoundException;
|
||||
use think\db\exception\DbException;
|
||||
use think\db\exception\ModelNotFoundException;
|
||||
use think\exception\ValidateException;
|
||||
use think\Response;
|
||||
|
||||
class User extends Base
|
||||
|
|
@ -49,12 +53,17 @@ class User extends Base
|
|||
*/
|
||||
public function verify()
|
||||
{
|
||||
list($username, $password, $captcha) = Util::postMore(['username', 'password', 'captcha'], null, true);
|
||||
if (empty($username) || empty($password)) return app("json")->fail("账号、密码和验证码不能为空!");
|
||||
$data = Util::postMore(['username', 'password', 'captcha'], null, true);
|
||||
try {
|
||||
validate(Login::class)->check($data);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
$this->error($e->getError(), null);
|
||||
}
|
||||
// 验证码验证
|
||||
if (!captcha_check($captcha)) return app("json")->fail("验证码不正确!");
|
||||
if (!captcha_check($data['captcha'])) return app("json")->fail("验证码不正确!");
|
||||
// 验证登录
|
||||
if (!userModel::login($username, $password)) return app("json")->fail(userModel::getErrorInfo());
|
||||
if (!userModel::login($data['username'], $data['password'])) return app("json")->fail(userModel::getErrorInfo());
|
||||
return app("json")->success("登录成功!");
|
||||
}
|
||||
|
||||
|
|
@ -77,16 +86,21 @@ class User extends Base
|
|||
*/
|
||||
public function register_verify()
|
||||
{
|
||||
list($username, $email, $password, $captcha) = Util::postMore(['username', 'email', 'password', 'captcha'], null, true);
|
||||
if (empty($username) || empty($email) || empty($password) || empty($captcha)) return app("json")->fail("账号、密码和验证码不能为空!");
|
||||
$data = Util::postMore(['username', 'email', 'password', 'captcha'], null, true);
|
||||
try {
|
||||
validate(Register::class)->check($data);
|
||||
} catch (ValidateException $e) {
|
||||
// 验证失败 输出错误信息
|
||||
$this->error($e->getError(), null);
|
||||
}
|
||||
// 验证码验证
|
||||
if (!captcha_check($captcha)) return app("json")->fail("验证码不正确!");
|
||||
if (!captcha_check($data['captcha'])) return app("json")->fail("验证码不正确!");
|
||||
// 验证码验证
|
||||
if (!empty(web_config('register_black_list')) && in_array($username, explode(',', web_config('register_black_list')))) {
|
||||
if (!empty(web_config('register_black_list')) && in_array($data['username'], explode(',', web_config('register_black_list')))) {
|
||||
return app("json")->fail("账号不合法,请更换后重试");
|
||||
}
|
||||
// 验证登录
|
||||
if (!userModel::register($username, $email, $password)) return app("json")->fail(userModel::getErrorInfo());
|
||||
if (!userModel::register($data['username'], $data['email'], $data['password'])) return app("json")->fail(userModel::getErrorInfo());
|
||||
return app("json")->success("注册成功!我们给您邮箱发送了一封激活邮件,请按照邮件提示激活用户");
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace app\index\validate;
|
||||
|
||||
use think\Validate;
|
||||
class Comment extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'document_id' => 'require',
|
||||
'pid' => '',
|
||||
'author'=> 'require',
|
||||
'url' => 'require',
|
||||
'email' => 'require|email',
|
||||
'content' => 'require|content',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'author.require' => '昵称不能为空',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'url.require' => 'url不能为空',
|
||||
'document_id.require' => '文章id不能为空',
|
||||
'content.require' => '内容不能为空',
|
||||
];
|
||||
}
|
||||
|
|
@ -1,13 +1,6 @@
|
|||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | HulaCWMS 呼啦企业网站管理系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | Copyright (c) 2021 https://www.kaifashu.com All rights reserved.
|
||||
// +----------------------------------------------------------------------
|
||||
// | Author: 开发树
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\common\validate;
|
||||
namespace app\index\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
|
||||
namespace app\index\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Login extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'username' => 'require|max:25',
|
||||
'password' => 'number|between:1,120',
|
||||
'captcha' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'name.require' => '名称不能为空',
|
||||
'name.max' => '名称最多不能超过25个字符',
|
||||
'password' => '密码不能为空',
|
||||
'captcha' => '验证码不能为空'
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?php
|
||||
|
||||
namespace app\index\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Msg extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'author' => 'require',
|
||||
'tel' => 'require|number|max:11',
|
||||
'email' => 'require|email',
|
||||
'content' => 'require',
|
||||
];
|
||||
|
||||
|
||||
protected $message = [
|
||||
'author.require' => '昵称不能为空',
|
||||
'tel.require' => '手机号不能为空',
|
||||
'tel.number' => '手机号必须是数字!',
|
||||
'tel.max' => '手机号不得超过11位!',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式错误',
|
||||
'content.require' => '内容不能为空',
|
||||
];
|
||||
}
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<?php
|
||||
|
||||
namespace app\index\validate;
|
||||
|
||||
use think\Validate;
|
||||
|
||||
class Register extends Validate
|
||||
{
|
||||
protected $rule = [
|
||||
'username' => 'require|max:25',
|
||||
'email' => 'require|email',
|
||||
'password' => 'required',
|
||||
'captcha' => 'require',
|
||||
];
|
||||
|
||||
protected $message = [
|
||||
'name.require' => '名称不能为空',
|
||||
'name.max' => '名称最多不能超过25个字符',
|
||||
'email.require' => '邮箱不能为空',
|
||||
'email.email' => '邮箱格式错误',
|
||||
'password' => '密码不能为空',
|
||||
'captcha' => '验证码不能为空'
|
||||
];
|
||||
}
|
||||
|
|
@ -90,7 +90,7 @@
|
|||
<td class="td1"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tar">管理员帐号:</td>
|
||||
<td class="tar">管理员账号:</td>
|
||||
<td><input type="text" name="manager" value="admin" class="input"></td>
|
||||
<td><div id="J_install_tip_manager"></div></td>
|
||||
</tr>
|
||||
|
|
@ -164,7 +164,7 @@ $(function(){
|
|||
dbpw : '',
|
||||
dbname : '',
|
||||
dbprefix : '建议使用默认,同一数据库安装多个时需修改',
|
||||
manager : '创始人帐号,拥有站点后台所有管理权限',
|
||||
manager : '创始人账号,拥有站点后台所有管理权限',
|
||||
manager_pwd : '',
|
||||
manager_ckpwd : '',
|
||||
sitename : '',
|
||||
|
|
@ -279,7 +279,7 @@ $(function(){
|
|||
required : '数据库表前缀不能为空'
|
||||
},
|
||||
manager: {
|
||||
required : '管理员帐号不能为空'
|
||||
required : '管理员账号不能为空'
|
||||
},
|
||||
manager_pwd: {
|
||||
required : '密码不能为空'
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@
|
|||
<td class="td1"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="tar">管理员帐号:</td>
|
||||
<td class="tar">管理员账号:</td>
|
||||
<td><input type="text" name="manager" id="manager" value="admin" class="input"></td>
|
||||
<td><div id="J_install_tip_manager"></div></td>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -87,17 +87,17 @@
|
|||
},
|
||||
{
|
||||
"name": "doctrine/deprecations",
|
||||
"version": "v1.1.0",
|
||||
"version_normalized": "1.1.0.0",
|
||||
"version": "v1.1.1",
|
||||
"version_normalized": "1.1.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/doctrine/deprecations.git",
|
||||
"reference": "8cffffb2218e01f3b370bf763e00e81697725259"
|
||||
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/8cffffb2218e01f3b370bf763e00e81697725259",
|
||||
"reference": "8cffffb2218e01f3b370bf763e00e81697725259",
|
||||
"url": "https://api.github.com/repos/doctrine/deprecations/zipball/612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
|
||||
"reference": "612a3ee5ab0d5dd97b7cf3874a6efe24325efac3",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -107,17 +107,21 @@
|
|||
]
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.1|^8.0"
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/coding-standard": "^9",
|
||||
"phpunit/phpunit": "^7.5|^8.5|^9.5",
|
||||
"psr/log": "^1|^2|^3"
|
||||
"phpstan/phpstan": "1.4.10 || 1.10.15",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||
"psalm/plugin-phpunit": "0.18.4",
|
||||
"psr/log": "^1 || ^2 || ^3",
|
||||
"vimeo/psalm": "4.30.0 || 5.12.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
|
||||
},
|
||||
"time": "2023-05-29T18:55:17+00:00",
|
||||
"time": "2023-06-03T09:27:29+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -133,7 +137,7 @@
|
|||
"homepage": "https://www.doctrine-project.org/",
|
||||
"support": {
|
||||
"issues": "https://github.com/doctrine/deprecations/issues",
|
||||
"source": "https://github.com/doctrine/deprecations/tree/v1.1.0"
|
||||
"source": "https://github.com/doctrine/deprecations/tree/v1.1.1"
|
||||
},
|
||||
"install-path": "../doctrine/deprecations"
|
||||
},
|
||||
|
|
@ -397,17 +401,17 @@
|
|||
},
|
||||
{
|
||||
"name": "league/mime-type-detection",
|
||||
"version": "1.11.0",
|
||||
"version_normalized": "1.11.0.0",
|
||||
"version": "1.13.0",
|
||||
"version_normalized": "1.13.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/mime-type-detection.git",
|
||||
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd"
|
||||
"reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
|
||||
"reference": "ff6248ea87a9f116e78edd6002e39e5128a0d4dd",
|
||||
"url": "https://api.github.com/repos/thephpleague/mime-type-detection/zipball/a6dfb1194a2946fcdc1f38219445234f65b35c96",
|
||||
"reference": "a6dfb1194a2946fcdc1f38219445234f65b35c96",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -418,14 +422,14 @@
|
|||
},
|
||||
"require": {
|
||||
"ext-fileinfo": "*",
|
||||
"php": "^7.2 || ^8.0"
|
||||
"php": "^7.4 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^3.2",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3"
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0"
|
||||
},
|
||||
"time": "2022-04-17T13:12:02+00:00",
|
||||
"time": "2023-08-05T12:09:49+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -446,7 +450,7 @@
|
|||
"description": "Mime-type detection for Flysystem",
|
||||
"support": {
|
||||
"issues": "https://github.com/thephpleague/mime-type-detection/issues",
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.11.0"
|
||||
"source": "https://github.com/thephpleague/mime-type-detection/tree/1.13.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -600,17 +604,17 @@
|
|||
},
|
||||
{
|
||||
"name": "phpmailer/phpmailer",
|
||||
"version": "v6.7.1",
|
||||
"version_normalized": "6.7.1.0",
|
||||
"version": "v6.8.1",
|
||||
"version_normalized": "6.8.1.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/PHPMailer/PHPMailer.git",
|
||||
"reference": "49cd7ea3d2563f028d7811f06864a53b1f15ff55"
|
||||
"reference": "e88da8d679acc3824ff231fdc553565b802ac016"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/49cd7ea3d2563f028d7811f06864a53b1f15ff55",
|
||||
"reference": "49cd7ea3d2563f028d7811f06864a53b1f15ff55",
|
||||
"url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016",
|
||||
"reference": "e88da8d679acc3824ff231fdc553565b802ac016",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -626,13 +630,13 @@
|
|||
"php": ">=5.5.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
||||
"doctrine/annotations": "^1.2.6 || ^1.13.3",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.7.1",
|
||||
"squizlabs/php_codesniffer": "^3.7.2",
|
||||
"yoast/phpunit-polyfills": "^1.0.4"
|
||||
},
|
||||
"suggest": {
|
||||
|
|
@ -645,7 +649,7 @@
|
|||
"symfony/polyfill-mbstring": "To support UTF-8 if the Mbstring PHP extension is not enabled (^1.2)",
|
||||
"thenetworg/oauth2-azure": "Needed for Microsoft XOAUTH2 authentication"
|
||||
},
|
||||
"time": "2022-12-08T13:30:06+00:00",
|
||||
"time": "2023-08-29T08:26:30+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -677,7 +681,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.7.1"
|
||||
"source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.1"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1179,17 +1183,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v5.4.22",
|
||||
"version_normalized": "5.4.22.0",
|
||||
"version": "v5.4.26",
|
||||
"version_normalized": "5.4.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f"
|
||||
"reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/1df20e45d56da29a4b1d8259dd6e950acbf1b13f",
|
||||
"reference": "1df20e45d56da29a4b1d8259dd6e950acbf1b13f",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/5dcc00e03413f05c1e7900090927bb7247cb0aac",
|
||||
"reference": "5dcc00e03413f05c1e7900090927bb7247cb0aac",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1225,7 +1229,7 @@
|
|||
"symfony/dependency-injection": "",
|
||||
"symfony/http-kernel": ""
|
||||
},
|
||||
"time": "2023-03-17T11:31:58+00:00",
|
||||
"time": "2023-07-06T06:34:20+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -1253,7 +1257,7 @@
|
|||
"description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/event-dispatcher/tree/v5.4.22"
|
||||
"source": "https://github.com/symfony/event-dispatcher/tree/v5.4.26"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1361,17 +1365,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/http-foundation",
|
||||
"version": "v5.4.25",
|
||||
"version_normalized": "5.4.25.0",
|
||||
"version": "v5.4.28",
|
||||
"version_normalized": "5.4.28.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/http-foundation.git",
|
||||
"reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b"
|
||||
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
|
||||
"reference": "f66be2706075c5f6325d2fe2b743a57fb5d23f6b",
|
||||
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/365992c83a836dfe635f1e903ccca43ee03d3dd2",
|
||||
"reference": "365992c83a836dfe635f1e903ccca43ee03d3dd2",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1398,7 +1402,7 @@
|
|||
"suggest": {
|
||||
"symfony/mime": "To use the file extension guesser"
|
||||
},
|
||||
"time": "2023-06-22T08:06:06+00:00",
|
||||
"time": "2023-08-21T07:23:18+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -1426,7 +1430,7 @@
|
|||
"description": "Defines an object-oriented layer for the HTTP specification",
|
||||
"homepage": "https://symfony.com",
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v5.4.25"
|
||||
"source": "https://github.com/symfony/http-foundation/tree/v5.4.28"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1531,17 +1535,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/mime",
|
||||
"version": "v5.4.23",
|
||||
"version_normalized": "5.4.23.0",
|
||||
"version": "v5.4.26",
|
||||
"version_normalized": "5.4.26.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/mime.git",
|
||||
"reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3"
|
||||
"reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/ae0a1032a450a3abf305ee44fc55ed423fbf16e3",
|
||||
"reference": "ae0a1032a450a3abf305ee44fc55ed423fbf16e3",
|
||||
"url": "https://api.github.com/repos/symfony/mime/zipball/2ea06dfeee20000a319d8407cea1d47533d5a9d2",
|
||||
"reference": "2ea06dfeee20000a319d8407cea1d47533d5a9d2",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1562,7 +1566,7 @@
|
|||
"phpdocumentor/reflection-docblock": "<3.2.2",
|
||||
"phpdocumentor/type-resolver": "<1.4.0",
|
||||
"symfony/mailer": "<4.4",
|
||||
"symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6"
|
||||
"symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2"
|
||||
},
|
||||
"require-dev": {
|
||||
"egulias/email-validator": "^2.1.10|^3.1|^4",
|
||||
|
|
@ -1570,9 +1574,9 @@
|
|||
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
|
||||
"symfony/property-access": "^4.4|^5.1|^6.0",
|
||||
"symfony/property-info": "^4.4|^5.1|^6.0",
|
||||
"symfony/serializer": "^5.4.14|~6.0.14|^6.1.6"
|
||||
"symfony/serializer": "^5.4.26|~6.2.13|^6.3.2"
|
||||
},
|
||||
"time": "2023-04-19T09:49:13+00:00",
|
||||
"time": "2023-07-27T06:29:31+00:00",
|
||||
"type": "library",
|
||||
"installation-source": "dist",
|
||||
"autoload": {
|
||||
|
|
@ -1604,7 +1608,7 @@
|
|||
"mime-type"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/mime/tree/v5.4.23"
|
||||
"source": "https://github.com/symfony/mime/tree/v5.4.26"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1624,17 +1628,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-idn",
|
||||
"version": "v1.27.0",
|
||||
"version_normalized": "1.27.0.0",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-idn.git",
|
||||
"reference": "639084e360537a19f9ee352433b84ce831f3d2da"
|
||||
"reference": "ecaafce9f77234a6a449d29e49267ba10499116d"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/639084e360537a19f9ee352433b84ce831f3d2da",
|
||||
"reference": "639084e360537a19f9ee352433b84ce831f3d2da",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/ecaafce9f77234a6a449d29e49267ba10499116d",
|
||||
"reference": "ecaafce9f77234a6a449d29e49267ba10499116d",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1651,11 +1655,11 @@
|
|||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"time": "2022-11-03T14:55:06+00:00",
|
||||
"time": "2023-01-26T09:30:37+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
@ -1700,7 +1704,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.27.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-idn/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1720,17 +1724,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-intl-normalizer",
|
||||
"version": "v1.27.0",
|
||||
"version_normalized": "1.27.0.0",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-intl-normalizer.git",
|
||||
"reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6"
|
||||
"reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6",
|
||||
"reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
|
||||
"reference": "8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1745,11 +1749,11 @@
|
|||
"suggest": {
|
||||
"ext-intl": "For best performance"
|
||||
},
|
||||
"time": "2022-11-03T14:55:06+00:00",
|
||||
"time": "2023-01-26T09:26:14+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
@ -1793,7 +1797,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0"
|
||||
"source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1813,17 +1817,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-mbstring",
|
||||
"version": "v1.27.0",
|
||||
"version_normalized": "1.27.0.0",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-mbstring.git",
|
||||
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534"
|
||||
"reference": "42292d99c55abe617799667f454222c54c60e229"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||
"reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/42292d99c55abe617799667f454222c54c60e229",
|
||||
"reference": "42292d99c55abe617799667f454222c54c60e229",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1841,11 +1845,11 @@
|
|||
"suggest": {
|
||||
"ext-mbstring": "For best performance"
|
||||
},
|
||||
"time": "2022-11-03T14:55:06+00:00",
|
||||
"time": "2023-07-28T09:04:16+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
@ -1885,7 +1889,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0"
|
||||
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1905,17 +1909,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php72",
|
||||
"version": "v1.27.0",
|
||||
"version_normalized": "1.27.0.0",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php72.git",
|
||||
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97"
|
||||
"reference": "70f4aebd92afca2f865444d30a4d2151c13c3179"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97",
|
||||
"reference": "869329b1e9894268a8a61dabb69153029b7a8c97",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/70f4aebd92afca2f865444d30a4d2151c13c3179",
|
||||
"reference": "70f4aebd92afca2f865444d30a4d2151c13c3179",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -1927,11 +1931,11 @@
|
|||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"time": "2022-11-03T14:55:06+00:00",
|
||||
"time": "2023-01-26T09:26:14+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
@ -1970,7 +1974,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0"
|
||||
"source": "https://github.com/symfony/polyfill-php72/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
@ -1990,17 +1994,17 @@
|
|||
},
|
||||
{
|
||||
"name": "symfony/polyfill-php80",
|
||||
"version": "v1.27.0",
|
||||
"version_normalized": "1.27.0.0",
|
||||
"version": "v1.28.0",
|
||||
"version_normalized": "1.28.0.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/polyfill-php80.git",
|
||||
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936"
|
||||
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
|
||||
"reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936",
|
||||
"url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
|
||||
"reference": "6caa57379c4aec19c0a12a38b59b26487dcfe4b5",
|
||||
"shasum": "",
|
||||
"mirrors": [
|
||||
{
|
||||
|
|
@ -2012,11 +2016,11 @@
|
|||
"require": {
|
||||
"php": ">=7.1"
|
||||
},
|
||||
"time": "2022-11-03T14:55:06+00:00",
|
||||
"time": "2023-01-26T09:26:14+00:00",
|
||||
"type": "library",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
@ -2062,7 +2066,7 @@
|
|||
"shim"
|
||||
],
|
||||
"support": {
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0"
|
||||
"source": "https://github.com/symfony/polyfill-php80/tree/v1.28.0"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
'name' => 'topthink/think',
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => 'a2ad5cb8bd02b7c4e35edb13a3a18b968e4ae3ae',
|
||||
'reference' => '903c3a4494ff2c835529904ae67939380814fbd9',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
|
@ -20,9 +20,9 @@
|
|||
'dev_requirement' => false,
|
||||
),
|
||||
'doctrine/deprecations' => array(
|
||||
'pretty_version' => 'v1.1.0',
|
||||
'version' => '1.1.0.0',
|
||||
'reference' => '8cffffb2218e01f3b370bf763e00e81697725259',
|
||||
'pretty_version' => 'v1.1.1',
|
||||
'version' => '1.1.1.0',
|
||||
'reference' => '612a3ee5ab0d5dd97b7cf3874a6efe24325efac3',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../doctrine/deprecations',
|
||||
'aliases' => array(),
|
||||
|
|
@ -56,9 +56,9 @@
|
|||
'dev_requirement' => false,
|
||||
),
|
||||
'league/mime-type-detection' => array(
|
||||
'pretty_version' => '1.11.0',
|
||||
'version' => '1.11.0.0',
|
||||
'reference' => 'ff6248ea87a9f116e78edd6002e39e5128a0d4dd',
|
||||
'pretty_version' => '1.13.0',
|
||||
'version' => '1.13.0.0',
|
||||
'reference' => 'a6dfb1194a2946fcdc1f38219445234f65b35c96',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../league/mime-type-detection',
|
||||
'aliases' => array(),
|
||||
|
|
@ -83,9 +83,9 @@
|
|||
'dev_requirement' => false,
|
||||
),
|
||||
'phpmailer/phpmailer' => array(
|
||||
'pretty_version' => 'v6.7.1',
|
||||
'version' => '6.7.1.0',
|
||||
'reference' => '49cd7ea3d2563f028d7811f06864a53b1f15ff55',
|
||||
'pretty_version' => 'v6.8.1',
|
||||
'version' => '6.8.1.0',
|
||||
'reference' => 'e88da8d679acc3824ff231fdc553565b802ac016',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../phpmailer/phpmailer',
|
||||
'aliases' => array(),
|
||||
|
|
@ -170,9 +170,9 @@
|
|||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/event-dispatcher' => array(
|
||||
'pretty_version' => 'v5.4.22',
|
||||
'version' => '5.4.22.0',
|
||||
'reference' => '1df20e45d56da29a4b1d8259dd6e950acbf1b13f',
|
||||
'pretty_version' => 'v5.4.26',
|
||||
'version' => '5.4.26.0',
|
||||
'reference' => '5dcc00e03413f05c1e7900090927bb7247cb0aac',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/event-dispatcher',
|
||||
'aliases' => array(),
|
||||
|
|
@ -194,9 +194,9 @@
|
|||
),
|
||||
),
|
||||
'symfony/http-foundation' => array(
|
||||
'pretty_version' => 'v5.4.25',
|
||||
'version' => '5.4.25.0',
|
||||
'reference' => 'f66be2706075c5f6325d2fe2b743a57fb5d23f6b',
|
||||
'pretty_version' => 'v5.4.28',
|
||||
'version' => '5.4.28.0',
|
||||
'reference' => '365992c83a836dfe635f1e903ccca43ee03d3dd2',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/http-foundation',
|
||||
'aliases' => array(),
|
||||
|
|
@ -212,54 +212,54 @@
|
|||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/mime' => array(
|
||||
'pretty_version' => 'v5.4.23',
|
||||
'version' => '5.4.23.0',
|
||||
'reference' => 'ae0a1032a450a3abf305ee44fc55ed423fbf16e3',
|
||||
'pretty_version' => 'v5.4.26',
|
||||
'version' => '5.4.26.0',
|
||||
'reference' => '2ea06dfeee20000a319d8407cea1d47533d5a9d2',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/mime',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-idn' => array(
|
||||
'pretty_version' => 'v1.27.0',
|
||||
'version' => '1.27.0.0',
|
||||
'reference' => '639084e360537a19f9ee352433b84ce831f3d2da',
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => 'ecaafce9f77234a6a449d29e49267ba10499116d',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-idn',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-intl-normalizer' => array(
|
||||
'pretty_version' => 'v1.27.0',
|
||||
'version' => '1.27.0.0',
|
||||
'reference' => '19bd1e4fcd5b91116f14d8533c57831ed00571b6',
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => '8c4ad05dd0120b6a53c1ca374dca2ad0a1c4ed92',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-intl-normalizer',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-mbstring' => array(
|
||||
'pretty_version' => 'v1.27.0',
|
||||
'version' => '1.27.0.0',
|
||||
'reference' => '8ad114f6b39e2c98a8b0e3bd907732c207c2b534',
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => '42292d99c55abe617799667f454222c54c60e229',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-mbstring',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php72' => array(
|
||||
'pretty_version' => 'v1.27.0',
|
||||
'version' => '1.27.0.0',
|
||||
'reference' => '869329b1e9894268a8a61dabb69153029b7a8c97',
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => '70f4aebd92afca2f865444d30a4d2151c13c3179',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php72',
|
||||
'aliases' => array(),
|
||||
'dev_requirement' => false,
|
||||
),
|
||||
'symfony/polyfill-php80' => array(
|
||||
'pretty_version' => 'v1.27.0',
|
||||
'version' => '1.27.0.0',
|
||||
'reference' => '7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936',
|
||||
'pretty_version' => 'v1.28.0',
|
||||
'version' => '1.28.0.0',
|
||||
'reference' => '6caa57379c4aec19c0a12a38b59b26487dcfe4b5',
|
||||
'type' => 'library',
|
||||
'install_path' => __DIR__ . '/../symfony/polyfill-php80',
|
||||
'aliases' => array(),
|
||||
|
|
@ -295,7 +295,7 @@
|
|||
'topthink/think' => array(
|
||||
'pretty_version' => 'dev-master',
|
||||
'version' => 'dev-master',
|
||||
'reference' => 'a2ad5cb8bd02b7c4e35edb13a3a18b968e4ae3ae',
|
||||
'reference' => '903c3a4494ff2c835529904ae67939380814fbd9',
|
||||
'type' => 'project',
|
||||
'install_path' => __DIR__ . '/../../',
|
||||
'aliases' => array(),
|
||||
|
|
|
|||
|
|
@ -1,22 +1,28 @@
|
|||
{
|
||||
"name": "doctrine/deprecations",
|
||||
"type": "library",
|
||||
"description": "A small layer on top of trigger_error(E_USER_DEPRECATED) or PSR-3 logging with options to disable all deprecations or selectively for packages.",
|
||||
"homepage": "https://www.doctrine-project.org/",
|
||||
"license": "MIT",
|
||||
"type": "library",
|
||||
"homepage": "https://www.doctrine-project.org/",
|
||||
"require": {
|
||||
"php": "^7.1|^8.0"
|
||||
"php": "^7.1 || ^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^7.5|^8.5|^9.5",
|
||||
"psr/log": "^1|^2|^3",
|
||||
"doctrine/coding-standard": "^9"
|
||||
"doctrine/coding-standard": "^9",
|
||||
"phpstan/phpstan": "1.4.10 || 1.10.15",
|
||||
"phpstan/phpstan-phpunit": "^1.0",
|
||||
"phpunit/phpunit": "^7.5 || ^8.5 || ^9.5",
|
||||
"psalm/plugin-phpunit": "0.18.4",
|
||||
"psr/log": "^1 || ^2 || ^3",
|
||||
"vimeo/psalm": "4.30.0 || 5.12.0"
|
||||
},
|
||||
"suggest": {
|
||||
"psr/log": "Allows logging deprecations via PSR-3 logger implementation"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {"Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"}
|
||||
"psr-4": {
|
||||
"Doctrine\\Deprecations\\": "lib/Doctrine/Deprecations"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ use Psr\Log\LoggerInterface;
|
|||
|
||||
use function array_key_exists;
|
||||
use function array_reduce;
|
||||
use function assert;
|
||||
use function debug_backtrace;
|
||||
use function sprintf;
|
||||
use function strpos;
|
||||
|
|
@ -46,7 +47,7 @@ class Deprecation
|
|||
private const TYPE_TRIGGER_ERROR = 2;
|
||||
private const TYPE_PSR_LOGGER = 4;
|
||||
|
||||
/** @var self::TYPE_*|null */
|
||||
/** @var int-mask-of<self::TYPE_*>|null */
|
||||
private static $type;
|
||||
|
||||
/** @var LoggerInterface|null */
|
||||
|
|
@ -56,6 +57,9 @@ class Deprecation
|
|||
private static $ignoredPackages = [];
|
||||
|
||||
/** @var array<string,int> */
|
||||
private static $triggeredDeprecations = [];
|
||||
|
||||
/** @var array<string,bool> */
|
||||
private static $ignoredLinks = [];
|
||||
|
||||
/** @var bool */
|
||||
|
|
@ -68,7 +72,7 @@ class Deprecation
|
|||
* deprecation. It is additionally used to de-duplicate the trigger of the
|
||||
* same deprecation during a request.
|
||||
*
|
||||
* @param mixed $args
|
||||
* @param float|int|string $args
|
||||
*/
|
||||
public static function trigger(string $package, string $link, string $message, ...$args): void
|
||||
{
|
||||
|
|
@ -78,13 +82,17 @@ class Deprecation
|
|||
return;
|
||||
}
|
||||
|
||||
if (array_key_exists($link, self::$ignoredLinks)) {
|
||||
self::$ignoredLinks[$link]++;
|
||||
} else {
|
||||
self::$ignoredLinks[$link] = 1;
|
||||
if (isset(self::$ignoredLinks[$link])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self::$deduplication === true && self::$ignoredLinks[$link] > 1) {
|
||||
if (array_key_exists($link, self::$triggeredDeprecations)) {
|
||||
self::$triggeredDeprecations[$link]++;
|
||||
} else {
|
||||
self::$triggeredDeprecations[$link] = 1;
|
||||
}
|
||||
|
||||
if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -116,7 +124,7 @@ class Deprecation
|
|||
* deprecation tracking is enabled even during deduplication, because it
|
||||
* needs to call {@link debug_backtrace()}
|
||||
*
|
||||
* @param mixed $args
|
||||
* @param float|int|string $args
|
||||
*/
|
||||
public static function triggerIfCalledFromOutside(string $package, string $link, string $message, ...$args): void
|
||||
{
|
||||
|
|
@ -129,7 +137,7 @@ class Deprecation
|
|||
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2);
|
||||
|
||||
// first check that the caller is not from a tests folder, in which case we always let deprecations pass
|
||||
if (strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
|
||||
if (isset($backtrace[1]['file'], $backtrace[0]['file']) && strpos($backtrace[1]['file'], DIRECTORY_SEPARATOR . 'tests' . DIRECTORY_SEPARATOR) === false) {
|
||||
$path = DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR . $package . DIRECTORY_SEPARATOR;
|
||||
|
||||
if (strpos($backtrace[0]['file'], $path) === false) {
|
||||
|
|
@ -141,13 +149,17 @@ class Deprecation
|
|||
}
|
||||
}
|
||||
|
||||
if (array_key_exists($link, self::$ignoredLinks)) {
|
||||
self::$ignoredLinks[$link]++;
|
||||
} else {
|
||||
self::$ignoredLinks[$link] = 1;
|
||||
if (isset(self::$ignoredLinks[$link])) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self::$deduplication === true && self::$ignoredLinks[$link] > 1) {
|
||||
if (array_key_exists($link, self::$triggeredDeprecations)) {
|
||||
self::$triggeredDeprecations[$link]++;
|
||||
} else {
|
||||
self::$triggeredDeprecations[$link] = 1;
|
||||
}
|
||||
|
||||
if (self::$deduplication === true && self::$triggeredDeprecations[$link] > 1) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -161,7 +173,7 @@ class Deprecation
|
|||
}
|
||||
|
||||
/**
|
||||
* @param array<mixed> $backtrace
|
||||
* @param list<array{function: string, line?: int, file?: string, class?: class-string, type?: string, args?: mixed[], object?: object}> $backtrace
|
||||
*/
|
||||
private static function delegateTriggerToBackend(string $message, array $backtrace, string $link, string $package): void
|
||||
{
|
||||
|
|
@ -169,12 +181,14 @@ class Deprecation
|
|||
|
||||
if (($type & self::TYPE_PSR_LOGGER) > 0) {
|
||||
$context = [
|
||||
'file' => $backtrace[0]['file'],
|
||||
'line' => $backtrace[0]['line'],
|
||||
'file' => $backtrace[0]['file'] ?? null,
|
||||
'line' => $backtrace[0]['line'] ?? null,
|
||||
'package' => $package,
|
||||
'link' => $link,
|
||||
];
|
||||
|
||||
assert(self::$logger !== null);
|
||||
|
||||
self::$logger->notice($message, $context);
|
||||
}
|
||||
|
||||
|
|
@ -184,10 +198,10 @@ class Deprecation
|
|||
|
||||
$message .= sprintf(
|
||||
' (%s:%d called by %s:%d, %s, package %s)',
|
||||
self::basename($backtrace[0]['file']),
|
||||
$backtrace[0]['line'],
|
||||
self::basename($backtrace[1]['file']),
|
||||
$backtrace[1]['line'],
|
||||
self::basename($backtrace[0]['file'] ?? 'native code'),
|
||||
$backtrace[0]['line'] ?? 0,
|
||||
self::basename($backtrace[1]['file'] ?? 'native code'),
|
||||
$backtrace[1]['line'] ?? 0,
|
||||
$link,
|
||||
$package
|
||||
);
|
||||
|
|
@ -211,16 +225,19 @@ class Deprecation
|
|||
|
||||
public static function enableTrackingDeprecations(): void
|
||||
{
|
||||
self::$type = self::$type ?? 0;
|
||||
self::$type |= self::TYPE_TRACK_DEPRECATIONS;
|
||||
}
|
||||
|
||||
public static function enableWithTriggerError(): void
|
||||
{
|
||||
self::$type = self::$type ?? 0;
|
||||
self::$type |= self::TYPE_TRIGGER_ERROR;
|
||||
}
|
||||
|
||||
public static function enableWithPsrLogger(LoggerInterface $logger): void
|
||||
{
|
||||
self::$type = self::$type ?? 0;
|
||||
self::$type |= self::TYPE_PSR_LOGGER;
|
||||
self::$logger = $logger;
|
||||
}
|
||||
|
|
@ -235,9 +252,10 @@ class Deprecation
|
|||
self::$type = self::TYPE_NONE;
|
||||
self::$logger = null;
|
||||
self::$deduplication = true;
|
||||
self::$ignoredLinks = [];
|
||||
|
||||
foreach (self::$ignoredLinks as $link => $count) {
|
||||
self::$ignoredLinks[$link] = 0;
|
||||
foreach (self::$triggeredDeprecations as $link => $count) {
|
||||
self::$triggeredDeprecations[$link] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -249,13 +267,13 @@ class Deprecation
|
|||
public static function ignoreDeprecations(string ...$links): void
|
||||
{
|
||||
foreach ($links as $link) {
|
||||
self::$ignoredLinks[$link] = 0;
|
||||
self::$ignoredLinks[$link] = true;
|
||||
}
|
||||
}
|
||||
|
||||
public static function getUniqueTriggeredDeprecationsCount(): int
|
||||
{
|
||||
return array_reduce(self::$ignoredLinks, static function (int $carry, int $count) {
|
||||
return array_reduce(self::$triggeredDeprecations, static function (int $carry, int $count) {
|
||||
return $carry + $count;
|
||||
}, 0);
|
||||
}
|
||||
|
|
@ -267,11 +285,11 @@ class Deprecation
|
|||
*/
|
||||
public static function getTriggeredDeprecations(): array
|
||||
{
|
||||
return self::$ignoredLinks;
|
||||
return self::$triggeredDeprecations;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return self::TYPE_*
|
||||
* @return int-mask-of<self::TYPE_*>
|
||||
*/
|
||||
private static function getTypeFromEnv(): int
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
parameters:
|
||||
level: 6
|
||||
paths:
|
||||
- lib
|
||||
- tests
|
||||
|
||||
includes:
|
||||
- vendor/phpstan/phpstan-phpunit/extension.neon
|
||||
- vendor/phpstan/phpstan-phpunit/rules.neon
|
||||
|
|
@ -0,0 +1,30 @@
|
|||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
errorLevel="1"
|
||||
resolveFromConfigFile="true"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
findUnusedBaselineEntry="true"
|
||||
findUnusedCode="false"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="lib/Doctrine/Deprecations" />
|
||||
<directory name="tests/Doctrine/Deprecations" />
|
||||
<ignoreFiles>
|
||||
<directory name="vendor" />
|
||||
</ignoreFiles>
|
||||
</projectFiles>
|
||||
<plugins>
|
||||
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/>
|
||||
</plugins>
|
||||
<issueHandlers>
|
||||
<DeprecatedMethod>
|
||||
<errorLevel type="suppress">
|
||||
<!-- Remove when dropping support for PHPUnit 9.6 -->
|
||||
<referencedMethod name="PHPUnit\Framework\TestCase::expectDeprecation"/>
|
||||
<referencedMethod name="PHPUnit\Framework\TestCase::expectDeprecationMessage"/>
|
||||
</errorLevel>
|
||||
</DeprecatedMethod>
|
||||
</issueHandlers>
|
||||
</psalm>
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,5 +1,23 @@
|
|||
# Changelog
|
||||
|
||||
## 1.13.0 - 2022-08-05
|
||||
|
||||
### Added
|
||||
|
||||
- A reverse lookup mechanism to fetch one or all extensions for a given mimetype
|
||||
|
||||
## 1.12.0 - 2022-08-03
|
||||
|
||||
### Updated
|
||||
|
||||
- Updated lookup
|
||||
|
||||
## 1.11.0 - 2022-04-17
|
||||
|
||||
### Updated
|
||||
|
||||
- Updated lookup
|
||||
|
||||
## 1.10.0 - 2022-04-11
|
||||
|
||||
### Fixed
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2013-2022 Frank de Jonge
|
||||
Copyright (c) 2013-2023 Frank de Jonge
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -13,11 +13,11 @@
|
|||
"phpstan": "vendor/bin/phpstan analyse -l 6 src"
|
||||
},
|
||||
"require": {
|
||||
"php": "^7.2 || ^8.0",
|
||||
"php": "^7.4 || ^8.0",
|
||||
"ext-fileinfo": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3",
|
||||
"phpunit/phpunit": "^8.5.8 || ^9.3 || ^10.0",
|
||||
"phpstan/phpstan": "^0.12.68",
|
||||
"friendsofphp/php-cs-fixer": "^3.2"
|
||||
},
|
||||
|
|
@ -28,7 +28,7 @@
|
|||
},
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "7.2.0"
|
||||
"php": "7.4.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace League\MimeTypeDetection;
|
||||
|
||||
interface ExtensionLookup
|
||||
{
|
||||
public function lookupExtension(string $mimetype): ?string;
|
||||
|
||||
/**
|
||||
* @return string[]
|
||||
*/
|
||||
public function lookupAllExtensions(string $mimetype): array;
|
||||
}
|
||||
|
|
@ -6,7 +6,7 @@ namespace League\MimeTypeDetection;
|
|||
|
||||
use const PATHINFO_EXTENSION;
|
||||
|
||||
class ExtensionMimeTypeDetector implements MimeTypeDetector
|
||||
class ExtensionMimeTypeDetector implements MimeTypeDetector, ExtensionLookup
|
||||
{
|
||||
/**
|
||||
* @var ExtensionToMimeTypeMap
|
||||
|
|
@ -39,4 +39,18 @@ class ExtensionMimeTypeDetector implements MimeTypeDetector
|
|||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
public function lookupExtension(string $mimetype): ?string
|
||||
{
|
||||
return $this->extensions instanceof ExtensionLookup
|
||||
? $this->extensions->lookupExtension($mimetype)
|
||||
: null;
|
||||
}
|
||||
|
||||
public function lookupAllExtensions(string $mimetype): array
|
||||
{
|
||||
return $this->extensions instanceof ExtensionLookup
|
||||
? $this->extensions->lookupAllExtensions($mimetype)
|
||||
: [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use const FILEINFO_MIME_TYPE;
|
|||
use const PATHINFO_EXTENSION;
|
||||
use finfo;
|
||||
|
||||
class FinfoMimeTypeDetector implements MimeTypeDetector
|
||||
class FinfoMimeTypeDetector implements MimeTypeDetector, ExtensionLookup
|
||||
{
|
||||
private const INCONCLUSIVE_MIME_TYPES = [
|
||||
'application/x-empty',
|
||||
|
|
@ -89,4 +89,18 @@ class FinfoMimeTypeDetector implements MimeTypeDetector
|
|||
|
||||
return (string) substr($contents, 0, $this->bufferSampleSize);
|
||||
}
|
||||
|
||||
public function lookupExtension(string $mimetype): ?string
|
||||
{
|
||||
return $this->extensionMap instanceof ExtensionLookup
|
||||
? $this->extensionMap->lookupExtension($mimetype)
|
||||
: null;
|
||||
}
|
||||
|
||||
public function lookupAllExtensions(string $mimetype): array
|
||||
{
|
||||
return $this->extensionMap instanceof ExtensionLookup
|
||||
? $this->extensionMap->lookupAllExtensions($mimetype)
|
||||
: [];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -47,7 +47,7 @@ This software is distributed under the [LGPL 2.1](http://www.gnu.org/licenses/lg
|
|||
PHPMailer is available on [Packagist](https://packagist.org/packages/phpmailer/phpmailer) (using semantic versioning), and installation via [Composer](https://getcomposer.org) is the recommended way to install PHPMailer. Just add this line to your `composer.json` file:
|
||||
|
||||
```json
|
||||
"phpmailer/phpmailer": "^6.7.1"
|
||||
"phpmailer/phpmailer": "^6.8.1"
|
||||
```
|
||||
|
||||
or run
|
||||
|
|
@ -150,7 +150,7 @@ PHPMailer defaults to English, but in the [language](https://github.com/PHPMaile
|
|||
$mail->setLanguage('fr', '/optional/path/to/language/directory/');
|
||||
```
|
||||
|
||||
We welcome corrections and new languages – if you're looking for corrections, run the [PHPMailerLangTest.php](https://github.com/PHPMailer/PHPMailer/tree/master/test/PHPMailerLangTest.php) script in the tests folder and it will show any missing translations.
|
||||
We welcome corrections and new languages – if you're looking for corrections, run the [Language/TranslationCompletenessTest.php](https://github.com/PHPMailer/PHPMailer/blob/master/test/Language/TranslationCompletenessTest.php) script in the tests folder and it will show any missing translations.
|
||||
|
||||
## Documentation
|
||||
Start reading at the [GitHub wiki](https://github.com/PHPMailer/PHPMailer/wiki). If you're having trouble, head for [the troubleshooting guide](https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting) as it's frequently updated.
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
6.7.1
|
||||
6.8.1
|
||||
|
|
@ -37,13 +37,13 @@
|
|||
"ext-hash": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.2",
|
||||
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
|
||||
"doctrine/annotations": "^1.2.6 || ^1.13.3",
|
||||
"php-parallel-lint/php-console-highlighter": "^1.0.0",
|
||||
"php-parallel-lint/php-parallel-lint": "^1.3.2",
|
||||
"phpcompatibility/php-compatibility": "^9.3.5",
|
||||
"roave/security-advisories": "dev-latest",
|
||||
"squizlabs/php_codesniffer": "^3.7.1",
|
||||
"squizlabs/php_codesniffer": "^3.7.2",
|
||||
"yoast/phpunit-polyfills": "^1.0.4"
|
||||
},
|
||||
"suggest": {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ $PHPMAILER_LANG['instantiate'] = 'mail-funktion luonti epäonnistui.';
|
|||
$PHPMAILER_LANG['mailer_not_supported'] = 'postivälitintyyppiä ei tueta.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Aseta vähintään yksi vastaanottajan sähköpostiosoite.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP-virhe: seuraava vastaanottaja osoite on virheellinen.';
|
||||
$PHPMAILER_LANG['encoding'] = 'Tuntematon koodaustyyppi: ';
|
||||
//$PHPMAILER_LANG['signing'] = 'Signing Error: ';
|
||||
//$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP Connect() failed.';
|
||||
//$PHPMAILER_LANG['smtp_error'] = 'SMTP server error: ';
|
||||
|
|
|
|||
|
|
@ -35,4 +35,3 @@ $PHPMAILER_LANG['smtp_connect_failed'] = 'La fonction SMTP connect() a échoué
|
|||
$PHPMAILER_LANG['smtp_detail'] = 'Détails : ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'Erreur du serveur SMTP : ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Impossible d’initialiser ou de réinitialiser une variable : ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extension manquante : ';
|
||||
|
|
|
|||
|
|
@ -4,24 +4,32 @@
|
|||
* Hindi PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Yash Karanke <mr.karanke@gmail.com>
|
||||
* Rewrite and extension of the work by Jayanti Suthar <suthar.jayanti93@gmail.com>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP त्रुटि: प्रामाणिकता की जांच नहीं हो सका। ';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'PHP का आपका संस्करण एक बग से प्रभावित है जिसके परिणामस्वरूप संदेश दूषित हो सकते हैं. इसे ठीक करने हेतु, भेजने के लिए SMTP का उपयोग करे, अपने php.ini में mail.add_x_header विकल्प को अक्षम करें, MacOS या Linux पर जाए, या अपने PHP संस्करण को 7.0.17+ या 7.1.3+ बदले.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP त्रुटि: SMTP सर्वर से कनेक्ट नहीं हो सका। ';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP त्रुटि: डेटा स्वीकार नहीं किया जाता है। ';
|
||||
$PHPMAILER_LANG['empty_message'] = 'संदेश खाली है। ';
|
||||
$PHPMAILER_LANG['encoding'] = 'अज्ञात एन्कोडिंग प्रकार। ';
|
||||
$PHPMAILER_LANG['execute'] = 'आदेश को निष्पादित करने में विफल। ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'फ़ाइल उपलब्ध नहीं है। ';
|
||||
$PHPMAILER_LANG['file_open'] = 'फ़ाइल त्रुटि: फाइल को खोला नहीं जा सका। ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'प्रेषक का पता गलत है। ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'मेल फ़ंक्शन कॉल नहीं कर सकता है।';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'पता गलत है। ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'अमान्य हेडर नाम या मान';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'अमान्य hostentry: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'अमान्य होस्ट: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = 'मेल सर्वर के साथ काम नहीं करता है। ';
|
||||
$PHPMAILER_LANG['provide_address'] = 'आपको कम से कम एक प्राप्तकर्ता का ई-मेल पता प्रदान करना होगा।';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP त्रुटि: निम्न प्राप्तकर्ताओं को पते भेजने में विफल। ';
|
||||
$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि:। ';
|
||||
$PHPMAILER_LANG['signing'] = 'साइनअप त्रुटि: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP कोड: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'अतिरिक्त SMTP जानकारी: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP का connect () फ़ंक्शन विफल हुआ। ';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'विवरण: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP सर्वर त्रुटि। ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'चर को बना या संशोधित नहीं किया जा सकता। ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'एक्सटेन्षन गायब है: ';
|
||||
|
|
|
|||
|
|
@ -5,22 +5,29 @@
|
|||
* @package PHPMailer
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP Feil: Kunne ikke autentisere.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP Feil: Kunne ikke koble til SMTP tjener.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP Feil: Datainnhold ikke akseptert.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Meldingsinnhold mangler';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ukjent koding: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføre: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Får ikke tilgang til filen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Fil Feil: Kunne ikke åpne filen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Følgende Frå adresse feilet: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke initialisere post funksjon.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du må opppgi minst en mottakeradresse.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Signering Feil: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() feilet.';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP server feil: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kan ikke skrive eller omskrive variabel: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: ';
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP-feil: Kunne ikke autentiseres.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'Din versjon av PHP er berørt av en feil som kan føre til ødelagte meldinger. For å løse problemet kan du bytte til SMTP, deaktivere alternativet mail.add_x_header i php.ini, bytte til MacOS eller Linux eller oppgradere PHP til versjon 7.0.17+ eller 7.1.3+.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP-feil: Kunne ikke koble til SMTP-vert.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP-feil: data ikke akseptert.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'Meldingstekst mangler';
|
||||
$PHPMAILER_LANG['encoding'] = 'Ukjent koding: ';
|
||||
$PHPMAILER_LANG['execute'] = 'Kunne ikke utføres: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Utvidelse mangler: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'Kunne ikke få tilgang til filen: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'Feil i fil: Kunne ikke åpne filen: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'Følgende Fra-adresse mislyktes: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'Kunne ikke instansiere e-postfunksjonen.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'Ugyldig adresse: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'Ugyldig headernavn eller verdi';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'Ugyldig vertsinngang: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'Ugyldig vert: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' sender er ikke støttet.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'Du må oppgi minst én mottaker-e-postadresse.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP Feil: Følgende mottakeradresse feilet: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Signeringsfeil: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP-kode: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'Ytterligere SMTP-info: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP connect() mislyktes.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'Detaljer: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP-serverfeil: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Kan ikke angi eller tilbakestille variabel: ';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,34 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Sinhalese PHPMailer language file: refer to English translation for definitive list
|
||||
* @package PHPMailer
|
||||
* @author Ayesh Karunaratne <ayesh@aye.sh>
|
||||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP දෝෂය: සත්යාපනය අසාර්ථක විය.';
|
||||
$PHPMAILER_LANG['buggy_php'] = 'ඔබගේ PHP version එකෙහි පවතින දෝෂයක් නිසා email පණිවිඩ දෝෂ සහගත වීමේ හැකියාවක් ඇත. මෙය විසදීම සදහා SMTP භාවිතා කිරීම, mail.add_x_header INI setting එක අක්රීය කිරීම, MacOS හෝ Linux වලට මාරු වීම, හෝ ඔබගේ PHP version එක 7.0.17+ හෝ 7.1.3+ වලට අලුත් කිරීම කරගන්න.';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP දෝෂය: සම්බන්ධ වීමට නොහැකි විය.';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP දෝෂය: දත්ත පිළිගනු නොලැබේ.';
|
||||
$PHPMAILER_LANG['empty_message'] = 'පණිවිඩ අන්තර්ගතය හිස්';
|
||||
$PHPMAILER_LANG['encoding'] = 'නොදන්නා කේතනය: ';
|
||||
$PHPMAILER_LANG['execute'] = 'ක්රියාත්මක කළ නොහැකි විය: ';
|
||||
$PHPMAILER_LANG['extension_missing'] = 'Extension එක නොමැත: ';
|
||||
$PHPMAILER_LANG['file_access'] = 'File එකට ප්රවේශ විය නොහැකි විය: ';
|
||||
$PHPMAILER_LANG['file_open'] = 'File දෝෂය: File එක විවෘත කළ නොහැක: ';
|
||||
$PHPMAILER_LANG['from_failed'] = 'පහත From ලිපිනයන් අසාර්ථක විය: ';
|
||||
$PHPMAILER_LANG['instantiate'] = 'mail function එක ක්රියාත්මක කළ නොහැක.';
|
||||
$PHPMAILER_LANG['invalid_address'] = 'වලංගු නොවන ලිපිනය: ';
|
||||
$PHPMAILER_LANG['invalid_header'] = 'වලංගු නොවන header නාමයක් හෝ අගයක්';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = 'වලංගු නොවන hostentry එකක්: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = 'වලංගු නොවන host එකක්: ';
|
||||
$PHPMAILER_LANG['mailer_not_supported'] = ' mailer සහාය නොදක්වයි.';
|
||||
$PHPMAILER_LANG['provide_address'] = 'ඔබ අවම වශයෙන් එක් ලබන්නෙකුගේ ඊමේල් ලිපිනයක් සැපයිය යුතුය.';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP දෝෂය: පහත ලබන්නන් අසමත් විය: ';
|
||||
$PHPMAILER_LANG['signing'] = 'Sign කිරීමේ දෝෂය: ';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP කේතය: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = 'අමතර SMTP තොරතුරු: ';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP සම්බන්ධය අසාර්ථක විය.';
|
||||
$PHPMAILER_LANG['smtp_detail'] = 'තොරතුරු: ';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP දෝෂය: ';
|
||||
$PHPMAILER_LANG['variable_set'] = 'Variable එක සැකසීමට හෝ නැවත සැකසීමට නොහැක: ';
|
||||
|
|
@ -9,11 +9,13 @@
|
|||
*/
|
||||
|
||||
$PHPMAILER_LANG['authenticate'] = 'SMTP 错误:登录失败。';
|
||||
$PHPMAILER_LANG['buggy_php'] = '您的 PHP 版本存在漏洞,可能会导致消息损坏。为修复此问题,请切换到使用 SMTP 发送,在您的 php.ini 中禁用 mail.add_x_header 选项。切换到 MacOS 或 Linux,或将您的 PHP 升级到 7.0.17+ 或 7.1.3+ 版本。';
|
||||
$PHPMAILER_LANG['connect_host'] = 'SMTP 错误:无法连接到 SMTP 主机。';
|
||||
$PHPMAILER_LANG['data_not_accepted'] = 'SMTP 错误:数据不被接受。';
|
||||
$PHPMAILER_LANG['empty_message'] = '邮件正文为空。';
|
||||
$PHPMAILER_LANG['encoding'] = '未知编码:';
|
||||
$PHPMAILER_LANG['execute'] = '无法执行:';
|
||||
$PHPMAILER_LANG['extension_missing'] = '缺少扩展名:';
|
||||
$PHPMAILER_LANG['file_access'] = '无法访问文件:';
|
||||
$PHPMAILER_LANG['file_open'] = '文件错误:无法打开文件:';
|
||||
$PHPMAILER_LANG['from_failed'] = '发送地址错误:';
|
||||
|
|
@ -22,8 +24,13 @@ $PHPMAILER_LANG['invalid_address'] = '发送失败,电子邮箱地址是
|
|||
$PHPMAILER_LANG['mailer_not_supported'] = '发信客户端不被支持。';
|
||||
$PHPMAILER_LANG['provide_address'] = '必须提供至少一个收件人地址。';
|
||||
$PHPMAILER_LANG['recipients_failed'] = 'SMTP 错误:收件人地址错误:';
|
||||
$PHPMAILER_LANG['signing'] = '登录失败:';
|
||||
$PHPMAILER_LANG['smtp_connect_failed'] = 'SMTP服务器连接失败。';
|
||||
$PHPMAILER_LANG['smtp_error'] = 'SMTP服务器出错:';
|
||||
$PHPMAILER_LANG['variable_set'] = '无法设置或重置变量:';
|
||||
$PHPMAILER_LANG['extension_missing'] = '丢失模块 Extension:';
|
||||
$PHPMAILER_LANG['invalid_header'] = '无效的标题名称或值';
|
||||
$PHPMAILER_LANG['invalid_hostentry'] = '无效的hostentry: ';
|
||||
$PHPMAILER_LANG['invalid_host'] = '无效的主机:';
|
||||
$PHPMAILER_LANG['signing'] = '签名错误:';
|
||||
$PHPMAILER_LANG['smtp_code'] = 'SMTP代码: ';
|
||||
$PHPMAILER_LANG['smtp_code_ex'] = '附加SMTP信息: ';
|
||||
$PHPMAILER_LANG['smtp_detail'] = '详情:';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,245 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* PHPMailer - PHP email creation and transport class.
|
||||
* PHP Version 5.5.
|
||||
*
|
||||
* @see https://github.com/PHPMailer/PHPMailer/ The PHPMailer GitHub project
|
||||
*
|
||||
* @author Marcus Bointon (Synchro/coolbru) <phpmailer@synchromedia.co.uk>
|
||||
* @author Jim Jagielski (jimjag) <jimjag@gmail.com>
|
||||
* @author Andy Prevost (codeworxtech) <codeworxtech@users.sourceforge.net>
|
||||
* @author Brent R. Matzelle (original founder)
|
||||
* @copyright 2012 - 2023 Marcus Bointon
|
||||
* @copyright 2010 - 2012 Jim Jagielski
|
||||
* @copyright 2004 - 2009 Andy Prevost
|
||||
* @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License
|
||||
* @note This program is distributed in the hope that it will be useful - WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE.
|
||||
*/
|
||||
|
||||
namespace PHPMailer\PHPMailer;
|
||||
|
||||
/**
|
||||
* Configure PHPMailer with DSN string.
|
||||
*
|
||||
* @see https://en.wikipedia.org/wiki/Data_source_name
|
||||
*
|
||||
* @author Oleg Voronkovich <oleg-voronkovich@yandex.ru>
|
||||
*/
|
||||
class DSNConfigurator
|
||||
{
|
||||
/**
|
||||
* Create new PHPMailer instance configured by DSN.
|
||||
*
|
||||
* @param string $dsn DSN
|
||||
* @param bool $exceptions Should we throw external exceptions?
|
||||
*
|
||||
* @return PHPMailer
|
||||
*/
|
||||
public static function mailer($dsn, $exceptions = null)
|
||||
{
|
||||
static $configurator = null;
|
||||
|
||||
if (null === $configurator) {
|
||||
$configurator = new DSNConfigurator();
|
||||
}
|
||||
|
||||
return $configurator->configure(new PHPMailer($exceptions), $dsn);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure PHPMailer instance with DSN string.
|
||||
*
|
||||
* @param PHPMailer $mailer PHPMailer instance
|
||||
* @param string $dsn DSN
|
||||
*
|
||||
* @return PHPMailer
|
||||
*/
|
||||
public function configure(PHPMailer $mailer, $dsn)
|
||||
{
|
||||
$config = $this->parseDSN($dsn);
|
||||
|
||||
$this->applyConfig($mailer, $config);
|
||||
|
||||
return $mailer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse DSN string.
|
||||
*
|
||||
* @param string $dsn DSN
|
||||
*
|
||||
* @throws Exception If DSN is malformed
|
||||
*
|
||||
* @return array Configuration
|
||||
*/
|
||||
private function parseDSN($dsn)
|
||||
{
|
||||
$config = $this->parseUrl($dsn);
|
||||
|
||||
if (false === $config || !isset($config['scheme']) || !isset($config['host'])) {
|
||||
throw new Exception('Malformed DSN');
|
||||
}
|
||||
|
||||
if (isset($config['query'])) {
|
||||
parse_str($config['query'], $config['query']);
|
||||
}
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply configuration to mailer.
|
||||
*
|
||||
* @param PHPMailer $mailer PHPMailer instance
|
||||
* @param array $config Configuration
|
||||
*
|
||||
* @throws Exception If scheme is invalid
|
||||
*/
|
||||
private function applyConfig(PHPMailer $mailer, $config)
|
||||
{
|
||||
switch ($config['scheme']) {
|
||||
case 'mail':
|
||||
$mailer->isMail();
|
||||
break;
|
||||
case 'sendmail':
|
||||
$mailer->isSendmail();
|
||||
break;
|
||||
case 'qmail':
|
||||
$mailer->isQmail();
|
||||
break;
|
||||
case 'smtp':
|
||||
case 'smtps':
|
||||
$mailer->isSMTP();
|
||||
$this->configureSMTP($mailer, $config);
|
||||
break;
|
||||
default:
|
||||
throw new Exception(
|
||||
sprintf(
|
||||
'Invalid scheme: "%s". Allowed values: "mail", "sendmail", "qmail", "smtp", "smtps".',
|
||||
$config['scheme']
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($config['query'])) {
|
||||
$this->configureOptions($mailer, $config['query']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure SMTP.
|
||||
*
|
||||
* @param PHPMailer $mailer PHPMailer instance
|
||||
* @param array $config Configuration
|
||||
*/
|
||||
private function configureSMTP($mailer, $config)
|
||||
{
|
||||
$isSMTPS = 'smtps' === $config['scheme'];
|
||||
|
||||
if ($isSMTPS) {
|
||||
$mailer->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS;
|
||||
}
|
||||
|
||||
$mailer->Host = $config['host'];
|
||||
|
||||
if (isset($config['port'])) {
|
||||
$mailer->Port = $config['port'];
|
||||
} elseif ($isSMTPS) {
|
||||
$mailer->Port = SMTP::DEFAULT_SECURE_PORT;
|
||||
}
|
||||
|
||||
$mailer->SMTPAuth = isset($config['user']) || isset($config['pass']);
|
||||
|
||||
if (isset($config['user'])) {
|
||||
$mailer->Username = $config['user'];
|
||||
}
|
||||
|
||||
if (isset($config['pass'])) {
|
||||
$mailer->Password = $config['pass'];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure options.
|
||||
*
|
||||
* @param PHPMailer $mailer PHPMailer instance
|
||||
* @param array $options Options
|
||||
*
|
||||
* @throws Exception If option is unknown
|
||||
*/
|
||||
private function configureOptions(PHPMailer $mailer, $options)
|
||||
{
|
||||
$allowedOptions = get_object_vars($mailer);
|
||||
|
||||
unset($allowedOptions['Mailer']);
|
||||
unset($allowedOptions['SMTPAuth']);
|
||||
unset($allowedOptions['Username']);
|
||||
unset($allowedOptions['Password']);
|
||||
unset($allowedOptions['Hostname']);
|
||||
unset($allowedOptions['Port']);
|
||||
unset($allowedOptions['ErrorInfo']);
|
||||
|
||||
$allowedOptions = \array_keys($allowedOptions);
|
||||
|
||||
foreach ($options as $key => $value) {
|
||||
if (!in_array($key, $allowedOptions)) {
|
||||
throw new Exception(
|
||||
sprintf(
|
||||
'Unknown option: "%s". Allowed values: "%s"',
|
||||
$key,
|
||||
implode('", "', $allowedOptions)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
switch ($key) {
|
||||
case 'AllowEmpty':
|
||||
case 'SMTPAutoTLS':
|
||||
case 'SMTPKeepAlive':
|
||||
case 'SingleTo':
|
||||
case 'UseSendmailOptions':
|
||||
case 'do_verp':
|
||||
case 'DKIM_copyHeaderFields':
|
||||
$mailer->$key = (bool) $value;
|
||||
break;
|
||||
case 'Priority':
|
||||
case 'SMTPDebug':
|
||||
case 'WordWrap':
|
||||
$mailer->$key = (int) $value;
|
||||
break;
|
||||
default:
|
||||
$mailer->$key = $value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse a URL.
|
||||
* Wrapper for the built-in parse_url function to work around a bug in PHP 5.5.
|
||||
*
|
||||
* @param string $url URL
|
||||
*
|
||||
* @return array|false
|
||||
*/
|
||||
protected function parseUrl($url)
|
||||
{
|
||||
if (\PHP_VERSION_ID >= 50600 || false === strpos($url, '?')) {
|
||||
return parse_url($url);
|
||||
}
|
||||
|
||||
$chunks = explode('?', $url);
|
||||
if (is_array($chunks)) {
|
||||
$result = parse_url($chunks[0]);
|
||||
if (is_array($result)) {
|
||||
$result['query'] = $chunks[1];
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -750,7 +750,7 @@ class PHPMailer
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.7.1';
|
||||
const VERSION = '6.8.1';
|
||||
|
||||
/**
|
||||
* Error severity: message only, continue processing.
|
||||
|
|
@ -795,7 +795,7 @@ class PHPMailer
|
|||
* The maximum line length supported by mail().
|
||||
*
|
||||
* Background: mail() will sometimes corrupt messages
|
||||
* with headers headers longer than 65 chars, see #818.
|
||||
* with headers longer than 65 chars, see #818.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
|
|
@ -2423,7 +2423,7 @@ class PHPMailer
|
|||
*/
|
||||
public function addrFormat($addr)
|
||||
{
|
||||
if (empty($addr[1])) { //No name provided
|
||||
if (!isset($addr[1]) || ($addr[1] === '')) { //No name provided
|
||||
return $this->secureHeader($addr[0]);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ class POP3
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.7.1';
|
||||
const VERSION = '6.8.1';
|
||||
|
||||
/**
|
||||
* Default POP3 port number.
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SMTP
|
|||
*
|
||||
* @var string
|
||||
*/
|
||||
const VERSION = '6.7.1';
|
||||
const VERSION = '6.8.1';
|
||||
|
||||
/**
|
||||
* SMTP line break constant.
|
||||
|
|
@ -51,6 +51,13 @@ class SMTP
|
|||
*/
|
||||
const DEFAULT_PORT = 25;
|
||||
|
||||
/**
|
||||
* The SMTPs port to use if one is not specified.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
const DEFAULT_SECURE_PORT = 465;
|
||||
|
||||
/**
|
||||
* The maximum line length allowed by RFC 5321 section 4.5.3.1.6,
|
||||
* *excluding* a trailing CRLF break.
|
||||
|
|
@ -187,6 +194,7 @@ class SMTP
|
|||
'SendGrid' => '/[\d]{3} Ok: queued as (.*)/',
|
||||
'CampaignMonitor' => '/[\d]{3} 2.0.0 OK:([a-zA-Z\d]{48})/',
|
||||
'Haraka' => '/[\d]{3} Message Queued \((.*)\)/',
|
||||
'ZoneMTA' => '/[\d]{3} Message queued as (.*)/',
|
||||
'Mailjet' => '/[\d]{3} OK queued as (.*)/',
|
||||
];
|
||||
|
||||
|
|
@ -696,7 +704,7 @@ class SMTP
|
|||
* Send an SMTP DATA command.
|
||||
* Issues a data command and sends the msg_data to the server,
|
||||
* finalizing the mail transaction. $msg_data is the message
|
||||
* that is to be send with the headers. Each header needs to be
|
||||
* that is to be sent with the headers. Each header needs to be
|
||||
* on a single line followed by a <CRLF> with the message headers
|
||||
* and the message body being separated by an additional <CRLF>.
|
||||
* Implements RFC 821: DATA <CRLF>.
|
||||
|
|
@ -724,7 +732,7 @@ class SMTP
|
|||
$lines = explode("\n", str_replace(["\r\n", "\r"], "\n", $msg_data));
|
||||
|
||||
/* To distinguish between a complete RFC822 message and a plain message body, we check if the first field
|
||||
* of the first line (':' separated) does not contain a space then it _should_ be a header and we will
|
||||
* of the first line (':' separated) does not contain a space then it _should_ be a header, and we will
|
||||
* process all lines before a blank line as headers.
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
// This file is automatically generated at:2023-07-18 16:34:37
|
||||
// This file is automatically generated at:2023-09-27 17:44:20
|
||||
declare (strict_types = 1);
|
||||
return array (
|
||||
0 => 'think\\captcha\\CaptchaService',
|
||||
|
|
|
|||
|
|
@ -115,7 +115,11 @@ class RegisterListenersPass implements CompilerPassInterface
|
|||
], function ($matches) { return strtoupper($matches[0]); }, $event['event']);
|
||||
$event['method'] = preg_replace('/[^a-z0-9]/i', '', $event['method']);
|
||||
|
||||
if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method']) && $r->hasMethod('__invoke')) {
|
||||
if (null !== ($class = $container->getDefinition($id)->getClass()) && ($r = $container->getReflectionClass($class, false)) && !$r->hasMethod($event['method'])) {
|
||||
if (!$r->hasMethod('__invoke')) {
|
||||
throw new InvalidArgumentException(sprintf('None of the "%s" or "__invoke" methods exist for the service "%s". Please define the "method" attribute on "%s" tags.', $event['method'], $id, $this->listenerTag));
|
||||
}
|
||||
|
||||
$event['method'] = '__invoke';
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class UploadedFile extends File
|
|||
* Returns the original file name.
|
||||
*
|
||||
* It is extracted from the request from which the file has been uploaded.
|
||||
* Then it should not be considered as a safe value.
|
||||
* This should not be considered as a safe value to use for a file name on your servers.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
@ -87,7 +87,7 @@ class UploadedFile extends File
|
|||
* Returns the original file extension.
|
||||
*
|
||||
* It is extracted from the original file name that was uploaded.
|
||||
* Then it should not be considered as a safe value.
|
||||
* This should not be considered as a safe value to use for a file name on your servers.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -246,6 +246,9 @@ class Request
|
|||
self::HEADER_X_FORWARDED_PREFIX => 'X_FORWARDED_PREFIX',
|
||||
];
|
||||
|
||||
/** @var bool */
|
||||
private $isIisRewrite = false;
|
||||
|
||||
/**
|
||||
* @param array $query The GET parameters
|
||||
* @param array $request The POST parameters
|
||||
|
|
@ -1805,11 +1808,10 @@ class Request
|
|||
{
|
||||
$requestUri = '';
|
||||
|
||||
if ('1' == $this->server->get('IIS_WasUrlRewritten') && '' != $this->server->get('UNENCODED_URL')) {
|
||||
if ($this->isIisRewrite() && '' != $this->server->get('UNENCODED_URL')) {
|
||||
// IIS7 with URL Rewrite: make sure we get the unencoded URL (double slash problem)
|
||||
$requestUri = $this->server->get('UNENCODED_URL');
|
||||
$this->server->remove('UNENCODED_URL');
|
||||
$this->server->remove('IIS_WasUrlRewritten');
|
||||
} elseif ($this->server->has('REQUEST_URI')) {
|
||||
$requestUri = $this->server->get('REQUEST_URI');
|
||||
|
||||
|
|
@ -2012,7 +2014,13 @@ class Request
|
|||
*/
|
||||
private function getUrlencodedPrefix(string $string, string $prefix): ?string
|
||||
{
|
||||
if (!str_starts_with(rawurldecode($string), $prefix)) {
|
||||
if ($this->isIisRewrite()) {
|
||||
// ISS with UrlRewriteModule might report SCRIPT_NAME/PHP_SELF with wrong case
|
||||
// see https://github.com/php/php-src/issues/11981
|
||||
if (0 !== stripos(rawurldecode($string), $prefix)) {
|
||||
return null;
|
||||
}
|
||||
} elseif (!str_starts_with(rawurldecode($string), $prefix)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -2145,4 +2153,20 @@ class Request
|
|||
// Now the IP chain contains only untrusted proxies and the client IP
|
||||
return $clientIps ? array_reverse($clientIps) : [$firstTrustedIp];
|
||||
}
|
||||
|
||||
/**
|
||||
* Is this IIS with UrlRewriteModule?
|
||||
*
|
||||
* This method consumes, caches and removed the IIS_WasUrlRewritten env var,
|
||||
* so we don't inherit it to sub-requests.
|
||||
*/
|
||||
private function isIisRewrite(): bool
|
||||
{
|
||||
if (1 === $this->server->getInt('IIS_WasUrlRewritten')) {
|
||||
$this->isIisRewrite = true;
|
||||
$this->server->remove('IIS_WasUrlRewritten');
|
||||
}
|
||||
|
||||
return $this->isIisRewrite;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -298,7 +298,7 @@ class Response
|
|||
$charset = $this->charset ?: 'UTF-8';
|
||||
if (!$headers->has('Content-Type')) {
|
||||
$headers->set('Content-Type', 'text/html; charset='.$charset);
|
||||
} elseif (0 === stripos($headers->get('Content-Type'), 'text/') && false === stripos($headers->get('Content-Type'), 'charset')) {
|
||||
} elseif (0 === stripos($headers->get('Content-Type') ?? '', 'text/') && false === stripos($headers->get('Content-Type') ?? '', 'charset')) {
|
||||
// add the charset
|
||||
$headers->set('Content-Type', $headers->get('Content-Type').'; charset='.$charset);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ class ServerBag extends ParameterBag
|
|||
* RewriteCond %{HTTP:Authorization} .+
|
||||
* RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
|
||||
* RewriteCond %{REQUEST_FILENAME} !-f
|
||||
* RewriteRule ^(.*)$ app.php [QSA,L]
|
||||
* RewriteRule ^(.*)$ index.php [QSA,L]
|
||||
*/
|
||||
|
||||
$authorizationHeader = null;
|
||||
|
|
|
|||
|
|
@ -28,14 +28,14 @@
|
|||
"symfony/dependency-injection": "^4.4|^5.0|^6.0",
|
||||
"symfony/property-access": "^4.4|^5.1|^6.0",
|
||||
"symfony/property-info": "^4.4|^5.1|^6.0",
|
||||
"symfony/serializer": "^5.4.14|~6.0.14|^6.1.6"
|
||||
"symfony/serializer": "^5.4.26|~6.2.13|^6.3.2"
|
||||
},
|
||||
"conflict": {
|
||||
"egulias/email-validator": "~3.0.0",
|
||||
"phpdocumentor/reflection-docblock": "<3.2.2",
|
||||
"phpdocumentor/type-resolver": "<1.4.0",
|
||||
"symfony/mailer": "<4.4",
|
||||
"symfony/serializer": "<5.4.14|>=6.0,<6.0.14|>=6.1,<6.1.6"
|
||||
"symfony/serializer": "<5.4.26|>=6,<6.2.13|>=6.3,<6.3.2"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": { "Symfony\\Component\\Mime\\": "" },
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@
|
|||
|
||||
namespace Symfony\Polyfill\Intl\Idn;
|
||||
|
||||
use Exception;
|
||||
use Normalizer;
|
||||
use Symfony\Polyfill\Intl\Idn\Resources\unidata\DisallowedRanges;
|
||||
use Symfony\Polyfill\Intl\Idn\Resources\unidata\Regex;
|
||||
|
||||
|
|
@ -167,7 +165,7 @@ final class Idn
|
|||
if (1 === preg_match('/[^\x00-\x7F]/', $label)) {
|
||||
try {
|
||||
$label = 'xn--'.self::punycodeEncode($label);
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
}
|
||||
|
||||
|
|
@ -335,8 +333,8 @@ final class Idn
|
|||
$domain = self::mapCodePoints($domain, $options, $info);
|
||||
|
||||
// Step 2. Normalize the domain name string to Unicode Normalization Form C.
|
||||
if (!Normalizer::isNormalized($domain, Normalizer::FORM_C)) {
|
||||
$domain = Normalizer::normalize($domain, Normalizer::FORM_C);
|
||||
if (!\Normalizer::isNormalized($domain, \Normalizer::FORM_C)) {
|
||||
$domain = \Normalizer::normalize($domain, \Normalizer::FORM_C);
|
||||
}
|
||||
|
||||
// Step 3. Break the string into labels at U+002E (.) FULL STOP.
|
||||
|
|
@ -350,7 +348,7 @@ final class Idn
|
|||
if ('xn--' === substr($label, 0, 4)) {
|
||||
try {
|
||||
$label = self::punycodeDecode(substr($label, 4));
|
||||
} catch (Exception $e) {
|
||||
} catch (\Exception $e) {
|
||||
$info->errors |= self::ERROR_PUNYCODE;
|
||||
|
||||
continue;
|
||||
|
|
@ -496,7 +494,7 @@ final class Idn
|
|||
}
|
||||
|
||||
// Step 1. The label must be in Unicode Normalization Form C.
|
||||
if (!Normalizer::isNormalized($label, Normalizer::FORM_C)) {
|
||||
if (!\Normalizer::isNormalized($label, \Normalizer::FORM_C)) {
|
||||
$info->errors |= self::ERROR_INVALID_ACE_LABEL;
|
||||
}
|
||||
|
||||
|
|
@ -583,7 +581,7 @@ final class Idn
|
|||
|
||||
for ($j = 0; $j < $b; ++$j) {
|
||||
if ($bytes[$j] > 0x7F) {
|
||||
throw new Exception('Invalid input');
|
||||
throw new \Exception('Invalid input');
|
||||
}
|
||||
|
||||
$output[$out++] = $input[$j];
|
||||
|
|
@ -599,17 +597,17 @@ final class Idn
|
|||
|
||||
for ($k = self::BASE; /* no condition */; $k += self::BASE) {
|
||||
if ($in >= $inputLength) {
|
||||
throw new Exception('Invalid input');
|
||||
throw new \Exception('Invalid input');
|
||||
}
|
||||
|
||||
$digit = self::$basicToDigit[$bytes[$in++] & 0xFF];
|
||||
|
||||
if ($digit < 0) {
|
||||
throw new Exception('Invalid input');
|
||||
throw new \Exception('Invalid input');
|
||||
}
|
||||
|
||||
if ($digit > intdiv(self::MAX_INT - $i, $w)) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$i += $digit * $w;
|
||||
|
|
@ -629,7 +627,7 @@ final class Idn
|
|||
$baseMinusT = self::BASE - $t;
|
||||
|
||||
if ($w > intdiv(self::MAX_INT, $baseMinusT)) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$w *= $baseMinusT;
|
||||
|
|
@ -639,7 +637,7 @@ final class Idn
|
|||
$bias = self::adaptBias($i - $oldi, $outPlusOne, 0 === $oldi);
|
||||
|
||||
if (intdiv($i, $outPlusOne) > self::MAX_INT - $n) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$n += intdiv($i, $outPlusOne);
|
||||
|
|
@ -694,7 +692,7 @@ final class Idn
|
|||
}
|
||||
|
||||
if ($m - $n > intdiv(self::MAX_INT - $delta, $h + 1)) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
$delta += ($m - $n) * ($h + 1);
|
||||
|
|
@ -702,7 +700,7 @@ final class Idn
|
|||
|
||||
foreach ($iter as $codePoint) {
|
||||
if ($codePoint < $n && 0 === ++$delta) {
|
||||
throw new Exception('Integer overflow');
|
||||
throw new \Exception('Integer overflow');
|
||||
}
|
||||
|
||||
if ($codePoint === $n) {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2018-2019 Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me>
|
||||
Copyright (c) 2018-present Fabien Potencier and Trevor Rowbotham <trevor.rowbotham@pm.me>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,5 +1,14 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Symfony package.
|
||||
*
|
||||
* (c) Fabien Potencier <fabien@symfony.com>
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace Symfony\Polyfill\Intl\Idn\Resources\unidata;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@
|
|||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2015-2019 Fabien Potencier
|
||||
Copyright (c) 2015-present Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2015-2019 Fabien Potencier
|
||||
Copyright (c) 2015-present Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ final class Mbstring
|
|||
{
|
||||
public const MB_CASE_FOLD = \PHP_INT_MAX;
|
||||
|
||||
private const CASE_FOLD = [
|
||||
private const SIMPLE_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", 'ι'],
|
||||
];
|
||||
|
|
@ -301,7 +301,11 @@ final class Mbstring
|
|||
$map = $upper;
|
||||
} else {
|
||||
if (self::MB_CASE_FOLD === $mode) {
|
||||
$s = str_replace(self::CASE_FOLD[0], self::CASE_FOLD[1], $s);
|
||||
static $caseFolding = null;
|
||||
if (null === $caseFolding) {
|
||||
$caseFolding = self::getData('caseFolding');
|
||||
}
|
||||
$s = strtr($s, $caseFolding);
|
||||
}
|
||||
|
||||
static $lower = null;
|
||||
|
|
@ -406,6 +410,12 @@ final class Mbstring
|
|||
|
||||
public static function mb_check_encoding($var = null, $encoding = null)
|
||||
{
|
||||
if (PHP_VERSION_ID < 70200 && \is_array($var)) {
|
||||
trigger_error('mb_check_encoding() expects parameter 1 to be string, array given', \E_USER_WARNING);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
if (null === $encoding) {
|
||||
if (null === $var) {
|
||||
return false;
|
||||
|
|
@ -413,7 +423,21 @@ final class Mbstring
|
|||
$encoding = self::$internalEncoding;
|
||||
}
|
||||
|
||||
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
|
||||
if (!\is_array($var)) {
|
||||
return self::mb_detect_encoding($var, [$encoding]) || false !== @iconv($encoding, $encoding, $var);
|
||||
}
|
||||
|
||||
foreach ($var as $key => $value) {
|
||||
if (!self::mb_check_encoding($key, $encoding)) {
|
||||
return false;
|
||||
}
|
||||
if (!self::mb_check_encoding($value, $encoding)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
public static function mb_detect_encoding($str, $encodingList = null, $strict = false)
|
||||
|
|
@ -638,8 +662,10 @@ final class Mbstring
|
|||
|
||||
public static function mb_stripos($haystack, $needle, $offset = 0, $encoding = null)
|
||||
{
|
||||
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
||||
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
||||
[$haystack, $needle] = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], [
|
||||
self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding),
|
||||
self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding),
|
||||
]);
|
||||
|
||||
return self::mb_strpos($haystack, $needle, $offset, $encoding);
|
||||
}
|
||||
|
|
@ -674,8 +700,11 @@ final class Mbstring
|
|||
|
||||
public static function mb_strripos($haystack, $needle, $offset = 0, $encoding = null)
|
||||
{
|
||||
$haystack = self::mb_convert_case($haystack, self::MB_CASE_FOLD, $encoding);
|
||||
$needle = self::mb_convert_case($needle, self::MB_CASE_FOLD, $encoding);
|
||||
$haystack = self::mb_convert_case($haystack, \MB_CASE_LOWER, $encoding);
|
||||
$needle = self::mb_convert_case($needle, \MB_CASE_LOWER, $encoding);
|
||||
|
||||
$haystack = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $haystack);
|
||||
$needle = str_replace(self::SIMPLE_CASE_FOLD[0], self::SIMPLE_CASE_FOLD[1], $needle);
|
||||
|
||||
return self::mb_strrpos($haystack, $needle, $offset, $encoding);
|
||||
}
|
||||
|
|
@ -798,6 +827,50 @@ final class Mbstring
|
|||
return $code;
|
||||
}
|
||||
|
||||
public static function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = \STR_PAD_RIGHT, string $encoding = null): string
|
||||
{
|
||||
if (!\in_array($pad_type, [\STR_PAD_RIGHT, \STR_PAD_LEFT, \STR_PAD_BOTH], true)) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #4 ($pad_type) must be STR_PAD_LEFT, STR_PAD_RIGHT, or STR_PAD_BOTH');
|
||||
}
|
||||
|
||||
if (null === $encoding) {
|
||||
$encoding = self::mb_internal_encoding();
|
||||
}
|
||||
|
||||
try {
|
||||
$validEncoding = @self::mb_check_encoding('', $encoding);
|
||||
} catch (\ValueError $e) {
|
||||
throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
||||
}
|
||||
|
||||
// BC for PHP 7.3 and lower
|
||||
if (!$validEncoding) {
|
||||
throw new \ValueError(sprintf('mb_str_pad(): Argument #5 ($encoding) must be a valid encoding, "%s" given', $encoding));
|
||||
}
|
||||
|
||||
if (self::mb_strlen($pad_string, $encoding) <= 0) {
|
||||
throw new \ValueError('mb_str_pad(): Argument #3 ($pad_string) must be a non-empty string');
|
||||
}
|
||||
|
||||
$paddingRequired = $length - self::mb_strlen($string, $encoding);
|
||||
|
||||
if ($paddingRequired < 1) {
|
||||
return $string;
|
||||
}
|
||||
|
||||
switch ($pad_type) {
|
||||
case \STR_PAD_LEFT:
|
||||
return self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding).$string;
|
||||
case \STR_PAD_RIGHT:
|
||||
return $string.self::mb_substr(str_repeat($pad_string, $paddingRequired), 0, $paddingRequired, $encoding);
|
||||
default:
|
||||
$leftPaddingLength = floor($paddingRequired / 2);
|
||||
$rightPaddingLength = $paddingRequired - $leftPaddingLength;
|
||||
|
||||
return self::mb_substr(str_repeat($pad_string, $leftPaddingLength), 0, $leftPaddingLength, $encoding).$string.self::mb_substr(str_repeat($pad_string, $rightPaddingLength), 0, $rightPaddingLength, $encoding);
|
||||
}
|
||||
}
|
||||
|
||||
private static function getSubpart($pos, $part, $haystack, $encoding)
|
||||
{
|
||||
if (false === $pos) {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,119 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
'İ' => 'i̇',
|
||||
'µ' => 'μ',
|
||||
'ſ' => 's',
|
||||
'ͅ' => 'ι',
|
||||
'ς' => 'σ',
|
||||
'ϐ' => 'β',
|
||||
'ϑ' => 'θ',
|
||||
'ϕ' => 'φ',
|
||||
'ϖ' => 'π',
|
||||
'ϰ' => 'κ',
|
||||
'ϱ' => 'ρ',
|
||||
'ϵ' => 'ε',
|
||||
'ẛ' => 'ṡ',
|
||||
'ι' => 'ι',
|
||||
'ß' => 'ss',
|
||||
'ʼn' => 'ʼn',
|
||||
'ǰ' => 'ǰ',
|
||||
'ΐ' => 'ΐ',
|
||||
'ΰ' => 'ΰ',
|
||||
'և' => 'եւ',
|
||||
'ẖ' => 'ẖ',
|
||||
'ẗ' => 'ẗ',
|
||||
'ẘ' => 'ẘ',
|
||||
'ẙ' => 'ẙ',
|
||||
'ẚ' => 'aʾ',
|
||||
'ẞ' => 'ss',
|
||||
'ὐ' => 'ὐ',
|
||||
'ὒ' => 'ὒ',
|
||||
'ὔ' => 'ὔ',
|
||||
'ὖ' => 'ὖ',
|
||||
'ᾀ' => 'ἀι',
|
||||
'ᾁ' => 'ἁι',
|
||||
'ᾂ' => 'ἂι',
|
||||
'ᾃ' => 'ἃι',
|
||||
'ᾄ' => 'ἄι',
|
||||
'ᾅ' => 'ἅι',
|
||||
'ᾆ' => 'ἆι',
|
||||
'ᾇ' => 'ἇι',
|
||||
'ᾈ' => 'ἀι',
|
||||
'ᾉ' => 'ἁι',
|
||||
'ᾊ' => 'ἂι',
|
||||
'ᾋ' => 'ἃι',
|
||||
'ᾌ' => 'ἄι',
|
||||
'ᾍ' => 'ἅι',
|
||||
'ᾎ' => 'ἆι',
|
||||
'ᾏ' => 'ἇι',
|
||||
'ᾐ' => 'ἠι',
|
||||
'ᾑ' => 'ἡι',
|
||||
'ᾒ' => 'ἢι',
|
||||
'ᾓ' => 'ἣι',
|
||||
'ᾔ' => 'ἤι',
|
||||
'ᾕ' => 'ἥι',
|
||||
'ᾖ' => 'ἦι',
|
||||
'ᾗ' => 'ἧι',
|
||||
'ᾘ' => 'ἠι',
|
||||
'ᾙ' => 'ἡι',
|
||||
'ᾚ' => 'ἢι',
|
||||
'ᾛ' => 'ἣι',
|
||||
'ᾜ' => 'ἤι',
|
||||
'ᾝ' => 'ἥι',
|
||||
'ᾞ' => 'ἦι',
|
||||
'ᾟ' => 'ἧι',
|
||||
'ᾠ' => 'ὠι',
|
||||
'ᾡ' => 'ὡι',
|
||||
'ᾢ' => 'ὢι',
|
||||
'ᾣ' => 'ὣι',
|
||||
'ᾤ' => 'ὤι',
|
||||
'ᾥ' => 'ὥι',
|
||||
'ᾦ' => 'ὦι',
|
||||
'ᾧ' => 'ὧι',
|
||||
'ᾨ' => 'ὠι',
|
||||
'ᾩ' => 'ὡι',
|
||||
'ᾪ' => 'ὢι',
|
||||
'ᾫ' => 'ὣι',
|
||||
'ᾬ' => 'ὤι',
|
||||
'ᾭ' => 'ὥι',
|
||||
'ᾮ' => 'ὦι',
|
||||
'ᾯ' => 'ὧι',
|
||||
'ᾲ' => 'ὰι',
|
||||
'ᾳ' => 'αι',
|
||||
'ᾴ' => 'άι',
|
||||
'ᾶ' => 'ᾶ',
|
||||
'ᾷ' => 'ᾶι',
|
||||
'ᾼ' => 'αι',
|
||||
'ῂ' => 'ὴι',
|
||||
'ῃ' => 'ηι',
|
||||
'ῄ' => 'ήι',
|
||||
'ῆ' => 'ῆ',
|
||||
'ῇ' => 'ῆι',
|
||||
'ῌ' => 'ηι',
|
||||
'ῒ' => 'ῒ',
|
||||
'ῖ' => 'ῖ',
|
||||
'ῗ' => 'ῗ',
|
||||
'ῢ' => 'ῢ',
|
||||
'ῤ' => 'ῤ',
|
||||
'ῦ' => 'ῦ',
|
||||
'ῧ' => 'ῧ',
|
||||
'ῲ' => 'ὼι',
|
||||
'ῳ' => 'ωι',
|
||||
'ῴ' => 'ώι',
|
||||
'ῶ' => 'ῶ',
|
||||
'ῷ' => 'ῶι',
|
||||
'ῼ' => 'ωι',
|
||||
'ff' => 'ff',
|
||||
'fi' => 'fi',
|
||||
'fl' => 'fl',
|
||||
'ffi' => 'ffi',
|
||||
'ffl' => 'ffl',
|
||||
'ſt' => 'st',
|
||||
'st' => 'st',
|
||||
'ﬓ' => 'մն',
|
||||
'ﬔ' => 'մե',
|
||||
'ﬕ' => 'մի',
|
||||
'ﬖ' => 'վն',
|
||||
'ﬗ' => 'մխ',
|
||||
];
|
||||
|
|
@ -132,6 +132,10 @@ if (!function_exists('mb_str_split')) {
|
|||
function mb_str_split($string, $length = 1, $encoding = null) { return p\Mbstring::mb_str_split($string, $length, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_str_pad')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -128,6 +128,10 @@ if (!function_exists('mb_str_split')) {
|
|||
function mb_str_split(?string $string, ?int $length = 1, ?string $encoding = null): array { return p\Mbstring::mb_str_split((string) $string, (int) $length, $encoding); }
|
||||
}
|
||||
|
||||
if (!function_exists('mb_str_pad')) {
|
||||
function mb_str_pad(string $string, int $length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT, ?string $encoding = null): string { return p\Mbstring::mb_str_pad($string, $length, $pad_string, $pad_type, $encoding); }
|
||||
}
|
||||
|
||||
if (extension_loaded('mbstring')) {
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@
|
|||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2015-2019 Fabien Potencier
|
||||
Copyright (c) 2015-present Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2020 Fabien Potencier
|
||||
Copyright (c) 2020-present Fabien Potencier
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
"minimum-stability": "dev",
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "1.27-dev"
|
||||
"dev-main": "1.28-dev"
|
||||
},
|
||||
"thanks": {
|
||||
"name": "symfony/polyfill",
|
||||
|
|
|
|||
Loading…
Reference in New Issue