mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
ComposerUpdate
This commit is contained in:
parent
c9809e7029
commit
2ec3ac9e20
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
@ -224,6 +224,7 @@ return array(
|
|||||||
'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php',
|
'app\\data\\controller\\api\\auth\\News' => $baseDir . '/app/data/controller/api/auth/News.php',
|
||||||
'app\\data\\controller\\api\\auth\\Order' => $baseDir . '/app/data/controller/api/auth/Order.php',
|
'app\\data\\controller\\api\\auth\\Order' => $baseDir . '/app/data/controller/api/auth/Order.php',
|
||||||
'app\\data\\service\\GoodsService' => $baseDir . '/app/data/service/GoodsService.php',
|
'app\\data\\service\\GoodsService' => $baseDir . '/app/data/service/GoodsService.php',
|
||||||
|
'app\\data\\service\\MessageService' => $baseDir . '/app/data/service/MessageService.php',
|
||||||
'app\\data\\service\\NewsService' => $baseDir . '/app/data/service/NewsService.php',
|
'app\\data\\service\\NewsService' => $baseDir . '/app/data/service/NewsService.php',
|
||||||
'app\\data\\service\\OrderService' => $baseDir . '/app/data/service/OrderService.php',
|
'app\\data\\service\\OrderService' => $baseDir . '/app/data/service/OrderService.php',
|
||||||
'app\\data\\service\\TruckService' => $baseDir . '/app/data/service/TruckService.php',
|
'app\\data\\service\\TruckService' => $baseDir . '/app/data/service/TruckService.php',
|
||||||
|
1
vendor/composer/autoload_static.php
vendored
1
vendor/composer/autoload_static.php
vendored
@ -352,6 +352,7 @@ class ComposerStaticInit33b66ed99ea8fcca84c95dfb0e7ed409
|
|||||||
'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php',
|
'app\\data\\controller\\api\\auth\\News' => __DIR__ . '/../..' . '/app/data/controller/api/auth/News.php',
|
||||||
'app\\data\\controller\\api\\auth\\Order' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Order.php',
|
'app\\data\\controller\\api\\auth\\Order' => __DIR__ . '/../..' . '/app/data/controller/api/auth/Order.php',
|
||||||
'app\\data\\service\\GoodsService' => __DIR__ . '/../..' . '/app/data/service/GoodsService.php',
|
'app\\data\\service\\GoodsService' => __DIR__ . '/../..' . '/app/data/service/GoodsService.php',
|
||||||
|
'app\\data\\service\\MessageService' => __DIR__ . '/../..' . '/app/data/service/MessageService.php',
|
||||||
'app\\data\\service\\NewsService' => __DIR__ . '/../..' . '/app/data/service/NewsService.php',
|
'app\\data\\service\\NewsService' => __DIR__ . '/../..' . '/app/data/service/NewsService.php',
|
||||||
'app\\data\\service\\OrderService' => __DIR__ . '/../..' . '/app/data/service/OrderService.php',
|
'app\\data\\service\\OrderService' => __DIR__ . '/../..' . '/app/data/service/OrderService.php',
|
||||||
'app\\data\\service\\TruckService' => __DIR__ . '/../..' . '/app/data/service/TruckService.php',
|
'app\\data\\service\\TruckService' => __DIR__ . '/../..' . '/app/data/service/TruckService.php',
|
||||||
|
20
vendor/composer/installed.json
vendored
20
vendor/composer/installed.json
vendored
@ -580,17 +580,17 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "topthink/framework",
|
"name": "topthink/framework",
|
||||||
"version": "v6.0.4",
|
"version": "v6.0.5",
|
||||||
"version_normalized": "6.0.4.0",
|
"version_normalized": "6.0.5.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/top-think/framework.git",
|
"url": "https://github.com/top-think/framework.git",
|
||||||
"reference": "4b252d78562d4a51a501651f837c26cb9d91624f"
|
"reference": "85625d984f5c96699dc27d384869f206c3aec1cc"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/top-think/framework/zipball/4b252d78562d4a51a501651f837c26cb9d91624f",
|
"url": "https://api.github.com/repos/top-think/framework/zipball/85625d984f5c96699dc27d384869f206c3aec1cc",
|
||||||
"reference": "4b252d78562d4a51a501651f837c26cb9d91624f",
|
"reference": "85625d984f5c96699dc27d384869f206c3aec1cc",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -616,7 +616,7 @@
|
|||||||
"mockery/mockery": "^1.2",
|
"mockery/mockery": "^1.2",
|
||||||
"phpunit/phpunit": "^7.0"
|
"phpunit/phpunit": "^7.0"
|
||||||
},
|
},
|
||||||
"time": "2020-09-29T02:19:59+00:00",
|
"time": "2020-10-26T07:18:00+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"installation-source": "dist",
|
"installation-source": "dist",
|
||||||
"autoload": {
|
"autoload": {
|
||||||
@ -893,12 +893,12 @@
|
|||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
"url": "https://github.com/zoujingli/ThinkLibrary.git",
|
||||||
"reference": "c5846d13a516a982f94b4d28ead23b515bd0fafc"
|
"reference": "51051855309a5752c0adb8f8d63129a43fd139ce"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/c5846d13a516a982f94b4d28ead23b515bd0fafc",
|
"url": "https://api.github.com/repos/zoujingli/ThinkLibrary/zipball/51051855309a5752c0adb8f8d63129a43fd139ce",
|
||||||
"reference": "c5846d13a516a982f94b4d28ead23b515bd0fafc",
|
"reference": "51051855309a5752c0adb8f8d63129a43fd139ce",
|
||||||
"shasum": "",
|
"shasum": "",
|
||||||
"mirrors": [
|
"mirrors": [
|
||||||
{
|
{
|
||||||
@ -915,7 +915,7 @@
|
|||||||
"ext-mbstring": "*",
|
"ext-mbstring": "*",
|
||||||
"topthink/framework": "^6.0"
|
"topthink/framework": "^6.0"
|
||||||
},
|
},
|
||||||
"time": "2020-10-26T02:07:54+00:00",
|
"time": "2020-10-26T10:23:23+00:00",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
"think": {
|
"think": {
|
||||||
|
2
vendor/services.php
vendored
2
vendor/services.php
vendored
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
// This file is automatically generated at:2020-10-26 10:23:32
|
// This file is automatically generated at:2020-10-27 15:14:34
|
||||||
declare (strict_types = 1);
|
declare (strict_types = 1);
|
||||||
return array (
|
return array (
|
||||||
0 => 'think\\admin\\Library',
|
0 => 'think\\admin\\Library',
|
||||||
|
2
vendor/topthink/framework/src/think/App.php
vendored
2
vendor/topthink/framework/src/think/App.php
vendored
@ -39,7 +39,7 @@ use think\initializer\RegisterService;
|
|||||||
*/
|
*/
|
||||||
class App extends Container
|
class App extends Container
|
||||||
{
|
{
|
||||||
const VERSION = '6.0.4';
|
const VERSION = '6.0.5';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 应用调试模式
|
* 应用调试模式
|
||||||
|
@ -48,7 +48,8 @@ abstract class Manager
|
|||||||
|
|
||||||
if (is_null($name)) {
|
if (is_null($name)) {
|
||||||
throw new InvalidArgumentException(sprintf(
|
throw new InvalidArgumentException(sprintf(
|
||||||
'Unable to resolve NULL driver for [%s].', static::class
|
'Unable to resolve NULL driver for [%s].',
|
||||||
|
static::class
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,8 @@ class Pipeline
|
|||||||
} catch (Throwable | Exception $e) {
|
} catch (Throwable | Exception $e) {
|
||||||
return $this->handleException($passable, $e);
|
return $this->handleException($passable, $e);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
);
|
||||||
|
|
||||||
return $pipeline($this->passable);
|
return $pipeline($this->passable);
|
||||||
}
|
}
|
||||||
|
@ -680,9 +680,9 @@ class Route
|
|||||||
*/
|
*/
|
||||||
public function redirect(string $rule, string $route = '', int $status = 301): RuleItem
|
public function redirect(string $rule, string $route = '', int $status = 301): RuleItem
|
||||||
{
|
{
|
||||||
return $this->rule($rule, function () use ($status, $route) {
|
return $this->rule($rule, function (Request $request) use ($status, $route) {
|
||||||
$search = $replace = [];
|
$search = $replace = [];
|
||||||
$matches = $this->request->rule()->getVars();
|
$matches = $request->rule()->getVars();
|
||||||
|
|
||||||
foreach ($matches as $key => $value) {
|
foreach ($matches as $key => $value) {
|
||||||
$search[] = '<' . $key . '>';
|
$search[] = '<' . $key . '>';
|
||||||
|
@ -484,6 +484,7 @@ class Validate
|
|||||||
foreach ($this->append as $key => $rule) {
|
foreach ($this->append as $key => $rule) {
|
||||||
if (!isset($rules[$key])) {
|
if (!isset($rules[$key])) {
|
||||||
$rules[$key] = $rule;
|
$rules[$key] = $rule;
|
||||||
|
unset($this->append[$key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -185,9 +185,6 @@ abstract class Driver implements CacheInterface, CacheHandlerInterface
|
|||||||
$key = implode('-', $name);
|
$key = implode('-', $name);
|
||||||
|
|
||||||
if (!isset($this->tag[$key])) {
|
if (!isset($this->tag[$key])) {
|
||||||
$name = array_map(function ($val) {
|
|
||||||
return $this->getTagKey($val);
|
|
||||||
}, $name);
|
|
||||||
$this->tag[$key] = new TagSet($name, $this);
|
$this->tag[$key] = new TagSet($name, $this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -202,7 +199,8 @@ abstract class Driver implements CacheInterface, CacheHandlerInterface
|
|||||||
*/
|
*/
|
||||||
public function getTagItems(string $tag): array
|
public function getTagItems(string $tag): array
|
||||||
{
|
{
|
||||||
return $this->get($tag, []);
|
$name = $this->getTagKey($tag);
|
||||||
|
return $this->get($name, []);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -69,7 +69,8 @@ class TagSet
|
|||||||
$name = $this->handler->getCacheKey($name);
|
$name = $this->handler->getCacheKey($name);
|
||||||
|
|
||||||
foreach ($this->tag as $tag) {
|
foreach ($this->tag as $tag) {
|
||||||
$this->handler->push($tag, $name);
|
$key = $this->handler->getTagKey($tag);
|
||||||
|
$this->handler->push($key, $name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -120,9 +121,10 @@ class TagSet
|
|||||||
// 指定标签清除
|
// 指定标签清除
|
||||||
foreach ($this->tag as $tag) {
|
foreach ($this->tag as $tag) {
|
||||||
$names = $this->handler->getTagItems($tag);
|
$names = $this->handler->getTagItems($tag);
|
||||||
|
|
||||||
$this->handler->clearTag($names);
|
$this->handler->clearTag($names);
|
||||||
$this->handler->delete($tag);
|
|
||||||
|
$key = $this->handler->getTagKey($tag);
|
||||||
|
$this->handler->delete($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -108,7 +108,7 @@ class File extends Driver
|
|||||||
$content = gzuncompress($content);
|
$content = gzuncompress($content);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ['content' => $content, 'expire' => $expire];
|
return is_string($content) ? ['content' => $content, 'expire' => $expire] : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ class Redis extends Driver
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (0 != $this->options['select']) {
|
if (0 != $this->options['select']) {
|
||||||
$this->handler->select( (int) $this->options['select']);
|
$this->handler->select((int) $this->options['select']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,8 +112,8 @@ class Redis extends Driver
|
|||||||
public function get($name, $default = null)
|
public function get($name, $default = null)
|
||||||
{
|
{
|
||||||
$this->readTimes++;
|
$this->readTimes++;
|
||||||
|
$key = $this->getCacheKey($name);
|
||||||
$value = $this->handler->get($this->getCacheKey($name));
|
$value = $this->handler->get($key);
|
||||||
|
|
||||||
if (false === $value || is_null($value)) {
|
if (false === $value || is_null($value)) {
|
||||||
return $default;
|
return $default;
|
||||||
@ -161,7 +161,6 @@ class Redis extends Driver
|
|||||||
public function inc(string $name, int $step = 1)
|
public function inc(string $name, int $step = 1)
|
||||||
{
|
{
|
||||||
$this->writeTimes++;
|
$this->writeTimes++;
|
||||||
|
|
||||||
$key = $this->getCacheKey($name);
|
$key = $this->getCacheKey($name);
|
||||||
|
|
||||||
return $this->handler->incrby($key, $step);
|
return $this->handler->incrby($key, $step);
|
||||||
@ -177,7 +176,6 @@ class Redis extends Driver
|
|||||||
public function dec(string $name, int $step = 1)
|
public function dec(string $name, int $step = 1)
|
||||||
{
|
{
|
||||||
$this->writeTimes++;
|
$this->writeTimes++;
|
||||||
|
|
||||||
$key = $this->getCacheKey($name);
|
$key = $this->getCacheKey($name);
|
||||||
|
|
||||||
return $this->handler->decrby($key, $step);
|
return $this->handler->decrby($key, $step);
|
||||||
@ -193,7 +191,8 @@ class Redis extends Driver
|
|||||||
{
|
{
|
||||||
$this->writeTimes++;
|
$this->writeTimes++;
|
||||||
|
|
||||||
$result = $this->handler->del($this->getCacheKey($name));
|
$key = $this->getCacheKey($name);
|
||||||
|
$result = $this->handler->del($key);
|
||||||
return $result > 0;
|
return $result > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,7 +204,6 @@ class Redis extends Driver
|
|||||||
public function clear(): bool
|
public function clear(): bool
|
||||||
{
|
{
|
||||||
$this->writeTimes++;
|
$this->writeTimes++;
|
||||||
|
|
||||||
$this->handler->flushDB();
|
$this->handler->flushDB();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -231,7 +229,8 @@ class Redis extends Driver
|
|||||||
*/
|
*/
|
||||||
public function push(string $name, $value): void
|
public function push(string $name, $value): void
|
||||||
{
|
{
|
||||||
$this->handler->sAdd($name, $value);
|
$key = $this->getCacheKey($name);
|
||||||
|
$this->handler->sAdd($key, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -242,7 +241,9 @@ class Redis extends Driver
|
|||||||
*/
|
*/
|
||||||
public function getTagItems(string $tag): array
|
public function getTagItems(string $tag): array
|
||||||
{
|
{
|
||||||
return $this->handler->sMembers($tag);
|
$name = $this->getTagKey($tag);
|
||||||
|
$key = $this->getCacheKey($name);
|
||||||
|
return $this->handler->sMembers($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -32,7 +32,8 @@ class Help extends Command
|
|||||||
$this->setName('help')->setDefinition([
|
$this->setName('help')->setDefinition([
|
||||||
new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'),
|
new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'),
|
||||||
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
|
new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'),
|
||||||
])->setDescription('Displays help for a command')->setHelp(<<<EOF
|
])->setDescription('Displays help for a command')->setHelp(
|
||||||
|
<<<EOF
|
||||||
The <info>%command.name%</info> command displays help for a given command:
|
The <info>%command.name%</info> command displays help for a given command:
|
||||||
|
|
||||||
<info>php %command.full_name% list</info>
|
<info>php %command.full_name% list</info>
|
||||||
|
@ -25,7 +25,8 @@ class Lists extends Command
|
|||||||
*/
|
*/
|
||||||
protected function configure()
|
protected function configure()
|
||||||
{
|
{
|
||||||
$this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(<<<EOF
|
$this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(
|
||||||
|
<<<EOF
|
||||||
The <info>%command.name%</info> command lists all commands:
|
The <info>%command.name%</info> command lists all commands:
|
||||||
|
|
||||||
<info>php %command.full_name%</info>
|
<info>php %command.full_name%</info>
|
||||||
|
@ -22,12 +22,27 @@ class RunServer extends Command
|
|||||||
public function configure()
|
public function configure()
|
||||||
{
|
{
|
||||||
$this->setName('run')
|
$this->setName('run')
|
||||||
->addOption('host', 'H', Option::VALUE_OPTIONAL,
|
->addOption(
|
||||||
'The host to server the application on', '0.0.0.0')
|
'host',
|
||||||
->addOption('port', 'p', Option::VALUE_OPTIONAL,
|
'H',
|
||||||
'The port to server the application on', 8000)
|
Option::VALUE_OPTIONAL,
|
||||||
->addOption('root', 'r', Option::VALUE_OPTIONAL,
|
'The host to server the application on',
|
||||||
'The document root of the application', '')
|
'0.0.0.0'
|
||||||
|
)
|
||||||
|
->addOption(
|
||||||
|
'port',
|
||||||
|
'p',
|
||||||
|
Option::VALUE_OPTIONAL,
|
||||||
|
'The port to server the application on',
|
||||||
|
8000
|
||||||
|
)
|
||||||
|
->addOption(
|
||||||
|
'root',
|
||||||
|
'r',
|
||||||
|
Option::VALUE_OPTIONAL,
|
||||||
|
'The document root of the application',
|
||||||
|
''
|
||||||
|
)
|
||||||
->setDescription('PHP Built-in Server for ThinkPHP');
|
->setDescription('PHP Built-in Server for ThinkPHP');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,6 +28,10 @@ class ServiceDiscover extends Command
|
|||||||
{
|
{
|
||||||
if (is_file($path = $this->app->getRootPath() . 'vendor/composer/installed.json')) {
|
if (is_file($path = $this->app->getRootPath() . 'vendor/composer/installed.json')) {
|
||||||
$packages = json_decode(@file_get_contents($path), true);
|
$packages = json_decode(@file_get_contents($path), true);
|
||||||
|
// Compatibility with Composer 2.0
|
||||||
|
if (isset($packages['packages'])) {
|
||||||
|
$packages = $packages['packages'];
|
||||||
|
}
|
||||||
|
|
||||||
$services = [];
|
$services = [];
|
||||||
foreach ($packages as $package) {
|
foreach ($packages as $package) {
|
||||||
|
@ -35,7 +35,10 @@ class Local extends Driver
|
|||||||
: LocalAdapter::DISALLOW_LINKS;
|
: LocalAdapter::DISALLOW_LINKS;
|
||||||
|
|
||||||
return new LocalAdapter(
|
return new LocalAdapter(
|
||||||
$this->config['root'], LOCK_EX, $links, $permissions
|
$this->config['root'],
|
||||||
|
LOCK_EX,
|
||||||
|
$links,
|
||||||
|
$permissions
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +223,8 @@ class RouteTest extends TestCase
|
|||||||
{
|
{
|
||||||
$this->route->redirect('foo', 'http://localhost', 302);
|
$this->route->redirect('foo', 'http://localhost', 302);
|
||||||
|
|
||||||
$request = $this->makeRequest('foo');
|
$request = $this->makeRequest('foo');
|
||||||
|
$this->app->shouldReceive('make')->with(Request::class)->andReturn($request);
|
||||||
$response = $this->route->dispatch($request);
|
$response = $this->route->dispatch($request);
|
||||||
|
|
||||||
$this->assertInstanceOf(Redirect::class, $response);
|
$this->assertInstanceOf(Redirect::class, $response);
|
||||||
|
@ -81,7 +81,7 @@ class TokenService extends Service
|
|||||||
*/
|
*/
|
||||||
public function getInputToken(): string
|
public function getInputToken(): string
|
||||||
{
|
{
|
||||||
return $this->app->request->header('user-form-token', input('_csrf_', ''));
|
return $this->app->request->header('user-form-token') ?: input('_csrf_', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user