Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply fixes from StyleCI
  • Loading branch information
StyleCIBot committed Aug 9, 2025
commit ff4a1a0827fa64c135e1ece18bf6fb3a60aa9bc3
12 changes: 6 additions & 6 deletions src/Solution/SolutionProviderInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
*/
interface SolutionProviderInterface
Comment thread
xepozz marked this conversation as resolved.
Comment thread
vjik marked this conversation as resolved.
Comment thread
xepozz marked this conversation as resolved.
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.

SolutionProviderInterface must be placed into separate package. yiisoft/error-handler is too heavy dependency for packages, that implement SolutionProviderInterface.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's not about any solution in the air. It's about the specific contract between web, user, application and error.
It shouldn't be separated. At least for now.

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.

Interface should define format of solution. Users of interface should know about format of solution.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

HTML for sure

{
/**
* Returns true if the implementation may suggest more than regular provider.
*/
/**
* Returns true if the implementation may suggest more than regular provider.
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.

Suggested change
* Returns true if the implementation may suggest more than regular provider.
* Returns true if solution could be provided for a given throwable.

*/
public function supports(\Throwable $e): bool;
Comment thread
xepozz marked this conversation as resolved.

/**
* Generates an HTML code with solution which will be clean by {@see \Yiisoft\ErrorHandler\Renderer\HtmlRenderer} and shown to the end user.
*/
/**
* Generates an HTML code with solution which will be clean by {@see \Yiisoft\ErrorHandler\Renderer\HtmlRenderer} and shown to the end user.
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.

What do you mean by "clean by"?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

HtmlRenderer has HTML purifier inside, it cleans all the given html tags and attributes except that are in configuration

*/
public function generate(\Throwable $e): string;
Comment thread
xepozz marked this conversation as resolved.
}
Loading