Commit aa7a16b9 authored by 刘小敏's avatar 刘小敏

Merge branch 'dev' of http://git.ruanyiit.com/liuxiaomin/loveisland into dev

parents 25836233 ef230759
...@@ -14,90 +14,71 @@ class Ranking extends Commission ...@@ -14,90 +14,71 @@ class Ranking extends Commission
/** /**
* 佣金排行榜 * 佣金排行榜
* 按用户表佣金字段排序 * 按已结算佣金金额排序
*/ */
public function commission() public function commission()
{ {
$limit = $this->request->param('limit', 20); $limit = $this->request->param('limit', 20);
$timeType = $this->request->param('time_type', 'all'); // all|month|week|day $timeType = $this->request->param('time_type', 'all'); // all|month|week|day
// 从User表直接读取commission字段 $query = RewardModel::field([
$query = UserModel::field([ 'agent_id',
'id as user_id', 'sum(commission) as total_commission',
'nickname', 'count(distinct order_id) as order_count'
'avatar',
'commission as total_commission'
]) ])
->where('commission', '>', 0) ->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED)
->where('status', 'normal'); ->group('agent_id');
// 时间筛选(根据佣金记录计算时间范围内的佣金)
if ($timeType !== 'all') {
// 查询在时间范围内有佣金记录的用户
$rewardQuery = RewardModel::field('agent_id')
->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED);
switch ($timeType) {
case 'month':
$rewardQuery->whereTime('commission_time', 'month');
break;
case 'week':
$rewardQuery->whereTime('commission_time', 'week');
break;
case 'day':
$rewardQuery->whereTime('commission_time', 'today');
break;
}
$agentIds = $rewardQuery->group('agent_id')->column('agent_id'); // 时间筛选
$query->whereIn('id', $agentIds); switch ($timeType) {
case 'month':
$query->whereTime('commission_time', 'month');
break;
case 'week':
$query->whereTime('commission_time', 'week');
break;
case 'day':
$query->whereTime('commission_time', 'today');
break;
} }
$rankings = $query->order('commission', 'desc') $rankings = $query->order('total_commission', 'desc')
->limit($limit) ->limit($limit)
->select(); ->select();
if (empty($rankings)) { if (empty($rankings)) {
$this->success('获取成功', [ $this->success('获取成功', []);
'list' => [], }
'current_user_rank' => null
]); $agentIds = array_column($rankings, 'agent_id');
// 获取用户信息(排除已删除用户)
$users = UserModel::whereIn('id', $agentIds)
->where('status', 'normal')
->field('id, nickname, avatar')
->select();
$userMap = [];
if (is_array($users)) {
$userMap = array_column($users, null, 'id');
} else {
$userMap = $users->column(null, 'id');
} }
$result = []; $result = [];
foreach ($rankings as $index => $item) { foreach ($rankings as $index => $item) {
// 查询订单数量 $user = $userMap[$item->agent_id] ?? null;
$orderCount = 0; // 跳过已删除的用户
if ($timeType !== 'all') { if (!$user) {
$orderQuery = RewardModel::where('agent_id', $item['user_id']) continue;
->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED);
switch ($timeType) {
case 'month':
$orderQuery->whereTime('commission_time', 'month');
break;
case 'week':
$orderQuery->whereTime('commission_time', 'week');
break;
case 'day':
$orderQuery->whereTime('commission_time', 'today');
break;
}
$orderCount = $orderQuery->count('distinct order_id');
} else {
$orderCount = RewardModel::where('agent_id', $item['user_id'])
->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED)
->count('distinct order_id');
} }
$result[] = [ $result[] = [
'rank' => $index + 1, 'rank' => count($result) + 1,
'user_id' => $item['user_id'], 'user_id' => $item->agent_id,
'nickname' => $item['nickname'] ?: '匿名用户', 'nickname' => $user ? $user->nickname : '匿名用户',
'avatar' => $item['avatar'] ?: '', 'avatar' => $user ? $user->avatar : '',
'total_commission' => round($item['total_commission'], 2), 'total_commission' => round($item->total_commission, 2),
'order_count' => $orderCount 'order_count' => $item->order_count
]; ];
} }
...@@ -203,63 +184,65 @@ class Ranking extends Commission ...@@ -203,63 +184,65 @@ class Ranking extends Commission
} }
} }
// 查询当前用户信息 // 查询当前用户的佣金
$user = UserModel::get($userId); $query = RewardModel::where('agent_id', $userId)
if (!$user || $user->commission <= 0) { ->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED);
return null;
switch ($timeType) {
case 'month':
$query->whereTime('commission_time', 'month');
break;
case 'week':
$query->whereTime('commission_time', 'week');
break;
case 'day':
$query->whereTime('commission_time', 'today');
break;
} }
$totalCommission = $user->commission; $totalCommission = $query->sum('commission');
$orderCount = $query->count('distinct order_id');
// 时间筛选时,检查用户是否有对应时间范围内的佣金记录
if ($timeType !== 'all') {
$query = RewardModel::where('agent_id', $userId)
->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED);
switch ($timeType) {
case 'month':
$query->whereTime('commission_time', 'month');
break;
case 'week':
$query->whereTime('commission_time', 'week');
break;
case 'day':
$query->whereTime('commission_time', 'today');
break;
}
if (!$query->find()) { if ($totalCommission <= 0) {
return null; return null;
}
} }
// 查询订单数量 // 计算排名(排除已删除用户)
$orderQuery = RewardModel::where('agent_id', $userId) $rankWhereQuery = RewardModel::where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED);
->where('status', RewardModel::COMMISSION_REWARD_STATUS_ACCOUNTED); switch ($timeType) {
case 'month':
if ($timeType !== 'all') { $rankWhereQuery->whereTime('commission_time', 'month');
switch ($timeType) { break;
case 'month': case 'week':
$orderQuery->whereTime('commission_time', 'month'); $rankWhereQuery->whereTime('commission_time', 'week');
break; break;
case 'week': case 'day':
$orderQuery->whereTime('commission_time', 'week'); $rankWhereQuery->whereTime('commission_time', 'today');
break; break;
case 'day':
$orderQuery->whereTime('commission_time', 'today');
break;
}
} }
$orderCount = $orderQuery->count('distinct order_id'); // 只统计正常状态用户的佣金
$rank = $rankWhereQuery->group('agent_id')
->having('sum(commission) > ' . $totalCommission)
->select();
// 计算排名:统计佣金大于当前用户的人数 // 过滤掉已删除的用户
$rank = UserModel::where('commission', '>', $totalCommission) $validRank = 0;
->where('status', 'normal') if ($rank) {
->count() + 1; $rankIds = array_column($rank, 'agent_id');
$validUsers = UserModel::whereIn('id', $rankIds)
->where('status', 'normal')
->column('id');
$validRank = count($validUsers);
}
$user = UserModel::where('id', $userId)->where('status', 'normal')->find();
if (!$user) {
return null;
}
return [ return [
'rank' => $rank, 'rank' => $validRank + 1,
'user_id' => $userId, 'user_id' => $userId,
'nickname' => $user->nickname ?: '我', 'nickname' => $user->nickname ?: '我',
'avatar' => $user->avatar ?: '', 'avatar' => $user->avatar ?: '',
......
...@@ -34,8 +34,8 @@ class Company extends Common ...@@ -34,8 +34,8 @@ class Company extends Common
*/ */
public function store_list() public function store_list()
{ {
$page = $this->request->get('page') ?? 1; //页码 $page = $this->request->get('page') ?? 1; //页码
$limit = $this->request->get('limit') ?? 10; //每页显示条数 $limit = $this->request->get('limit') ?? 10; //每页显示条数
$storeList = Store::where('status', 'normal') $storeList = Store::where('status', 'normal')
->field('id,store_name,store_logo,detail_address,phone,longitude,latitude,store_intro') ->field('id,store_name,store_logo,detail_address,phone,longitude,latitude,store_intro')
->order('weigh', 'desc') ->order('weigh', 'desc')
...@@ -50,13 +50,15 @@ class Company extends Common ...@@ -50,13 +50,15 @@ class Company extends Common
*/ */
public function technology_list() public function technology_list()
{ {
$page = $this->request->get('page') ?? 1; //页码 $limit = $this->request->get('limit') ?? 3; //每页显示条数
$limit = $this->request->get('limit') ?? 3; //每页显示条数 if ($limit < 1) {
$limit = 1;
}
$technologyList = CompanyTechnology::where('status', 'normal') $technologyList = CompanyTechnology::where('status', 'normal')
->field('id,tech_name,tech_image,tech_desc') ->field('id,tech_name,tech_image,tech_desc')
->order('weigh', 'desc') ->order('weigh', 'desc')
->paginate(["page" => $page, "list_rows" => $limit]); ->limit($limit)
->select();
return $this->success('成功', $technologyList); return $this->success('成功', $technologyList);
} }
......
<?php
return [
'application' => [
'shop' => [
'room_id' => 'admin',
],
],
'basic' => [
'allocate' => 'busy',
'auto_customer_service' => '1',
'last_customer_service' => '1',
],
'system' => [
'inside_host' => '127.0.0.1',
'inside_port' => '9292',
'port' => '2222',
'ssl' => 'reverse_proxy',
'ssl_cert' => '',
'ssl_key' => '',
],
];
\ No newline at end of file
...@@ -17,7 +17,10 @@ ...@@ -17,7 +17,10 @@
], ],
"require": { "require": {
"php": ">=7.1.0", "php": ">=7.1.0",
"topthink/think-installer": "~1.0" "topthink/think-installer": "~1.0",
"ext-fileinfo": "*",
"ext-mbstring": "*",
"ext-json": "*"
}, },
"require-dev": { "require-dev": {
"phpunit/phpunit": "4.8.*", "phpunit/phpunit": "4.8.*",
......
...@@ -74,7 +74,7 @@ class App ...@@ -74,7 +74,7 @@ class App
* @return Response * @return Response
* @throws Exception * @throws Exception
*/ */
public static function run(Request $request = null) public static function run(?Request $request = null)
{ {
$request = is_null($request) ? Request::instance() : $request; $request = is_null($request) ? Request::instance() : $request;
......
...@@ -263,7 +263,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria ...@@ -263,7 +263,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @param callable|null $callback 回调函数 * @param callable|null $callback 回调函数
* @return static * @return static
*/ */
public function filter(callable $callback = null) public function filter(?callable $callback = null)
{ {
return new static(array_filter($this->items, $callback ?: null)); return new static(array_filter($this->items, $callback ?: null));
} }
...@@ -317,7 +317,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria ...@@ -317,7 +317,7 @@ class Collection implements ArrayAccess, Countable, IteratorAggregate, JsonSeria
* @param callable|null $callback 回调函数 * @param callable|null $callback 回调函数
* @return static * @return static
*/ */
public function sort(callable $callback = null) public function sort(?callable $callback = null)
{ {
$items = $this->items; $items = $this->items;
$callback = $callback ?: function ($a, $b) { $callback = $callback ?: function ($a, $b) {
......
...@@ -50,7 +50,7 @@ class Controller ...@@ -50,7 +50,7 @@ class Controller
* @access public * @access public
* @param Request $request Request 对象 * @param Request $request Request 对象
*/ */
public function __construct(Request $request = null) public function __construct(?Request $request = null)
{ {
$this->view = View::instance(Config::get('template'), Config::get('view_replace_str')); $this->view = View::instance(Config::get('template'), Config::get('view_replace_str'));
$this->request = is_null($request) ? Request::instance() : $request; $this->request = is_null($request) ? Request::instance() : $request;
......
...@@ -150,12 +150,19 @@ class File extends SplFileObject ...@@ -150,12 +150,19 @@ class File extends SplFileObject
*/ */
protected function checkPath($path) protected function checkPath($path)
{ {
if (is_dir($path) || mkdir($path, 0755, true)) { if (is_dir($path)) {
return true; return true;
} }
$this->error = ['directory {:path} creation failed', ['path' => $path]]; if (@mkdir($path, 0755, true)) {
return true;
}
if (is_dir($path)) {
return true;
}
$this->error = ['directory {:path} creation failed', ['path' => $path]];
return false; return false;
} }
......
...@@ -537,6 +537,11 @@ abstract class Model implements \JsonSerializable, \ArrayAccess ...@@ -537,6 +537,11 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
list($type, $param) = explode(':', $type, 2); list($type, $param) = explode(':', $type, 2);
} }
switch ($type) { switch ($type) {
case 'string':
case 'bigint':
$value = (string) $value;
break;
case 'int':
case 'integer': case 'integer':
$value = (int) $value; $value = (int) $value;
break; break;
...@@ -547,6 +552,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess ...@@ -547,6 +552,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$value = (float) number_format($value, $param, '.', ''); $value = (float) number_format($value, $param, '.', '');
} }
break; break;
case 'bool':
case 'boolean': case 'boolean':
$value = (bool) $value; $value = (bool) $value;
break; break;
...@@ -670,6 +676,11 @@ abstract class Model implements \JsonSerializable, \ArrayAccess ...@@ -670,6 +676,11 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
list($type, $param) = explode(':', $type, 2); list($type, $param) = explode(':', $type, 2);
} }
switch ($type) { switch ($type) {
case 'string':
case 'bigint':
$value = (string) $value;
break;
case 'int':
case 'integer': case 'integer':
$value = (int) $value; $value = (int) $value;
break; break;
...@@ -680,6 +691,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess ...@@ -680,6 +691,7 @@ abstract class Model implements \JsonSerializable, \ArrayAccess
$value = (float) number_format($value, $param, '.', ''); $value = (float) number_format($value, $param, '.', '');
} }
break; break;
case 'bool':
case 'boolean': case 'boolean':
$value = (bool) $value; $value = (bool) $value;
break; break;
......
...@@ -123,7 +123,7 @@ class Process ...@@ -123,7 +123,7 @@ class Process
* @throws \RuntimeException * @throws \RuntimeException
* @api * @api
*/ */
public function __construct($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = []) public function __construct($commandline, $cwd = null, ?array $env = null, $input = null, $timeout = 60, array $options = [])
{ {
if (!function_exists('proc_open')) { if (!function_exists('proc_open')) {
throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.'); throw new \RuntimeException('The Process class relies on proc_open, which is not available on your PHP installation.');
......
...@@ -521,19 +521,24 @@ class Request ...@@ -521,19 +521,24 @@ class Request
// 获取原始请求类型 // 获取原始请求类型
return $this->server('REQUEST_METHOD') ?: 'GET'; return $this->server('REQUEST_METHOD') ?: 'GET';
} elseif (!$this->method) { } elseif (!$this->method) {
if (isset($_POST[Config::get('var_method')])) { $varMethod = Config::get('var_method');
$method = strtoupper($_POST[Config::get('var_method')]); if ($varMethod && isset($_POST[$varMethod])) {
$method = strtoupper($_POST[$varMethod]);
if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) { if (in_array($method, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) {
$this->method = $method; $this->method = $method;
$this->{$this->method}($_POST); $this->{$this->method}($_POST);
} else { } else {
$this->method = 'POST'; $this->method = 'POST';
} }
unset($_POST[Config::get('var_method')]); unset($_POST[$varMethod]);
} elseif (isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
$this->method = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE']);
} else { } else {
$this->method = $this->server('REQUEST_METHOD') ?: 'GET'; $method = $this->server('REQUEST_METHOD') ?: 'GET';
$httpMethodOverride = strtoupper($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'] ?? '');
if ($method === 'POST' && in_array($httpMethodOverride, ['GET', 'POST', 'DELETE', 'PUT', 'PATCH'])) {
$this->method = $httpMethodOverride;
} else {
$this->method = $method;
}
} }
} }
return $this->method; return $this->method;
......
...@@ -72,7 +72,7 @@ class Command ...@@ -72,7 +72,7 @@ class Command
* 设置控制台 * 设置控制台
* @param Console $console * @param Console $console
*/ */
public function setConsole(Console $console = null) public function setConsole(?Console $console = null)
{ {
$this->console = $console; $this->console = $console;
} }
......
...@@ -28,7 +28,7 @@ class Stack ...@@ -28,7 +28,7 @@ class Stack
* 构造方法 * 构造方法
* @param Style|null $emptyStyle * @param Style|null $emptyStyle
*/ */
public function __construct(Style $emptyStyle = null) public function __construct(?Style $emptyStyle = null)
{ {
$this->emptyStyle = $emptyStyle ?: new Style(); $this->emptyStyle = $emptyStyle ?: new Style();
$this->reset(); $this->reset();
...@@ -57,7 +57,7 @@ class Stack ...@@ -57,7 +57,7 @@ class Stack
* @return Style * @return Style
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*/ */
public function pop(Style $style = null) public function pop(?Style $style = null)
{ {
if (empty($this->styles)) { if (empty($this->styles)) {
return $this->emptyStyle; return $this->emptyStyle;
......
...@@ -406,7 +406,7 @@ abstract class Connection ...@@ -406,7 +406,7 @@ abstract class Connection
* @throws PDOException * @throws PDOException
* @throws \Exception * @throws \Exception
*/ */
public function execute($sql, $bind = [], Query $query = null) public function execute($sql, $bind = [], ?Query $query = null)
{ {
$this->initConnect(true); $this->initConnect(true);
if (!$this->linkID) { if (!$this->linkID) {
...@@ -483,7 +483,7 @@ abstract class Connection ...@@ -483,7 +483,7 @@ abstract class Connection
if (PDO::PARAM_STR == $type) { if (PDO::PARAM_STR == $type) {
$value = $this->quote($value); $value = $this->quote($value);
} elseif (PDO::PARAM_INT == $type) { } elseif (PDO::PARAM_INT == $type) {
$value = (float) $value; $value = sprintf("%d", $value);
} }
// 判断占位符 // 判断占位符
$sql = is_numeric($key) ? $sql = is_numeric($key) ?
...@@ -738,7 +738,7 @@ abstract class Connection ...@@ -738,7 +738,7 @@ abstract class Connection
* @param array $sqlArray SQL批处理指令 * @param array $sqlArray SQL批处理指令
* @return boolean * @return boolean
*/ */
public function batchQuery($sqlArray = [], $bind = [], Query $query = null) public function batchQuery($sqlArray = [], $bind = [], ?Query $query = null)
{ {
if (!is_array($sqlArray)) { if (!is_array($sqlArray)) {
return false; return false;
......
...@@ -62,7 +62,7 @@ class Query ...@@ -62,7 +62,7 @@ class Query
* @param Connection $connection 数据库对象实例 * @param Connection $connection 数据库对象实例
* @param Model $model 模型对象 * @param Model $model 模型对象
*/ */
public function __construct(Connection $connection = null, $model = null) public function __construct(?Connection $connection = null, $model = null)
{ {
$this->connection = $connection ?: Db::connect([], true); $this->connection = $connection ?: Db::connect([], true);
$this->prefix = $this->connection->getConfig('prefix'); $this->prefix = $this->connection->getConfig('prefix');
......
...@@ -16,7 +16,7 @@ class HttpException extends \RuntimeException ...@@ -16,7 +16,7 @@ class HttpException extends \RuntimeException
private $statusCode; private $statusCode;
private $headers; private $headers;
public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = [], $code = 0) public function __construct($statusCode, $message = null, ?\Exception $previous = null, array $headers = [], $code = 0)
{ {
$this->statusCode = $statusCode; $this->statusCode = $statusCode;
$this->headers = $headers; $this->headers = $headers;
......
...@@ -137,10 +137,11 @@ class MorphTo extends Relation ...@@ -137,10 +137,11 @@ class MorphTo extends Relation
/** /**
* 移除关联查询参数 * 移除关联查询参数
* @param true $option
* @access public * @access public
* @return $this * @return $this
*/ */
public function removeOption() public function removeOption($option = true)
{ {
return $this; return $this;
} }
......
...@@ -49,7 +49,7 @@ class Windows extends Pipes ...@@ -49,7 +49,7 @@ class Windows extends Pipes
if (is_resource($input)) { if (is_resource($input)) {
$this->input = $input; $this->input = $input;
} else { } else {
$this->inputBuffer = $input; $this->inputBuffer = (string) $input;
} }
} }
......
File mode changed from 100644 to 100755
* *
!.gitignore !.gitignore
\ No newline at end of file
* *
!.gitignore !.gitignore
\ No newline at end of file
* *
!.gitignore !.gitignore
\ No newline at end of file
* *
!.gitignore !.gitignore
\ No newline at end of file
* *
!.gitignore !.gitignore
\ No newline at end of file
...@@ -2,24 +2,6 @@ ...@@ -2,24 +2,6 @@
// autoload.php @generated by Composer // autoload.php @generated by Composer
if (PHP_VERSION_ID < 50600) {
if (!headers_sent()) {
header('HTTP/1.1 500 Internal Server Error');
}
$err = 'Composer 2.3.0 dropped support for autoloading on PHP <5.6 and you are running '.PHP_VERSION.', please upgrade PHP or use Composer 2.2 LTS via "composer self-update --2.2". Aborting.'.PHP_EOL;
if (!ini_get('display_errors')) {
if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
fwrite(STDERR, $err);
} elseif (!headers_sent()) {
echo $err;
}
}
trigger_error(
$err,
E_USER_ERROR
);
}
require_once __DIR__ . '/composer/autoload_real.php'; require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1::getLoader(); return ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1::getLoader();
...@@ -42,79 +42,30 @@ namespace Composer\Autoload; ...@@ -42,79 +42,30 @@ namespace Composer\Autoload;
*/ */
class ClassLoader class ClassLoader
{ {
/** @var \Closure(string):void */
private static $includeFile;
/** @var ?string */
private $vendorDir; private $vendorDir;
// PSR-4 // PSR-4
/**
* @var array[]
* @psalm-var array<string, array<string, int>>
*/
private $prefixLengthsPsr4 = array(); private $prefixLengthsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, array<int, string>>
*/
private $prefixDirsPsr4 = array(); private $prefixDirsPsr4 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr4 = array(); private $fallbackDirsPsr4 = array();
// PSR-0 // PSR-0
/**
* @var array[]
* @psalm-var array<string, array<string, string[]>>
*/
private $prefixesPsr0 = array(); private $prefixesPsr0 = array();
/**
* @var array[]
* @psalm-var array<string, string>
*/
private $fallbackDirsPsr0 = array(); private $fallbackDirsPsr0 = array();
/** @var bool */
private $useIncludePath = false; private $useIncludePath = false;
/**
* @var string[]
* @psalm-var array<string, string>
*/
private $classMap = array(); private $classMap = array();
/** @var bool */
private $classMapAuthoritative = false; private $classMapAuthoritative = false;
/**
* @var bool[]
* @psalm-var array<string, bool>
*/
private $missingClasses = array(); private $missingClasses = array();
/** @var ?string */
private $apcuPrefix; private $apcuPrefix;
/**
* @var self[]
*/
private static $registeredLoaders = array(); private static $registeredLoaders = array();
/**
* @param ?string $vendorDir
*/
public function __construct($vendorDir = null) public function __construct($vendorDir = null)
{ {
$this->vendorDir = $vendorDir; $this->vendorDir = $vendorDir;
self::initializeIncludeClosure();
} }
/**
* @return string[]
*/
public function getPrefixes() public function getPrefixes()
{ {
if (!empty($this->prefixesPsr0)) { if (!empty($this->prefixesPsr0)) {
...@@ -124,47 +75,28 @@ class ClassLoader ...@@ -124,47 +75,28 @@ class ClassLoader
return array(); return array();
} }
/**
* @return array[]
* @psalm-return array<string, array<int, string>>
*/
public function getPrefixesPsr4() public function getPrefixesPsr4()
{ {
return $this->prefixDirsPsr4; return $this->prefixDirsPsr4;
} }
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirs() public function getFallbackDirs()
{ {
return $this->fallbackDirsPsr0; return $this->fallbackDirsPsr0;
} }
/**
* @return array[]
* @psalm-return array<string, string>
*/
public function getFallbackDirsPsr4() public function getFallbackDirsPsr4()
{ {
return $this->fallbackDirsPsr4; return $this->fallbackDirsPsr4;
} }
/**
* @return string[] Array of classname => path
* @psalm-return array<string, string>
*/
public function getClassMap() public function getClassMap()
{ {
return $this->classMap; return $this->classMap;
} }
/** /**
* @param string[] $classMap Class to filename map * @param array $classMap Class to filename map
* @psalm-param array<string, string> $classMap
*
* @return void
*/ */
public function addClassMap(array $classMap) public function addClassMap(array $classMap)
{ {
...@@ -179,11 +111,9 @@ class ClassLoader ...@@ -179,11 +111,9 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, either * Registers a set of PSR-0 directories for a given prefix, either
* appending or prepending to the ones previously set for this prefix. * appending or prepending to the ones previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 root directories * @param array|string $paths The PSR-0 root directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
*
* @return void
*/ */
public function add($prefix, $paths, $prepend = false) public function add($prefix, $paths, $prepend = false)
{ {
...@@ -226,13 +156,11 @@ class ClassLoader ...@@ -226,13 +156,11 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, either * Registers a set of PSR-4 directories for a given namespace, either
* appending or prepending to the ones previously set for this namespace. * appending or prepending to the ones previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param array|string $paths The PSR-4 base directories
* @param bool $prepend Whether to prepend the directories * @param bool $prepend Whether to prepend the directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function addPsr4($prefix, $paths, $prepend = false) public function addPsr4($prefix, $paths, $prepend = false)
{ {
...@@ -276,10 +204,8 @@ class ClassLoader ...@@ -276,10 +204,8 @@ class ClassLoader
* Registers a set of PSR-0 directories for a given prefix, * Registers a set of PSR-0 directories for a given prefix,
* replacing any others previously set for this prefix. * replacing any others previously set for this prefix.
* *
* @param string $prefix The prefix * @param string $prefix The prefix
* @param string[]|string $paths The PSR-0 base directories * @param array|string $paths The PSR-0 base directories
*
* @return void
*/ */
public function set($prefix, $paths) public function set($prefix, $paths)
{ {
...@@ -294,12 +220,10 @@ class ClassLoader ...@@ -294,12 +220,10 @@ class ClassLoader
* Registers a set of PSR-4 directories for a given namespace, * Registers a set of PSR-4 directories for a given namespace,
* replacing any others previously set for this namespace. * replacing any others previously set for this namespace.
* *
* @param string $prefix The prefix/namespace, with trailing '\\' * @param string $prefix The prefix/namespace, with trailing '\\'
* @param string[]|string $paths The PSR-4 base directories * @param array|string $paths The PSR-4 base directories
* *
* @throws \InvalidArgumentException * @throws \InvalidArgumentException
*
* @return void
*/ */
public function setPsr4($prefix, $paths) public function setPsr4($prefix, $paths)
{ {
...@@ -319,8 +243,6 @@ class ClassLoader ...@@ -319,8 +243,6 @@ class ClassLoader
* Turns on searching the include path for class files. * Turns on searching the include path for class files.
* *
* @param bool $useIncludePath * @param bool $useIncludePath
*
* @return void
*/ */
public function setUseIncludePath($useIncludePath) public function setUseIncludePath($useIncludePath)
{ {
...@@ -343,8 +265,6 @@ class ClassLoader ...@@ -343,8 +265,6 @@ class ClassLoader
* that have not been registered with the class map. * that have not been registered with the class map.
* *
* @param bool $classMapAuthoritative * @param bool $classMapAuthoritative
*
* @return void
*/ */
public function setClassMapAuthoritative($classMapAuthoritative) public function setClassMapAuthoritative($classMapAuthoritative)
{ {
...@@ -365,8 +285,6 @@ class ClassLoader ...@@ -365,8 +285,6 @@ class ClassLoader
* APCu prefix to use to cache found/not-found classes, if the extension is enabled. * APCu prefix to use to cache found/not-found classes, if the extension is enabled.
* *
* @param string|null $apcuPrefix * @param string|null $apcuPrefix
*
* @return void
*/ */
public function setApcuPrefix($apcuPrefix) public function setApcuPrefix($apcuPrefix)
{ {
...@@ -387,8 +305,6 @@ class ClassLoader ...@@ -387,8 +305,6 @@ class ClassLoader
* Registers this instance as an autoloader. * Registers this instance as an autoloader.
* *
* @param bool $prepend Whether to prepend the autoloader or not * @param bool $prepend Whether to prepend the autoloader or not
*
* @return void
*/ */
public function register($prepend = false) public function register($prepend = false)
{ {
...@@ -408,8 +324,6 @@ class ClassLoader ...@@ -408,8 +324,6 @@ class ClassLoader
/** /**
* Unregisters this instance as an autoloader. * Unregisters this instance as an autoloader.
*
* @return void
*/ */
public function unregister() public function unregister()
{ {
...@@ -424,18 +338,15 @@ class ClassLoader ...@@ -424,18 +338,15 @@ class ClassLoader
* Loads the given class or interface. * Loads the given class or interface.
* *
* @param string $class The name of the class * @param string $class The name of the class
* @return true|null True if loaded, null otherwise * @return bool|null True if loaded, null otherwise
*/ */
public function loadClass($class) public function loadClass($class)
{ {
if ($file = $this->findFile($class)) { if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile; includeFile($file);
$includeFile($file);
return true; return true;
} }
return null;
} }
/** /**
...@@ -490,11 +401,6 @@ class ClassLoader ...@@ -490,11 +401,6 @@ class ClassLoader
return self::$registeredLoaders; return self::$registeredLoaders;
} }
/**
* @param string $class
* @param string $ext
* @return string|false
*/
private function findFileWithExtension($class, $ext) private function findFileWithExtension($class, $ext)
{ {
// PSR-4 lookup // PSR-4 lookup
...@@ -560,26 +466,14 @@ class ClassLoader ...@@ -560,26 +466,14 @@ class ClassLoader
return false; return false;
} }
}
/** /**
* @return void * Scope isolated include.
*/ *
private static function initializeIncludeClosure() * Prevents access to $this/self from included files.
{ */
if (self::$includeFile !== null) { function includeFile($file)
return; {
} include $file;
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
} }
This diff is collapsed.
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// autoload_classmap.php @generated by Composer // autoload_classmap.php @generated by Composer
$vendorDir = dirname(__DIR__); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
......
...@@ -2,21 +2,21 @@ ...@@ -2,21 +2,21 @@
// autoload_files.php @generated by Composer // autoload_files.php @generated by Composer
$vendorDir = dirname(__DIR__); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => $vendorDir . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php', '6e3fae29631ef280660b3cdad06f25a8' => $vendorDir . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => $vendorDir . '/ralouphie/getallheaders/src/getallheaders.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => $vendorDir . '/symfony/polyfill-mbstring/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => $vendorDir . '/symfony/polyfill-php73/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => $vendorDir . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => $vendorDir . '/topthink/think-helper/src/helper.php',
'f7e3d8cd19cf23ce3883a6a51d791b77' => $vendorDir . '/fastadminnet/fastadmin-addons/src/common.php', '2cffec82183ee1cea088009cef9a6fc3' => $vendorDir . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'f0e7e63bbb278a92db02393536748c5f' => $vendorDir . '/overtrue/wechat/src/Kernel/Support/Helpers.php', 'f0e7e63bbb278a92db02393536748c5f' => $vendorDir . '/overtrue/wechat/src/Kernel/Support/Helpers.php',
'6747f579ad6817f318cc3a7e7a0abb93' => $vendorDir . '/overtrue/wechat/src/Kernel/Helpers.php', '6747f579ad6817f318cc3a7e7a0abb93' => $vendorDir . '/overtrue/wechat/src/Kernel/Helpers.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php', '1cfd2761b63b0a29ed23657ea394cb2d' => $vendorDir . '/topthink/think-captcha/src/helper.php',
'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php', 'cc56288302d9df745d97c934d6a6e5f0' => $vendorDir . '/topthink/think-queue/src/common.php',
'f7e3d8cd19cf23ce3883a6a51d791b77' => $vendorDir . '/fastadminnet/fastadmin-addons/src/common.php',
); );
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// autoload_namespaces.php @generated by Composer // autoload_namespaces.php @generated by Composer
$vendorDir = dirname(__DIR__); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
......
...@@ -2,16 +2,17 @@ ...@@ -2,16 +2,17 @@
// autoload_psr4.php @generated by Composer // autoload_psr4.php @generated by Composer
$vendorDir = dirname(__DIR__); $vendorDir = dirname(dirname(__FILE__));
$baseDir = dirname($vendorDir); $baseDir = dirname($vendorDir);
return array( return array(
'think\\helper\\' => array($vendorDir . '/topthink/think-helper/src'), 'think\\helper\\' => array($vendorDir . '/topthink/think-helper/src'),
'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'), 'think\\composer\\' => array($vendorDir . '/topthink/think-installer/src'),
'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'), 'think\\captcha\\' => array($vendorDir . '/topthink/think-captcha/src'),
'think\\' => array($vendorDir . '/fastadminnet/fastadmin-addons/src', $baseDir . '/thinkphp/library/think', $vendorDir . '/topthink/think-queue/src'), 'think\\' => array($baseDir . '/thinkphp/library/think', $vendorDir . '/topthink/think-queue/src', $vendorDir . '/fastadminnet/fastadmin-addons/src'),
'addons\\' => array($baseDir . '/addons'), 'addons\\' => array($baseDir . '/addons'),
'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'), 'ZipStream\\' => array($vendorDir . '/maennchen/zipstream-php/src'),
'Workerman\\' => array($vendorDir . '/workerman/workerman'),
'Tx\\' => array($vendorDir . '/fastadminnet/fastadmin-mailer/src'), 'Tx\\' => array($vendorDir . '/fastadminnet/fastadmin-mailer/src'),
'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'), 'Symfony\\Polyfill\\Php80\\' => array($vendorDir . '/symfony/polyfill-php80'),
'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'), 'Symfony\\Polyfill\\Php73\\' => array($vendorDir . '/symfony/polyfill-php73'),
...@@ -34,6 +35,7 @@ return array( ...@@ -34,6 +35,7 @@ return array(
'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'), 'Psr\\Cache\\' => array($vendorDir . '/psr/cache/src'),
'PhpZip\\' => array($vendorDir . '/nelexa/zip/src'), 'PhpZip\\' => array($vendorDir . '/nelexa/zip/src'),
'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'), 'PhpOffice\\PhpSpreadsheet\\' => array($vendorDir . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet'),
'PHPSocketIO\\' => array($vendorDir . '/workerman/phpsocket.io/src'),
'Overtrue\\Socialite\\' => array($vendorDir . '/overtrue/socialite/src'), 'Overtrue\\Socialite\\' => array($vendorDir . '/overtrue/socialite/src'),
'Overtrue\\Pinyin\\' => array($vendorDir . '/overtrue/pinyin/src'), 'Overtrue\\Pinyin\\' => array($vendorDir . '/overtrue/pinyin/src'),
'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'), 'MyCLabs\\Enum\\' => array($vendorDir . '/myclabs/php-enum/src'),
...@@ -46,4 +48,5 @@ return array( ...@@ -46,4 +48,5 @@ return array(
'EasyWeChatComposer\\' => array($vendorDir . '/easywechat-composer/easywechat-composer/src'), 'EasyWeChatComposer\\' => array($vendorDir . '/easywechat-composer/easywechat-composer/src'),
'Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'), 'Composer\\Pcre\\' => array($vendorDir . '/composer/pcre/src'),
'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'), 'Complex\\' => array($vendorDir . '/markbaker/complex/classes/src'),
'Channel\\' => array($vendorDir . '/workerman/channel/src'),
); );
...@@ -25,26 +25,51 @@ class ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -25,26 +25,51 @@ class ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1
require __DIR__ . '/platform_check.php'; require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1', 'loadClassLoader'), true, true); spl_autoload_register(array('ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__)); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
spl_autoload_unregister(array('ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1', 'loadClassLoader')); spl_autoload_unregister(array('ComposerAutoloaderInitf3106b6ef3260b6914241eab0bed11c1', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php'; $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
call_user_func(\Composer\Autoload\ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1::getInitializer($loader)); if ($useStaticLoader) {
require __DIR__ . '/autoload_static.php';
$loader->register(true); call_user_func(\Composer\Autoload\ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1::getInitializer($loader));
} else {
$map = require __DIR__ . '/autoload_namespaces.php';
foreach ($map as $namespace => $path) {
$loader->set($namespace, $path);
}
$filesToLoad = \Composer\Autoload\ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1::$files; $map = require __DIR__ . '/autoload_psr4.php';
$requireFile = \Closure::bind(static function ($fileIdentifier, $file) { foreach ($map as $namespace => $path) {
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { $loader->setPsr4($namespace, $path);
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; }
require $file; $classMap = require __DIR__ . '/autoload_classmap.php';
if ($classMap) {
$loader->addClassMap($classMap);
} }
}, null, null); }
foreach ($filesToLoad as $fileIdentifier => $file) {
$requireFile($fileIdentifier, $file); $loader->register(true);
if ($useStaticLoader) {
$includeFiles = Composer\Autoload\ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1::$files;
} else {
$includeFiles = require __DIR__ . '/autoload_files.php';
}
foreach ($includeFiles as $fileIdentifier => $file) {
composerRequiref3106b6ef3260b6914241eab0bed11c1($fileIdentifier, $file);
} }
return $loader; return $loader;
} }
} }
function composerRequiref3106b6ef3260b6914241eab0bed11c1($fileIdentifier, $file)
{
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
require $file;
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
}
}
...@@ -7,19 +7,19 @@ namespace Composer\Autoload; ...@@ -7,19 +7,19 @@ namespace Composer\Autoload;
class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
{ {
public static $files = array ( public static $files = array (
'6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php',
'0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php', '6e3fae29631ef280660b3cdad06f25a8' => __DIR__ . '/..' . '/symfony/deprecation-contracts/function.php',
'7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php', '7b11c4dc42b3b3023073cb14e519683c' => __DIR__ . '/..' . '/ralouphie/getallheaders/src/getallheaders.php',
'37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php', '0e6d7bf4a5811bfa5cf40c5ccd6fae6a' => __DIR__ . '/..' . '/symfony/polyfill-mbstring/bootstrap.php',
'0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php', '0d59ee240a4cd96ddbb4ff164fccea4d' => __DIR__ . '/..' . '/symfony/polyfill-php73/bootstrap.php',
'2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php', '37a3dc5111fe8f707ab4c132ef1dbc62' => __DIR__ . '/..' . '/guzzlehttp/guzzle/src/functions_include.php',
'9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php', '9b552a3cc426e3287cc811caefa3cf53' => __DIR__ . '/..' . '/topthink/think-helper/src/helper.php',
'f7e3d8cd19cf23ce3883a6a51d791b77' => __DIR__ . '/..' . '/fastadminnet/fastadmin-addons/src/common.php', '2cffec82183ee1cea088009cef9a6fc3' => __DIR__ . '/..' . '/ezyang/htmlpurifier/library/HTMLPurifier.composer.php',
'f0e7e63bbb278a92db02393536748c5f' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Support/Helpers.php', 'f0e7e63bbb278a92db02393536748c5f' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Support/Helpers.php',
'6747f579ad6817f318cc3a7e7a0abb93' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Helpers.php', '6747f579ad6817f318cc3a7e7a0abb93' => __DIR__ . '/..' . '/overtrue/wechat/src/Kernel/Helpers.php',
'1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php', '1cfd2761b63b0a29ed23657ea394cb2d' => __DIR__ . '/..' . '/topthink/think-captcha/src/helper.php',
'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php', 'cc56288302d9df745d97c934d6a6e5f0' => __DIR__ . '/..' . '/topthink/think-queue/src/common.php',
'f7e3d8cd19cf23ce3883a6a51d791b77' => __DIR__ . '/..' . '/fastadminnet/fastadmin-addons/src/common.php',
); );
public static $prefixLengthsPsr4 = array ( public static $prefixLengthsPsr4 = array (
...@@ -38,6 +38,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -38,6 +38,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
array ( array (
'ZipStream\\' => 10, 'ZipStream\\' => 10,
), ),
'W' =>
array (
'Workerman\\' => 10,
),
'T' => 'T' =>
array ( array (
'Tx\\' => 3, 'Tx\\' => 3,
...@@ -68,6 +72,7 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -68,6 +72,7 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
'Psr\\Cache\\' => 10, 'Psr\\Cache\\' => 10,
'PhpZip\\' => 7, 'PhpZip\\' => 7,
'PhpOffice\\PhpSpreadsheet\\' => 25, 'PhpOffice\\PhpSpreadsheet\\' => 25,
'PHPSocketIO\\' => 12,
), ),
'O' => 'O' =>
array ( array (
...@@ -95,6 +100,7 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -95,6 +100,7 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
array ( array (
'Composer\\Pcre\\' => 14, 'Composer\\Pcre\\' => 14,
'Complex\\' => 8, 'Complex\\' => 8,
'Channel\\' => 8,
), ),
); );
...@@ -113,9 +119,9 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -113,9 +119,9 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
), ),
'think\\' => 'think\\' =>
array ( array (
0 => __DIR__ . '/..' . '/fastadminnet/fastadmin-addons/src', 0 => __DIR__ . '/../..' . '/thinkphp/library/think',
1 => __DIR__ . '/../..' . '/thinkphp/library/think', 1 => __DIR__ . '/..' . '/topthink/think-queue/src',
2 => __DIR__ . '/..' . '/topthink/think-queue/src', 2 => __DIR__ . '/..' . '/fastadminnet/fastadmin-addons/src',
), ),
'addons\\' => 'addons\\' =>
array ( array (
...@@ -125,6 +131,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -125,6 +131,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
array ( array (
0 => __DIR__ . '/..' . '/maennchen/zipstream-php/src', 0 => __DIR__ . '/..' . '/maennchen/zipstream-php/src',
), ),
'Workerman\\' =>
array (
0 => __DIR__ . '/..' . '/workerman/workerman',
),
'Tx\\' => 'Tx\\' =>
array ( array (
0 => __DIR__ . '/..' . '/fastadminnet/fastadmin-mailer/src', 0 => __DIR__ . '/..' . '/fastadminnet/fastadmin-mailer/src',
...@@ -214,6 +224,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -214,6 +224,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
array ( array (
0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet', 0 => __DIR__ . '/..' . '/phpoffice/phpspreadsheet/src/PhpSpreadsheet',
), ),
'PHPSocketIO\\' =>
array (
0 => __DIR__ . '/..' . '/workerman/phpsocket.io/src',
),
'Overtrue\\Socialite\\' => 'Overtrue\\Socialite\\' =>
array ( array (
0 => __DIR__ . '/..' . '/overtrue/socialite/src', 0 => __DIR__ . '/..' . '/overtrue/socialite/src',
...@@ -262,6 +276,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1 ...@@ -262,6 +276,10 @@ class ComposerStaticInitf3106b6ef3260b6914241eab0bed11c1
array ( array (
0 => __DIR__ . '/..' . '/markbaker/complex/classes/src', 0 => __DIR__ . '/..' . '/markbaker/complex/classes/src',
), ),
'Channel\\' =>
array (
0 => __DIR__ . '/..' . '/workerman/channel/src',
),
); );
public static $prefixesPsr0 = array ( public static $prefixesPsr0 = array (
......
This diff is collapsed.
This diff is collapsed.
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
} }
], ],
"require": { "require": {
"php": ">=7.0", "php": ">=7.1",
"composer-plugin-api": "^1.0 || ^2.0" "composer-plugin-api": "^1.0 || ^2.0"
}, },
"require-dev": { "require-dev": {
......
...@@ -39,7 +39,7 @@ class ManifestManager ...@@ -39,7 +39,7 @@ class ManifestManager
* @param string $vendorPath * @param string $vendorPath
* @param string|null $manifestPath * @param string|null $manifestPath
*/ */
public function __construct(string $vendorPath, string $manifestPath = null) public function __construct(string $vendorPath, ?string $manifestPath = null)
{ {
$this->vendorPath = $vendorPath; $this->vendorPath = $vendorPath;
$this->manifestPath = $manifestPath ?: $vendorPath.'/easywechat-composer/easywechat-composer/extensions.php'; $this->manifestPath = $manifestPath ?: $vendorPath.'/easywechat-composer/easywechat-composer/extensions.php';
......
4.18.0 4.19.0
\ No newline at end of file \ No newline at end of file
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
} }
], ],
"require": { "require": {
"php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0" "php": "~5.6.0 || ~7.0.0 || ~7.1.0 || ~7.2.0 || ~7.3.0 || ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0"
}, },
"require-dev": { "require-dev": {
"cerdic/css-tidy": "^1.7 || ^2.0", "cerdic/css-tidy": "^1.7 || ^2.0",
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment