升级Thinkphp到5127版本
This commit is contained in:
1 parent
22a8f915e3
commit
9b8bd06b33
24 files changed
+504
-185
No files matched your search
@@ -20,7 +20,7 @@ use think\route\Dispatch;
|
||||
*/
|
||||
class App extends Container
|
||||
{
|
||||
const VERSION = '5.1.35 LTS';
|
||||
const VERSION = '5.1.37 LTS';
|
||||
|
||||
/**
|
||||
* 当前模块路径
|
||||
@@ -179,6 +179,11 @@ class App extends Container
|
||||
|
||||
$this->instance('app', $this);
|
||||
|
||||
// 加载环境变量配置文件
|
||||
if (is_file($this->rootPath . '.env')) {
|
||||
$this->env->load($this->rootPath . '.env');
|
||||
}
|
||||
|
||||
$this->configExt = $this->env->get('config_ext', '.php');
|
||||
|
||||
// 加载惯例配置文件
|
||||
@@ -196,11 +201,6 @@ class App extends Container
|
||||
'vendor_path' => $this->rootPath . 'vendor' . DIRECTORY_SEPARATOR,
|
||||
]);
|
||||
|
||||
// 加载环境变量配置文件
|
||||
if (is_file($this->rootPath . '.env')) {
|
||||
$this->env->load($this->rootPath . '.env');
|
||||
}
|
||||
|
||||
$this->namespace = $this->env->get('app_namespace', $this->namespace);
|
||||
$this->env->set('app_namespace', $this->namespace);
|
||||
|
||||
|
||||
@@ -487,12 +487,17 @@ class Console
|
||||
public function getNamespaces()
|
||||
{
|
||||
$namespaces = [];
|
||||
foreach ($this->commands as $command) {
|
||||
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName()));
|
||||
foreach ($this->commands as $name => $command) {
|
||||
if (is_string($command)) {
|
||||
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($name));
|
||||
} else {
|
||||
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($command->getName()));
|
||||
|
||||
foreach ($command->getAliases() as $alias) {
|
||||
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias));
|
||||
foreach ($command->getAliases() as $alias) {
|
||||
$namespaces = array_merge($namespaces, $this->extractAllNamespaces($alias));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return array_values(array_unique(array_filter($namespaces)));
|
||||
|
||||
@@ -127,8 +127,10 @@ class Log implements LoggerInterface
|
||||
}
|
||||
|
||||
if (PHP_SAPI == 'cli') {
|
||||
// 命令行日志实时写入
|
||||
$this->write($msg, $type, true);
|
||||
if (empty($this->config['level']) || in_array($type, $this->config['level'])) {
|
||||
// 命令行日志实时写入
|
||||
$this->write($msg, $type, true);
|
||||
}
|
||||
} else {
|
||||
$this->log[$type][] = $msg;
|
||||
}
|
||||
|
||||
Loaded 3 of 24 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user