Skip to content

Refactor error pages, minus the merge conflicts - #4931

Open
afilina wants to merge 34 commits into
php:masterfrom
afilina:refactor-error-page-new-files-only
Open

Refactor error pages, minus the merge conflicts#4931
afilina wants to merge 34 commits into
php:masterfrom
afilina:refactor-error-page-new-files-only

Conversation

@afilina

@afilina afilina commented Oct 15, 2025

Copy link
Copy Markdown
Contributor

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.

Girgias and others added 15 commits February 18, 2021 16:34
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

@kamil-tekiela kamil-tekiela left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @Girgias

@afilina I thought you were going to split this PR into smaller chunks. I think with just this PR some things will be duplicated in the manual.

Comment thread language/error-handling.xml Outdated
Comment thread language/error-handling.xml Outdated
Comment thread language/error-handling.xml
Comment thread language/error-handling.xml Outdated
Comment thread language/error-handling.xml Outdated
Comment thread language/control-structures/try-catch.xml Outdated
Comment thread language/control-structures/finally.xml Outdated
Comment thread language/control-structures/finally.xml Outdated
Comment thread language/control-structures/finally.xml Outdated
Comment thread language/control-structures/finally.xml Outdated
@afilina

afilina commented Oct 16, 2025

Copy link
Copy Markdown
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.

afilina and others added 9 commits October 16, 2025 19:49
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>
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>
Comment thread language/control-structures/try-catch.xml Outdated
Comment thread language/control-structures/finally.xml Outdated
Comment thread language/control-structures/finally.xml Outdated
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants