一招兼容开发环境热更新支持 swoole-cli #5105
huangdijia
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
使用 hyperf 的朋友都支持,官方提供的开发环境热更新组件
hyperf/watcher
非常好用,对开发非常友好。近日 swoole-cli 官方发布了新版,增加了 MacOS 支持,我就迫不及待的想要尝试,是真香!
不过热更新遇到了两个问题,说到底就是
watcher.php
配置:watcher.bin
写死了php
,导致在swoole-cli
环境下无法找到php
,这个问题好解决,直接改为swoole-cli
或其真实路径即可。[ERROR] Swoole short function names must be disabled before the server starts, please set swoole.use_shortname = 'Off' in your php.ini.
,这个问题也好解决。如果我随时想切换 PHP 和 swoole-cli 呢?也 so easy。
$_SERVER['_']
是什么鬼?百度一下,你就知道。好了,就这样吧。
Beta Was this translation helpful? Give feedback.
All reactions