Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions src/notification-mail/src/Message/MailMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
use FriendsOfHyperf\Mail\Contract\Attachable;
use FriendsOfHyperf\Mail\Contract\Mailer;
use FriendsOfHyperf\Mail\Markdown;
use FriendsOfHyperf\Support\Contract\Htmlable;
use Hyperf\Conditionable\Conditionable;
use Hyperf\Context\ApplicationContext;
use Hyperf\Contract\Arrayable;
use Hyperf\Contract\Htmlable;
use Hyperf\ViewEngine\Contract\Renderable;

use function Hyperf\Collection\collect;
Expand Down Expand Up @@ -294,7 +294,7 @@ public function data(): array
/**
* Render the mail notification message into an HTML string.
*/
public function render(): Htmlable|\Hyperf\ViewEngine\Contract\Htmlable
public function render(): Htmlable
{
$container = ApplicationContext::getContainer();
if (isset($this->view)) {
Expand Down
6 changes: 3 additions & 3 deletions src/notification-mail/src/Message/SimpleMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace FriendsOfHyperf\Notification\Mail\Message;

use FriendsOfHyperf\Notification\Mail\Action;
use FriendsOfHyperf\Support\Contract\Htmlable;
use Hyperf\Contract\Htmlable;

class SimpleMessage
{
Expand Down Expand Up @@ -223,9 +223,9 @@ public function toArray(): array
/**
* Format the given line of text.
*/
protected function formatLine(Htmlable|\Hyperf\ViewEngine\Contract\Htmlable|array|string $line): \Hyperf\ViewEngine\Contract\Htmlable|Htmlable|string
protected function formatLine(Htmlable|array|string $line): Htmlable|string
{
if ($line instanceof Htmlable || $line instanceof \Hyperf\ViewEngine\Contract\Htmlable) {
if ($line instanceof Htmlable) {
return $line;
}

Expand Down
12 changes: 8 additions & 4 deletions src/support/src/Contract/Htmlable.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@

namespace FriendsOfHyperf\Support\Contract;

interface Htmlable
{
class_alias(\Hyperf\Contract\Htmlable::class, Htmlable::class);

if (! interface_exists(Htmlable::class)) {
/**
* Get content as a string of HTML.
* Interface Htmlable.
* @deprecated since v3.2, will be removed in next major version, use `\Hyperf\Contract\Htmlable` instead
*/
public function toHtml(): string;
interface Htmlable extends \Hyperf\Contract\Htmlable
{
}
}
5 changes: 2 additions & 3 deletions src/support/src/HtmlString.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,9 @@

namespace FriendsOfHyperf\Support;

use FriendsOfHyperf\Support\Contract\Htmlable;
use Stringable;
use Hyperf\Contract\Htmlable;

class HtmlString implements Htmlable, Stringable
class HtmlString implements Htmlable
{
/**
* Create a new HTML string instance.
Expand Down
2 changes: 1 addition & 1 deletion types/Support/Support.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public function setMaxAttempts(int $maxAttempts): static
return $this;
}

public function getQueueName(): string
public function getPoolName(): string
{
return uniqid();
}
Expand Down