diff --git a/Dockerfile b/Dockerfile index f4df400f7..13814876e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,8 +4,7 @@ ARG timezone ENV TIMEZONE=${timezone:-"Asia/Shanghai"} \ APP_ENV=prod \ - SCAN_CACHEABLE=(false) - + SCAN_CACHEABLE=(true) RUN set -ex \ # show php version and extensions diff --git a/app/CodeFec/Admin/LogServer.php b/app/CodeFec/Admin/LogServer.php index d4c30cca6..60b13a4cf 100644 --- a/app/CodeFec/Admin/LogServer.php +++ b/app/CodeFec/Admin/LogServer.php @@ -10,7 +10,7 @@ */ namespace App\CodeFec\Admin; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use SleekDB\Exceptions\IdNotAllowedException; use SleekDB\Exceptions\InvalidArgumentException; use SleekDB\Exceptions\InvalidConfigurationException; diff --git a/app/CodeFec/DockerInstall.php b/app/CodeFec/DockerInstall.php index 75849f9c2..dea06e55a 100644 --- a/app/CodeFec/DockerInstall.php +++ b/app/CodeFec/DockerInstall.php @@ -17,7 +17,7 @@ use Hyperf\Database\Schema\Blueprint; use Hyperf\Database\Schema\Schema; use Hyperf\DbConnection\Db; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use PDOException; use Swoole\Coroutine\System; use Symfony\Component\Console\Application; @@ -121,7 +121,7 @@ public function migrate() $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); @@ -150,7 +150,7 @@ public function migrate() $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); @@ -215,7 +215,7 @@ public function update_v2() $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); diff --git a/app/CodeFec/Header/functions.php b/app/CodeFec/Header/functions.php index 0d4d6081c..36b4d5d85 100644 --- a/app/CodeFec/Header/functions.php +++ b/app/CodeFec/Header/functions.php @@ -14,7 +14,7 @@ class functions { public static function header(): HeaderInterface { - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); return $container->get(HeaderInterface::class); } diff --git a/app/CodeFec/Install.php b/app/CodeFec/Install.php index d489ee1d4..65d460ca2 100644 --- a/app/CodeFec/Install.php +++ b/app/CodeFec/Install.php @@ -17,7 +17,7 @@ use Hyperf\Database\Schema\Blueprint; use Hyperf\Database\Schema\Schema; use Hyperf\DbConnection\Db; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use PDOException; use Symfony\Component\Console\Application; use Symfony\Component\Console\Input\ArrayInput; @@ -187,7 +187,7 @@ public function step_3() $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); @@ -216,7 +216,7 @@ public function step_3() $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); @@ -296,7 +296,7 @@ public function step_4() $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); diff --git a/app/CodeFec/Ui/Generate/PayGenerate.php b/app/CodeFec/Ui/Generate/PayGenerate.php index 91770e1f5..61be12bf8 100644 --- a/app/CodeFec/Ui/Generate/PayGenerate.php +++ b/app/CodeFec/Ui/Generate/PayGenerate.php @@ -1,90 +1,96 @@ $type, "value" => $value, ]; - $this->list = Arr::add($this->list,$id,$arr); + $this->list = Arr::set($this->list,$id,$arr); return true; } diff --git a/app/CodeFec/Ui/functions.php b/app/CodeFec/Ui/functions.php index 0393edb2d..f4fd08e9e 100644 --- a/app/CodeFec/Ui/functions.php +++ b/app/CodeFec/Ui/functions.php @@ -6,7 +6,7 @@ class functions { public static function Ui() { - return \Hyperf\Utils\ApplicationContext::getContainer()->get(UiInterface::class); + return \Hyperf\Context\ApplicationContext::getContainer()->get(UiInterface::class); } public static function get($type): array diff --git a/app/CodeFec/Upgrading.php b/app/CodeFec/Upgrading.php index 6faebf870..6d99a00a8 100644 --- a/app/CodeFec/Upgrading.php +++ b/app/CodeFec/Upgrading.php @@ -174,7 +174,7 @@ private function AdminPluginMigrateAll(): void $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); diff --git a/app/CodeFec/View/HyperfViewEngine.php b/app/CodeFec/View/HyperfViewEngine.php index edbc661ce..2c40ca94c 100644 --- a/app/CodeFec/View/HyperfViewEngine.php +++ b/app/CodeFec/View/HyperfViewEngine.php @@ -11,25 +11,26 @@ namespace App\CodeFec\View; use App\CodeFec\Plugins; -use Hyperf\Utils\ApplicationContext; +use Hyperf\Di\Annotation\Inject; use Hyperf\View\Engine\EngineInterface; use Hyperf\ViewEngine\Contract\FactoryInterface; class HyperfViewEngine implements EngineInterface { + #[Inject] + protected FactoryInterface $factory; + public function render($template, $data, $config): string { - /** @var FactoryInterface $factory */ - $factory = ApplicationContext::getContainer()->get(FactoryInterface::class); // 插件 $plugin_list = (new Plugins())->getEnPlugins(); foreach ($plugin_list as $value) { - $factory->addNamespace($value, plugin_path($value . '/resources/views')); + $this->factory->addNamespace($value, plugin_path($value . '/resources/views')); } // 主题 $name = get_options('theme', 'CodeFec'); - $factory->replaceNamespace('App', theme_path($name . '/resources/views')); - $factory->replaceNamespace('Core', theme_path($name . '/resources/views')); - return $factory->make($template, $data)->render(); + $this->factory->replaceNamespace('App', theme_path($name . '/resources/views')); + $this->factory->replaceNamespace('Core', theme_path($name . '/resources/views')); + return $this->factory->make($template, $data)->render(); } } diff --git a/app/Command/ServerDocker.php b/app/Command/ServerDocker.php index 57813b97e..75c616503 100644 --- a/app/Command/ServerDocker.php +++ b/app/Command/ServerDocker.php @@ -1,6 +1,6 @@ container = $container; @@ -36,30 +41,51 @@ public function __construct(ContainerInterface $container) $this->addOption('dir', 'D', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', []); $this->addOption('no-restart', 'N', InputOption::VALUE_NONE, 'Whether no need to restart server'); } - + public function configure() { parent::configure(); $this->setDescription('start docker server'); } - + public function handle() { - if (!file_exists(BASE_PATH . '/app/CodeFec/storage/install.lock')) { - if (!is_dir(BASE_PATH . '/app/CodeFec/storage')) { + if (! file_exists(BASE_PATH . '/app/CodeFec/storage/install.lock')) { + if (! is_dir(BASE_PATH . '/app/CodeFec/storage')) { System::exec('cd ' . BASE_PATH . '/app/CodeFec && mkdir storage'); } - $myfile = fopen(BASE_PATH . '/app/CodeFec/storage/install.step.lock', 'wb') or exit('Unable to open file!'); - fwrite($myfile, "5"); - fclose($myfile); $install = make(DockerInstall::class, ['output' => $this->output, 'command' => $this]); $install->run(); } - go(function () { - system_clear_cache(); - }); - $option = make(Option::class, ['dir' => $this->input->getOption('dir'), 'file' => $this->input->getOption('file'), 'restart' => !$this->input->getOption('no-restart')]); - $watcher = make(Watcher::class, ['option' => $option, 'output' => $this->output]); - $watcher->run(); } -} \ No newline at end of file + + protected function execute(InputInterface $input, OutputInterface $output) + { + shell_exec('composer du'); + $this->checkEnvironment($output); + $serverFactory = $this->container->get(ServerFactory::class); + $serverFactory->setEventDispatcher($this->container->get(EventDispatcherInterface::class)); + $serverFactory->setLogger($this->container->get(StdoutLoggerInterface::class)); + $serverConfig = $this->container->get(ConfigInterface::class)->get('server', []); + if (! $serverConfig) { + throw new \InvalidArgumentException('At least one se$rver should be defined.'); + } + $serverFactory->configure($serverConfig); + Coroutine::set(['hook_flags' => \Hyperf\Support\swoole_hook_flags()]); + $serverFactory->start(); + return 0; + } + + private function checkEnvironment(OutputInterface $output) + { + if (! extension_loaded('swoole')) { + return; + } + $useShortname = ini_get_all('swoole')['swoole.use_shortname']['local_value']; + $useShortname = strtolower(trim(str_replace('0', '', $useShortname))); + if (! in_array($useShortname, ['', 'off', 'false'], true)) { + $output->writeln("ERROR Swoole short function names must be disabled before the server starts, please set swoole.use_shortname='Off' in your php.ini."); + exit(SIGTERM); + } + } +} diff --git a/app/Command/StartCommand.php b/app/Command/StartCommand.php index 6220a18fa..1f0189c80 100644 --- a/app/Command/StartCommand.php +++ b/app/Command/StartCommand.php @@ -1,6 +1,6 @@ addOption('dir', 'D', InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, '', []); $this->addOption('no-restart', 'N', InputOption::VALUE_NONE, 'Whether no need to restart server'); } - + public function handle() { // TODO: Implement handle() method. } - + protected function execute(InputInterface $input, OutputInterface $output) { shell_exec('composer du'); @@ -52,7 +51,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $this->checkEnvironment($output); $serverFactory = $this->container->get(ServerFactory::class)->setEventDispatcher($this->container->get(EventDispatcherInterface::class))->setLogger($this->container->get(StdoutLoggerInterface::class)); $serverConfig = $this->container->get(ConfigInterface::class)->get('server', []); - if (!$serverConfig) { + if (! $serverConfig) { throw new InvalidArgumentException('At least one server should be defined.'); } $serverFactory->configure($serverConfig); @@ -64,17 +63,17 @@ protected function execute(InputInterface $input, OutputInterface $output) } return 0; } - - private function removeFiles(...$values) : void + + private function removeFiles(...$values): void { foreach ($values as $value) { exec('rm -rf "' . $value . '"'); } } - + private function checkEnvironment(OutputInterface $output) { - if (!extension_loaded('swoole')) { + if (! extension_loaded('swoole')) { return; } /** @@ -102,9 +101,9 @@ private function checkEnvironment(OutputInterface $output) */ $useShortname = ini_get_all('swoole')['swoole.use_shortname']['local_value']; $useShortname = strtolower(trim(str_replace('0', '', $useShortname))); - if (!in_array($useShortname, ['', 'off', 'false'], true)) { + if (! in_array($useShortname, ['', 'off', 'false'], true)) { $output->writeln("ERROR Swoole short function names must be disabled before the server starts, please set swoole.use_shortname='Off' in your php.ini."); exit(SIGTERM); } } -} \ No newline at end of file +} diff --git a/app/Controller/Admin/BackupController.php b/app/Controller/Admin/BackupController.php index d71abb124..0489419b6 100644 --- a/app/Controller/Admin/BackupController.php +++ b/app/Controller/Admin/BackupController.php @@ -16,7 +16,7 @@ use Hyperf\HttpServer\Annotation\Middleware; use Hyperf\Paginator\LengthAwarePaginator; use Hyperf\Utils\Collection; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Swoole\Coroutine\System; use Symfony\Component\Finder\Finder; diff --git a/app/Controller/Admin/Hook/ComponentController.php b/app/Controller/Admin/Hook/ComponentController.php index 645aa0f51..d99c479bc 100644 --- a/app/Controller/Admin/Hook/ComponentController.php +++ b/app/Controller/Admin/Hook/ComponentController.php @@ -18,7 +18,7 @@ use Hyperf\HttpServer\Annotation\PostMapping; use Hyperf\Paginator\LengthAwarePaginator; use Hyperf\Utils\Collection; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Hyperf\ViewEngine\Contract\FactoryInterface; use Swoole\Coroutine\System; use Symfony\Component\Finder\Finder; @@ -52,7 +52,7 @@ public function preview() { $component = request()->input('component'); $component = 'customize.component.' . $component; - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); $factory = $container->get(FactoryInterface::class); if (!$factory->exists($component)) { return admin_abort('小部件不存在', 403); diff --git a/app/Controller/ApiController.php b/app/Controller/ApiController.php index 30701342a..1272ee66f 100755 --- a/app/Controller/ApiController.php +++ b/app/Controller/ApiController.php @@ -74,7 +74,7 @@ public function AdminPluginSave() : array $params = ['command' => 'ClearCache']; $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); $application->setAutoExit(false); @@ -122,7 +122,7 @@ public function AdminPluginMigrate($name = null) : array $params = ['command' => 'CodeFec:migrate', 'path' => plugin_path($plugin_name . '/src/migrations')]; $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); $application->setAutoExit(false); @@ -150,7 +150,7 @@ public function AdminPluginUpdatePackage() $params = ['command' => 'CodeFec:PluginsComposerInstall']; $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); $application->setAutoExit(false); diff --git a/app/Controller/PluginsController.php b/app/Controller/PluginsController.php index 68aecd5fa..b9e122ad4 100755 --- a/app/Controller/PluginsController.php +++ b/app/Controller/PluginsController.php @@ -18,7 +18,7 @@ use Hyperf\HttpServer\Annotation\PostMapping; use Hyperf\Paginator\LengthAwarePaginator; use Hyperf\Utils\Collection; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Psr\Http\Message\ResponseInterface; @@ -152,7 +152,7 @@ private function migrate_resources($plugin_name) $input = new ArrayInput($params); $output = new NullOutput(); - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); /** @var Application $application */ $application = $container->get(\Hyperf\Contract\ApplicationInterface::class); diff --git a/app/Controller/ThemesController.php b/app/Controller/ThemesController.php index 4c8711fba..172112dbd 100644 --- a/app/Controller/ThemesController.php +++ b/app/Controller/ThemesController.php @@ -8,7 +8,7 @@ use App\Request\Admin\PluginUpload; use App\Request\Admin\ThemeUpload; use Hyperf\HttpServer\Annotation\{Controller, GetMapping, Middleware, PostMapping}; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; #[Controller(prefix: "/admin/themes")] #[Middleware(AdminMiddleware::class)] diff --git a/app/Exception/Handler/AppExceptionHandler.php b/app/Exception/Handler/AppExceptionHandler.php index a1ac66dc9..b6594ab17 100755 --- a/app/Exception/Handler/AppExceptionHandler.php +++ b/app/Exception/Handler/AppExceptionHandler.php @@ -13,7 +13,7 @@ use Hyperf\Contract\StdoutLoggerInterface; use Hyperf\ExceptionHandler\ExceptionHandler; use Hyperf\HttpMessage\Stream\SwooleStream; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Psr\Http\Message\ResponseInterface; use Qbhy\HyperfAuth\Exception\UnauthorizedException; use Throwable; diff --git a/app/Exception/Handler/ValidationExceptionHandler.php b/app/Exception/Handler/ValidationExceptionHandler.php index 991f0bfb8..61b4a93b8 100755 --- a/app/Exception/Handler/ValidationExceptionHandler.php +++ b/app/Exception/Handler/ValidationExceptionHandler.php @@ -35,7 +35,7 @@ public function handle(Throwable $throwable, ResponseInterface $response): Respo if (! $response->hasHeader('content-type')) { $response = $response->withAddedHeader('content-type', 'text/plain; charset=utf-8'); } - $container = \Hyperf\Utils\ApplicationContext::getContainer(); + $container = \Hyperf\Context\ApplicationContext::getContainer(); $responses = $container->get(\Hyperf\HttpServer\Contract\ResponseInterface::class); return $responses->json(Json_Api($throwable->status, false, $body)); diff --git a/app/Listener/DbQueryExecutedListener.php b/app/Listener/DbQueryExecutedListener.php index dcd6a80e4..b25bf0427 100755 --- a/app/Listener/DbQueryExecutedListener.php +++ b/app/Listener/DbQueryExecutedListener.php @@ -16,7 +16,7 @@ use Hyperf\Event\Contract\ListenerInterface; use Hyperf\Logger\LoggerFactory; use Hyperf\Utils\Arr; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Psr\Container\ContainerInterface; use Psr\Log\LoggerInterface; diff --git a/app/Listener/InstallSuccessListener.php b/app/Listener/InstallSuccessListener.php index 914bbd914..16496042c 100644 --- a/app/Listener/InstallSuccessListener.php +++ b/app/Listener/InstallSuccessListener.php @@ -7,7 +7,7 @@ use Hyperf\DB\DB; use Hyperf\Event\Annotation\Listener; use Hyperf\Event\Contract\ListenerInterface; -use Hyperf\Utils\ApplicationContext; +use Hyperf\Context\ApplicationContext; /** * 安装成功 diff --git a/app/Middleware/CsrfMiddleware.php b/app/Middleware/CsrfMiddleware.php index e01a48cca..aef81f085 100755 --- a/app/Middleware/CsrfMiddleware.php +++ b/app/Middleware/CsrfMiddleware.php @@ -11,7 +11,7 @@ namespace App\Middleware; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Psr\Container\ContainerInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; diff --git a/app/Middleware/InstallMiddleware.php b/app/Middleware/InstallMiddleware.php index 32638d97b..9a2141598 100755 --- a/app/Middleware/InstallMiddleware.php +++ b/app/Middleware/InstallMiddleware.php @@ -10,7 +10,7 @@ */ namespace App\Middleware; -use Hyperf\Utils\Str; +use Hyperf\Stringable\Str; use Psr\Container\ContainerInterface; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; diff --git a/app/Plugins/Comment/resources/views/Notice/comment.blade.php b/app/Plugins/Comment/resources/views/Notice/comment.blade.php index 7be1cb841..03dd25026 100644 --- a/app/Plugins/Comment/resources/views/Notice/comment.blade.php +++ b/app/Plugins/Comment/resources/views/Notice/comment.blade.php @@ -16,7 +16,7 @@
{{__("topic.comment.comment content")}}
- {{\Hyperf\Utils\Str::limit(remove_bbCode(strip_tags($data->post->content)),100)}} + {{\Hyperf\Stringable\Str::limit(remove_bbCode(strip_tags($data->post->content)),100)}}
\ No newline at end of file diff --git a/app/Plugins/Comment/resources/views/Notice/reply.blade.php b/app/Plugins/Comment/resources/views/Notice/reply.blade.php index 8f1b9e0b4..1076d52bd 100644 --- a/app/Plugins/Comment/resources/views/Notice/reply.blade.php +++ b/app/Plugins/Comment/resources/views/Notice/reply.blade.php @@ -24,10 +24,10 @@ {{$data->parent->user->username}} {{__("app.Published on")}} {{$data->created_at}}
- {{\Hyperf\Utils\Str::limit(remove_bbCode(strip_tags($data->parent->post->content)),60)}} + {{\Hyperf\Stringable\Str::limit(remove_bbCode(strip_tags($data->parent->post->content)),60)}} - {{\Hyperf\Utils\Str::limit(remove_bbCode(strip_tags($data->post->content)),100)}} + {{\Hyperf\Stringable\Str::limit(remove_bbCode(strip_tags($data->post->content)),100)}} \ No newline at end of file diff --git a/app/Plugins/Comment/resources/views/ShortCode/comment.blade.php b/app/Plugins/Comment/resources/views/ShortCode/comment.blade.php index 0bd1f2a85..fc4641d62 100644 --- a/app/Plugins/Comment/resources/views/ShortCode/comment.blade.php +++ b/app/Plugins/Comment/resources/views/ShortCode/comment.blade.php @@ -47,7 +47,7 @@ {{$value->parent->user->username}} {{__("app.Published on")}} {{format_date($value->created_at)}}
- {!! \Hyperf\Utils\Str::limit(remove_bbCode(strip_tags($value->parent->post->content)),60) !!} + {!! \Hyperf\Stringable\Str::limit(remove_bbCode(strip_tags($value->parent->post->content)),60) !!} @endif diff --git a/app/Plugins/Comment/resources/views/Widget/source.blade.php b/app/Plugins/Comment/resources/views/Widget/source.blade.php index 8036c375e..c479d3411 100644 --- a/app/Plugins/Comment/resources/views/Widget/source.blade.php +++ b/app/Plugins/Comment/resources/views/Widget/source.blade.php @@ -9,7 +9,7 @@ class="col-md-12 markdown mt-3 mb-2" style="font-size: 15px"> {{$value->parent->user->username}} {{__("app.Published on")}} {{format_date($value->parent->created_at)}}
- {!! \Hyperf\Utils\Str::limit(remove_bbCode(strip_tags($value->parent->post->content)),60) !!} + {!! \Hyperf\Stringable\Str::limit(remove_bbCode(strip_tags($value->parent->post->content)),60) !!} @else diff --git a/app/Plugins/Comment/resources/views/topic/create.blade.php b/app/Plugins/Comment/resources/views/topic/create.blade.php index 027c98128..c37c24c5c 100644 --- a/app/Plugins/Comment/resources/views/topic/create.blade.php +++ b/app/Plugins/Comment/resources/views/topic/create.blade.php @@ -1,5 +1,5 @@ @extends('App::app') -@section('title','评论帖子【'.\Hyperf\Utils\Str::limit($topic->title,25).'】') +@section('title','评论帖子【'.\Hyperf\Stringable\Str::limit($topic->title,25).'】') @section('content')
@@ -13,7 +13,7 @@ diff --git a/app/Plugins/Comment/resources/views/topic/edit.blade.php b/app/Plugins/Comment/resources/views/topic/edit.blade.php index 9ec38863e..b1558bd8a 100644 --- a/app/Plugins/Comment/resources/views/topic/edit.blade.php +++ b/app/Plugins/Comment/resources/views/topic/edit.blade.php @@ -17,7 +17,7 @@ @endif @foreach($topic_menu as $data) - @if(\Hyperf\Utils\Str::contains(core_http_url(),$data['parameter'])) + @if(\Hyperf\Stringable\Str::contains(core_http_url(),$data['parameter']))

{{$value->name}}

-

{{ \Hyperf\Utils\Str::limit(core_default($value->description, __("app.no description")), 32) }}

+

{{ \Hyperf\Stringable\Str::limit(core_default($value->description, __("app.no description")), 32) }}

diff --git a/app/Plugins/Topic/resources/views/Tag/index.blade.php b/app/Plugins/Topic/resources/views/Tag/index.blade.php index 0aac1f0f6..423031b87 100644 --- a/app/Plugins/Topic/resources/views/Tag/index.blade.php +++ b/app/Plugins/Topic/resources/views/Tag/index.blade.php @@ -34,7 +34,7 @@
@if($value->description) - {{ \Hyperf\Utils\Str::limit($value->description,100) }} + {{ \Hyperf\Stringable\Str::limit($value->description,100) }} @else {{__("app.no description")}} @endif diff --git a/app/Plugins/Topic/resources/views/Tag/jobs.blade.php b/app/Plugins/Topic/resources/views/Tag/jobs.blade.php index cef4d693d..d8ac11e9b 100644 --- a/app/Plugins/Topic/resources/views/Tag/jobs.blade.php +++ b/app/Plugins/Topic/resources/views/Tag/jobs.blade.php @@ -30,7 +30,7 @@
@if($value->description) - {{ \Hyperf\Utils\Str::limit($value->description,100) }} + {{ \Hyperf\Stringable\Str::limit($value->description,100) }} @else {{__("app.no description")}} @endif diff --git a/app/Plugins/Topic/resources/views/Tags/data/index.blade.php b/app/Plugins/Topic/resources/views/Tags/data/index.blade.php index e5764efb5..7f0752dd5 100644 --- a/app/Plugins/Topic/resources/views/Tags/data/index.blade.php +++ b/app/Plugins/Topic/resources/views/Tags/data/index.blade.php @@ -36,7 +36,7 @@ @endif @foreach($topic_menu as $data) - @if(\Hyperf\Utils\Str::contains(core_http_url(),$data['parameter'])) + @if(\Hyperf\Stringable\Str::contains(core_http_url(),$data['parameter'])) @endif @foreach($topic_menu as $data) - @if(\Hyperf\Utils\Str::contains(core_http_url(),$data['parameter'])) + @if(\Hyperf\Stringable\Str::contains(core_http_url(),$data['parameter']))