webman1.4比1.3提升/优化了哪些地方? 1.支持应用插件, 2.支付复杂路由,无需webman/auto-route插件 3.支持控制器复用开关,每个控制器初始化都会触发 __construct() 构造函数,无需beforeAction,无需webman/action-hook 插件 就这些吗? 有升级的必要吗?...
不支持 直接用对象调用关联模型喃? $usesr = User::query()->with('articles')->get(); foreach($users as $user){ print_r($user->articles); } 打印结果 是null 只能先转数组 用数组调用 $usesr = User::query()->with('articles')->get()-...
看介绍说webman-framework1.4.2已经包含自动路由了,也就是说不需要auto-route这个插件了, 但是更新完毕后,卸载掉了auto-route之后发现多应用是可以访问的,但是没有默认应用了, 比如之前这个 default_app="index",另外还有一个BUG,静态资源访问的时候, 如果包含两个// 则无法访问,例如: http://workerman.net/static...
环境php8.0 在windows下跟linux中都是这样 在route.php Route::any('/test', function ($request) { return response('test'); }); Route::get('/', [\app\controller\Index::class,'index']); Route::fallback(function () { return json...
object(ArrayObject)#1547 (1) { ["storage":"ArrayObject":private] => array(0) { } } 有图片 ,但是获取不到。你们遇到过这问题吗...
总是提示: process error: class process\Monitor not exists 不能监控文件变动,开发起来还是挺麻烦的。 已解决,是我自己删了 composer.json 里面的东西。...
例如在beforeAction请求前置操作赋值$userInfo,对于当前请求,后面的所有操作对于$userInfo的操作都是安全的吗?两个请求之间会互相影响吗? <?php namespace app\controller; use support\Request; class Index { /** * 保存用户信息 */ protected $userInfo...
class FilterRequest implements MiddlewareInterface { public function process(Request $request, callable $next): Response { $request = Util::filter($request->all()); return $next($requ...
习惯了在控制器方法参上注入任意依赖, 用了webman不行了, 作者能否将thinkphp的类映射加进来? 好让控制器方法参可以注入任意依赖. 如下代码, 目前webman还是实现不了 <?php namespace app\controller; use support\Request; use app\model\User; class Index { public function inde...
1. webman会在服务启动时默认启动一个httpServer,具体配置在server.php中提现;除了该服务进程,还可以通过process.php实现自定义进程;httpServer和自定义进程是否可以都抽象为process.php?理由如下: web开发框架可能存在一个实例启动会需要两个http服务各自监听不同端口,或者不启动httpServer只启动如jsonRpcServer;我们可以将httpServ...
如图,开了6个php进程,连接池却有13个,虽然无碍,但很多是sleep,有点不科学,不应该是一进程对应一个池子吗,是illuminate/database问题吗? 目前业务逻辑上几乎只对几个表的入库操作,都调的orm中的insert(),没其他操作了...
使用GatewayWorker,开启了10个进程 function OnMessage($client_id,$data){ switch($data['cmd']){ case 'open':{ self::AOpen($client_id,$data); break; } } } function AOpen($cl...
1. 之前已经上线一个webman做的API服务(webman版本是v1.3.21) 目前一切正常,稳定,高效,非常感谢webman 2. 最近打算做一个消息中心和任务中心,也打算用webman来做 但最近看到论坛中有人提到 webman v1.4 想知道,webmanv1.4 和 之前的版本会有什么较大变化吗?...