[Notifier] Change return type

This commit is contained in:
Oskar Stark 2020-12-18 09:57:00 +01:00
parent b3de641fd4
commit d4f001afec
5 changed files with 9 additions and 3 deletions

View File

@ -23,6 +23,11 @@ HttpKernel
* Marked the class `Symfony\Component\HttpKernel\EventListener\DebugHandlersListener` as internal * 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 PhpunitBridge
------------- -------------

View File

@ -85,7 +85,7 @@ final class InfobipTransport extends AbstractTransport
return new SentMessage($message, (string) $this); return new SentMessage($message, (string) $this);
} }
protected function getEndpoint(): ?string protected function getEndpoint(): string
{ {
return $this->host.($this->port ? ':'.$this->port : ''); return $this->host.($this->port ? ':'.$this->port : '');
} }

View File

@ -85,7 +85,7 @@ final class MattermostTransport extends AbstractTransport
return $sentMessage; return $sentMessage;
} }
protected function getEndpoint(): ?string protected function getEndpoint(): string
{ {
return rtrim($this->host.($this->port ? ':'.$this->port : '').($this->path ?? ''), '/'); return rtrim($this->host.($this->port ? ':'.$this->port : '').($this->path ?? ''), '/');
} }

View File

@ -5,6 +5,7 @@ CHANGELOG
----- -----
* The component is not marked as `@experimental` anymore * The component is not marked as `@experimental` anymore
* [BC BREAK] Changed the return type of `AbstractTransportFactory::getEndpoint()` from `?string` to `string`
5.2.0 5.2.0
----- -----

View File

@ -79,7 +79,7 @@ abstract class AbstractTransport implements TransportInterface
abstract protected function doSend(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 : ''); return ($this->host ?: $this->getDefaultHost()).($this->port ? ':'.$this->port : '');
} }