Skip to content

[Notifier] [BC BREAK] Fix return type #39549

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

Merged
merged 1 commit into from
Dec 26, 2020
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
5 changes: 5 additions & 0 deletions UPGRADE-5.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ HttpKernel

* Marked the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal

Notifier
-------

* Changed the return type of `Symfony\Component\Notifier\Transport\AbstractTransportFactory::getEndpoint()` from `?string` to `string`

PhpunitBridge
-------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function doSend(MessageInterface $message): SentMessage
return new SentMessage($message, (string) $this);
}

protected function getEndpoint(): ?string
protected function getEndpoint(): string
{
return $this->host.($this->port ? ':'.$this->port : '');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ protected function doSend(MessageInterface $message): SentMessage
return $sentMessage;
}

protected function getEndpoint(): ?string
protected function getEndpoint(): string
{
return rtrim($this->host.($this->port ? ':'.$this->port : '').($this->path ?? ''), '/');
}
Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Notifier/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
-----

* The component is not marked as `@experimental` anymore
* [BC BREAK] Changed the return type of `AbstractTransportFactory::getEndpoint()` from `?string` to `string`

5.2.0
-----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public function send(MessageInterface $message): SentMessage

abstract protected function doSend(MessageInterface $message): SentMessage;

protected function getEndpoint(): ?string
protected function getEndpoint(): string
{
return ($this->host ?: $this->getDefaultHost()).($this->port ? ':'.$this->port : '');
}
Expand Down