diff --git a/helpers.md b/helpers.md index a02e880bac..55991be602 100644 --- a/helpers.md +++ b/helpers.md @@ -3224,6 +3224,9 @@ By default, deferred functions will only be executed if the HTTP response, Artis defer(fn () => Metrics::reportOrder($order))->always(); ``` +> [!WARNING] +> If you have the **swoole** PHP extension installed, Laravel's `defer` function may conflict with Swoole's own global `defer` function, leading to web server errors. Make sure you call Laravel's `defer` helper by explicitly namespacing it: `use function Illuminate\Support\defer;` + #### Cancelling Deferred Functions