[Notifier][Bridge] Remove hidden dependency on HttpFoundation
This commit is contained in:
parent
0f96ac7484
commit
d37f158a88
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user