-
-
Notifications
You must be signed in to change notification settings - Fork 0
Introduce ExceptionInterface
#32
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a common ExceptionInterface for the package's exception hierarchy, allowing consumers to catch all package-specific exceptions with a single interface.
Key Changes:
- Created a new
ExceptionInterfacemarker interface - Updated existing exception classes to implement the new interface
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/Exceptions/ExceptionInterface.php | Introduces the new marker interface for all package exceptions |
| src/Exceptions/InvalidJsonException.php | Implements ExceptionInterface |
| src/Exceptions/HttpException.php | Implements ExceptionInterface |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| namespace TypistTech\WordfenceApi\Exceptions; | ||
|
|
||
| use RuntimeException; | ||
| use TypistTech\WordfenceApi\Feed; |
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing import statement for ExceptionInterface. Add use TypistTech\WordfenceApi\Exceptions\ExceptionInterface; at the top of the file with other use statements.
| use TypistTech\WordfenceApi\Feed; | |
| use TypistTech\WordfenceApi\Feed; | |
| use TypistTech\WordfenceApi\Exceptions\ExceptionInterface; |
|
|
||
| use GuzzleHttp\Exception\TransferException; | ||
| use RuntimeException; | ||
| use TypistTech\WordfenceApi\Feed; |
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing import statement for ExceptionInterface. Add use TypistTech\WordfenceApi\Exceptions\ExceptionInterface; at the top of the file with other use statements.
| use TypistTech\WordfenceApi\Feed; | |
| use TypistTech\WordfenceApi\Feed; | |
| use TypistTech\WordfenceApi\Exceptions\ExceptionInterface; |
| declare(strict_types=1); | ||
|
|
||
| namespace TypistTech\WordfenceApi\Exceptions; | ||
|
|
Copilot
AI
Oct 26, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The interface lacks documentation explaining its purpose. Add a docblock describing that this is a marker interface for all package exceptions, which allows consumers to catch all package-specific exceptions with a single type.
| /** | |
| * Marker interface for all exceptions thrown by this package. | |
| * | |
| * Allows consumers to catch all package-specific exceptions with a single type. | |
| */ |
No description provided.