Refactor error pages, minus the merge conflicts - #4931
Open
afilina wants to merge 34 commits into
Open
Conversation
This renames traditional errors to diagnostic errors Create a page about error handling in PHP describing how to handle Throwable Errors (Exceptions) and diagnostics. > Inspired from the Rust docs. Create dedicated pages for: - throw - try-catch - finally
Usage without it is explained in the following section
Also fix part of the set_error_handler() docs
Co-authored-by: George Peter Banyard <girgias@php.net>
Since there are years of changes to files that were deleted in the initial PR, this one "accepts theirs" for any conflicts. Once the bulk is merged, we'll do a more granular pass on the conflicts, especially when it comes to replicating any info that was added over the years that needs to exist somewhere before we mass-delete pages. # Conflicts: # appendices/reserved.xml # language/errors.xml # language/errors/basics.xml # language/errors/php7.xml # language/exceptions.xml # language/operators.xml # language/types/declarations.xml # reference/errorfunc/functions/set-exception-handler.xml
Contributor
Author
|
@kamil-tekiela That was the original intent, but because new pages point to each other, that would have required a longer-term commitment to see them through in the right order. So I opted for whatever would at least not cause merge conflicts, reducing number of PRs needed by 3. |
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
lacatoire
reviewed
Feb 17, 2026
lacatoire
reviewed
Feb 17, 2026
lacatoire
reviewed
Feb 17, 2026
- error-handling.xml: clarify Throwable unwind terminates unless caught,
fix incomplete sentence in throw paragraph, rewrite set_exception_handler
description, remove filibuster sentence in Extending Exceptions,
qualify diagnostic errors flow statement, fix <parameter> -> <option>
for error_reporting ini directive
- try-catch.xml: remove out-of-place set_exception_handler note,
change "subclasses" to "types" in catch definition, fix "withing" typo,
remove repetitive optional variable paragraph
- finally.xml: fix wrong expected output ("Return from finally" -> "finally"),
remove contradictory "and as of PHP 8.0.0" from second version range
… in control-structures files
…d lines in PR diff)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an attempt to push a stalled PR through. #320
Since there are years of changes to files that were deleted in the initial PR, this one "accepts theirs" for any conflicts. Once the bulk is merged, we'll do a more granular pass on the conflicts, especially when it comes to replicating any info that was added over the years that needs to exist somewhere before we mass-delete pages.
I'd keep the other PR until we're done incorporating the changes. This approach also keeps credit where it's due for commits.