环境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(['code' => 404, 'msg' => '404 not found']);
});
Route::disableDefaultRoute();
控制台路由报错
Route set to / is not callable
Route set to / is not callable
Route set to / is not callable
Route set to / is not callable
Route set to / is not callable
是不是因为这个?猜的!
helper.php就只是一些辅助函数吧 应该是路由改了东西 没咋看源码
应该是改路由源码了,升级后我也报错,退回上一版本正常 php8.0
用的PHP8.2?
PHP8.2弃用了部分对象的调用方式,如
[$class, $method]
这类callable
类型的php8.0啊
composer require workerman/webman-framework ^v1.4.2
更新到1.4.2就好了
好的 感谢