Closed lujihong closed 3 years ago
用最新代码试试
另外,你把你的watcher配置发一下
use Hyperf\Watcher\Driver\ScanFileDriver;
return [ 'driver' => ScanFileDriver::class, 'bin' => 'php', 'watch' => [ 'dir' => ['app', 'config'], 'file' => ['.env'], 'scan_interval' => 1000, ], ];
用最新代码试试
就是最新的代码2.1.4
Docker里,scan_cacheable是true,你改成false试试
修改文件后报错,即使只是增加一个空行,运行环境在centos7 下面的docker环境,swoole版本4.6.4
报错如下:
Fatal error: Uncaught RuntimeException: The class reflector object does not init yet in /opt/www/vendor/hyperf/di/src/BetterReflectionManager.php:39 Stack trace:
0 /opt/www/vendor/hyperf/di/src/BetterReflectionManager.php(62): Hyperf\Di\BetterReflectionManager::getClassReflector()
1 /opt/www/vendor/hyperf/di/src/Aop/PropertyHandlerVisitor.php(90): Hyperf\Di\BetterReflectionManager::reflectClass()
2 /opt/www/vendor/hyperf/di/src/Aop/PropertyHandlerVisitor.php(64): Hyperf\Di\Aop\PropertyHandlerVisitor->buildConstructor()
3 /opt/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(230): Hyperf\Di\Aop\PropertyHandlerVisitor->leaveNode()
4 /opt/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(114): PhpParser\NodeTraverser->traverseArray()
5 /opt/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(223): PhpParser\NodeTraverser->traverseNode()
6 /opt/www/vendor/nikic/php-parser/lib/PhpParser/NodeTraverser.php(91): PhpParser\NodeTraverser->traverseArray()
7 /opt/www/vendor/hyperf/di/src/Aop/Ast.p in /opt/www/vendor/hyperf/di/src/BetterReflectionManager.php on line 39
Stop server success.