[Notifier][Bridge] Remove hidden dependency on HttpFoundation

This commit is contained in:
Nyholm 2021-04-11 10:41:01 +02:00
parent 0f96ac7484
commit d37f158a88
No known key found for this signature in database
GPG Key ID: D6332DE2B6F8FA38
2 changed files with 2 additions and 4 deletions

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Notifier\Bridge\Gitter;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\ChatMessage;
@ -69,7 +68,7 @@ final class GitterTransport extends AbstractTransport
$result = $response->toArray(false);
if (Response::HTTP_OK !== $response->getStatusCode()) {
if (200 !== $response->getStatusCode()) {
throw new TransportException(sprintf('Unable to post the Gitter message: "%s".', $result['error']), $response);
}

View File

@ -11,7 +11,6 @@
namespace Symfony\Component\Notifier\Bridge\LightSms;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Notifier\Exception\TransportException;
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
use Symfony\Component\Notifier\Message\MessageInterface;
@ -118,7 +117,7 @@ final class LightSmsTransport extends AbstractTransport
]
);
if (Response::HTTP_OK !== $response->getStatusCode()) {
if (200 !== $response->getStatusCode()) {
throw new TransportException('Unable to send the SMS.', $response);
}