Skip to content

Improve documentation of thrown exceptions via Hydrator#191

Merged
DavidBadura merged 2 commits intopatchlevel:1.24.xfrom
gsteel:throws-documentation
May 2, 2026
Merged

Improve documentation of thrown exceptions via Hydrator#191
DavidBadura merged 2 commits intopatchlevel:1.24.xfrom
gsteel:throws-documentation

Conversation

@gsteel
Copy link
Copy Markdown
Contributor

@gsteel gsteel commented May 1, 2026

Includes commit from #190

gsteel added 2 commits May 1, 2026 16:07
This is a technical BC break, but it's extremely unlikely that users will have implemented this interface on a non-throwable.

This fixes code for static analysers such as:

```php
try {
   return $hydrator->extract($object);
} catch(HydratorException $e) {
   throw new MyException('Foo', 0, $e);
}
```
@DavidBadura DavidBadura added this to the 1.24.0 milestone May 2, 2026
@DavidBadura DavidBadura added the enhancement New feature or request label May 2, 2026
Copy link
Copy Markdown
Member

@DavidBadura DavidBadura left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks!

We will merge once we have reached a decision regarding #190

@DavidBadura DavidBadura merged commit c5e1037 into patchlevel:1.24.x May 2, 2026
15 of 16 checks passed
@gsteel gsteel deleted the throws-documentation branch May 2, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants