Skip to content

4.0 | Generators/Generator: improve error messages #1072

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 6, 2025

Conversation

jrfnl
Copy link
Member

@jrfnl jrfnl commented May 2, 2025

Description

Make errors encountered when processing XML documentation more informative by providing more specific error messages via a dedicated GeneratorException, which extends the PHP native DomainException.

Ref:

Suggested changelog entry

The Generator classes will now throw a PHP_CodeSniffer\Exceptions\GeneratorException when encountering errors in the documentation XML.

Make errors encountered when processing XML documentation more informative by providing more specific error messages via a dedicated `GeneratorException`, which extends the PHP native `DomainException`.

Ref:
* https://www.php.net/class.domainexception
@jrfnl jrfnl added this to the 4.0.0 milestone May 2, 2025
@jrfnl jrfnl requested a review from fredden May 2, 2025 21:00
@jrfnl jrfnl merged commit c1b1f39 into 4.x May 6, 2025
60 checks passed
@jrfnl jrfnl deleted the phpcs-4.0/feature/generators-use-custom-exception branch May 6, 2025 03:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant