Skip to content

Conversation

@tangrufus
Copy link
Member

No description provided.

Copilot AI review requested due to automatic review settings October 26, 2025 20:08
@tangrufus tangrufus added the enhancement New feature or request label Oct 26, 2025
Copy link

Copilot AI left a 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 ExceptionInterface marker 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;
Copy link

Copilot AI Oct 26, 2025

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.

Suggested change
use TypistTech\WordfenceApi\Feed;
use TypistTech\WordfenceApi\Feed;
use TypistTech\WordfenceApi\Exceptions\ExceptionInterface;

Copilot uses AI. Check for mistakes.

use GuzzleHttp\Exception\TransferException;
use RuntimeException;
use TypistTech\WordfenceApi\Feed;
Copy link

Copilot AI Oct 26, 2025

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.

Suggested change
use TypistTech\WordfenceApi\Feed;
use TypistTech\WordfenceApi\Feed;
use TypistTech\WordfenceApi\Exceptions\ExceptionInterface;

Copilot uses AI. Check for mistakes.
declare(strict_types=1);

namespace TypistTech\WordfenceApi\Exceptions;

Copy link

Copilot AI Oct 26, 2025

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.

Suggested change
/**
* Marker interface for all exceptions thrown by this package.
*
* Allows consumers to catch all package-specific exceptions with a single type.
*/

Copilot uses AI. Check for mistakes.
@tangrufus tangrufus merged commit 562e2bd into main Oct 26, 2025
17 checks passed
@tangrufus tangrufus deleted the ex-interface branch October 26, 2025 20:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Development

Successfully merging this pull request may close these issues.

2 participants