fix(caddy): use default patterns when hot_reload is alone by dunglas · Pull Request #2081 · php/frankenphp
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a bug where using the hot_reload directive alone (without inline patterns or a block) would not initialize the hot reload configuration, preventing default patterns from being applied. The fix ensures that the HotReload struct is always initialized when the directive is encountered, allowing the configureHotReload function to properly apply default watch patterns when none are explicitly specified.
- Removes conditional initialization logic that prevented standalone
hot_reloadusage - Ensures
HotReloadconfig is always created when parsing thehot_reloaddirective - Removes redundant nil check that's no longer needed after the initialization change
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.