feat: 本次提交更新内容如下

php有问题,覆盖下
This commit is contained in:
笔记本里的永平
2025-07-07 14:52:56 +08:00
parent c29fbd1bbb
commit c9a3aaab58
338 changed files with 70315 additions and 12737 deletions

View File

@@ -11,16 +11,16 @@
namespace think\console\command;
use think\App;
use think\Config;
use think\console\Command;
use think\console\Input;
use think\console\input\Argument;
use think\console\Output;
use think\facade\App;
use think\facade\Config;
use think\facade\Env;
abstract class Make extends Command
{
protected $type;
abstract protected function getStub();
@@ -45,7 +45,7 @@ abstract class Make extends Command
}
if (!is_dir(dirname($pathname))) {
mkdir(strtolower(dirname($pathname)), 0755, true);
mkdir(dirname($pathname), 0755, true);
}
file_put_contents($pathname, $this->buildClass($classname));
@@ -62,26 +62,26 @@ abstract class Make extends Command
$class = str_replace($namespace . '\\', '', $name);
return str_replace(['{%className%}', '{%namespace%}', '{%app_namespace%}'], [
return str_replace(['{%className%}', '{%actionSuffix%}', '{%namespace%}', '{%app_namespace%}'], [
$class,
Config::get('action_suffix'),
$namespace,
App::$namespace,
App::getNamespace(),
], $stub);
}
protected function getPathName($name)
{
$name = str_replace(App::$namespace . '\\', '', $name);
$name = str_replace(App::getNamespace() . '\\', '', $name);
return APP_PATH . str_replace('\\', '/', $name) . '.php';
return Env::get('app_path') . ltrim(str_replace('\\', '/', $name), '/') . '.php';
}
protected function getClassName($name)
{
$appNamespace = App::$namespace;
$appNamespace = App::getNamespace();
if (strpos($name, $appNamespace . '\\') === 0) {
if (strpos($name, $appNamespace . '\\') !== false) {
return $name;
}