From dddd678d47682dc7c4fd7d30491d23b013a06cba Mon Sep 17 00:00:00 2001 From: Carlos Granados Date: Sun, 6 Sep 2026 12:38:03 +0200 Subject: [PATCH 1/4] fold error notifications into logging and drop the error handling page --- docs/user-guide/error-handling.md | 9 --------- docs/user-guide/logging.md | 17 +++++++++++++++++ sidebars.js | 1 - 3 files changed, 17 insertions(+), 10 deletions(-) delete mode 100644 docs/user-guide/error-handling.md diff --git a/docs/user-guide/error-handling.md b/docs/user-guide/error-handling.md deleted file mode 100644 index a7cd9b9..0000000 --- a/docs/user-guide/error-handling.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -title: Error Handling ---- - -Break on uncaught exceptions and errors, and inspect the state of your application at the moment things go wrong. - -:::note -This page is a work in progress — full documentation is coming soon. -::: diff --git a/docs/user-guide/logging.md b/docs/user-guide/logging.md index 621d46d..ef70b9c 100644 --- a/docs/user-guide/logging.md +++ b/docs/user-guide/logging.md @@ -46,6 +46,23 @@ in the PHP error log for it. ::: +## Errors reported as they happen + +Your editor can also ask to be told about every diagnostic PHP raises — warnings, +notices, deprecations and errors — as they occur. Each one arrives with its +message, its file and its line, and the script keeps running. + +This is the middle ground between the two extremes. Ignoring a warning means +finding it later in a log, if at all; breaking on one, with an +[exception breakpoint](./breakpoints.md#exception-breakpoints) on `Warning`, stops +you dead every time it fires. A notification just tells you, in order, alongside +everything else the request did. + +Like output capture, this is an editor setting negotiated when the session starts, +and it is off unless your editor asks for it. It is worth turning on and leaving +on: a deprecation you would never have gone looking for is exactly the kind of +thing that turns up in that panel. + ## The debugger's own log The debug log is for the times the debugger is the problem: the session never diff --git a/sidebars.js b/sidebars.js index 6b23c9e..84ba1f7 100644 --- a/sidebars.js +++ b/sidebars.js @@ -39,7 +39,6 @@ const sidebars = { 'user-guide/inspect-variables', 'user-guide/watches-and-edits', 'user-guide/logging', - 'user-guide/error-handling', ], }, { From 4195e3b097f476d6b0254ebb06686c4f379d021c Mon Sep 17 00:00:00 2001 From: Carlos Granados Date: Sun, 6 Sep 2026 12:43:12 +0200 Subject: [PATCH 2/4] nest warnings under the output section so the page keeps to two halves --- docs/user-guide/logging.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/docs/user-guide/logging.md b/docs/user-guide/logging.md index ef70b9c..f14d3c5 100644 --- a/docs/user-guide/logging.md +++ b/docs/user-guide/logging.md @@ -4,11 +4,14 @@ title: Logging Two different things get called logging here, and they solve different problems. -One is your own output — the `echo` and `var_dump()` you scatter about — arriving -in your editor instead of the response body. The other is the debugger's own log, -which is what you reach for when the debugger itself is not behaving. +One is what your request produces as it runs — the `echo` and `var_dump()` you +scatter about, and the warnings PHP raises along the way — arriving in your editor +instead of the response body. The other is the debugger's own log, which is what +you reach for when the debugger itself is not behaving. -## Your script's output in the editor +## What your request produces + +### Your script's output Your editor can ask for a copy of everything the script writes to standard output. `echo`, `print_r()`, `var_dump()`, whatever a framework writes — all of it appears @@ -46,11 +49,11 @@ in the PHP error log for it. ::: -## Errors reported as they happen +### Warnings and notices -Your editor can also ask to be told about every diagnostic PHP raises — warnings, -notices, deprecations and errors — as they occur. Each one arrives with its -message, its file and its line, and the script keeps running. +Separately from that output, your editor can ask to be told about every diagnostic +PHP raises — warnings, notices, deprecations and errors — as they occur. Each one +arrives with its message, its file and its line, and the script keeps running. This is the middle ground between the two extremes. Ignoring a warning means finding it later in a log, if at all; breaking on one, with an @@ -58,8 +61,8 @@ finding it later in a log, if at all; breaking on one, with an you dead every time it fires. A notification just tells you, in order, alongside everything else the request did. -Like output capture, this is an editor setting negotiated when the session starts, -and it is off unless your editor asks for it. It is worth turning on and leaving +This is a separate editor setting from output capture, negotiated the same way and +likewise off unless your editor asks for it. It is worth turning on and leaving on: a deprecation you would never have gone looking for is exactly the kind of thing that turns up in that panel. From 2a05ce6fd409092f2352e168b93d5a7d6e65645d Mon Sep 17 00:00:00 2001 From: Carlos Granados Date: Sun, 6 Sep 2026 12:46:57 +0200 Subject: [PATCH 3/4] rename the heading to errors, warnings and notices --- docs/user-guide/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/logging.md b/docs/user-guide/logging.md index f14d3c5..990f246 100644 --- a/docs/user-guide/logging.md +++ b/docs/user-guide/logging.md @@ -49,7 +49,7 @@ in the PHP error log for it. ::: -### Warnings and notices +### Errors, warnings and notices Separately from that output, your editor can ask to be told about every diagnostic PHP raises — warnings, notices, deprecations and errors — as they occur. Each one From d855fd97242e0864312eeffd9883f09243e9f4bd Mon Sep 17 00:00:00 2001 From: Carlos Granados Date: Sun, 6 Sep 2026 12:52:34 +0200 Subject: [PATCH 4/4] match the sentence order to the heading --- docs/user-guide/logging.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/user-guide/logging.md b/docs/user-guide/logging.md index 990f246..b35db60 100644 --- a/docs/user-guide/logging.md +++ b/docs/user-guide/logging.md @@ -52,7 +52,7 @@ in the PHP error log for it. ### Errors, warnings and notices Separately from that output, your editor can ask to be told about every diagnostic -PHP raises — warnings, notices, deprecations and errors — as they occur. Each one +PHP raises — errors, warnings, notices and deprecations — as they occur. Each one arrives with its message, its file and its line, and the script keeps running. This is the middle ground between the two extremes. Ignoring a warning means