Octane Version
2.17.1
Laravel Version
13
PHP Version
8.5
What server type are you using?
Swoole
Server Version
6.0
Database Driver & Version
No response
Description
The fix for #962 (glob support removed in chokidar v4) only checks version.startsWith('4.') in bin/file-watcher.cjs line 8. Chokidar v5 also removed glob support, so the path extraction and ignored filter never activate when chokidar v5 is installed.
This means wildcard watch paths like app-modules/**/*.php or config/**/*.php are passed as raw globs to chokidar v5, which silently ignores them. Only plain directory paths (e.g. app, routes) work.
The version check should use a semver comparison (>= 4) rather than a string prefix check.
Steps To Reproduce
- Install chokidar v5 (
npm install chokidar@^5.0.0)
- Keep the default
config/octane.php watch paths (which include config/**/*.php, database/**/*.php, etc.)
- Run
octane:start --watch
- Modify a file in
config/ - no reload
- Modify a file in
app/ (no glob) - reload works
- Change
config/**/*.php to config in the watch array - reload now works for config changes
Suggested Fix
In bin/file-watcher.cjs, change:
const chokidarVersion4 = require(chokidarPackagePath).version.startsWith('4.');
To something like:
const chokidarMajor = parseInt(require(chokidarPackagePath).version.split('.')[0], 10);
const chokidarVersion4 = chokidarMajor >= 4;
Octane Version
2.17.1
Laravel Version
13
PHP Version
8.5
What server type are you using?
Swoole
Server Version
6.0
Database Driver & Version
No response
Description
The fix for #962 (glob support removed in chokidar v4) only checks
version.startsWith('4.')inbin/file-watcher.cjsline 8. Chokidar v5 also removed glob support, so the path extraction andignoredfilter never activate when chokidar v5 is installed.This means wildcard watch paths like
app-modules/**/*.phporconfig/**/*.phpare passed as raw globs to chokidar v5, which silently ignores them. Only plain directory paths (e.g.app,routes) work.The version check should use a semver comparison (
>= 4) rather than a string prefix check.Steps To Reproduce
npm install chokidar@^5.0.0)config/octane.phpwatch paths (which includeconfig/**/*.php,database/**/*.php, etc.)octane:start --watchconfig/- no reloadapp/(no glob) - reload worksconfig/**/*.phptoconfigin the watch array - reload now works for config changesSuggested Fix
In
bin/file-watcher.cjs, change:To something like: