Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1e42411

Browse files
minor #40766 [Notifier] [Bridge] Remove hidden dependency on HttpFoundation (Nyholm)
This PR was merged into the 5.3-dev branch. Discussion ---------- [Notifier] [Bridge] Remove hidden dependency on HttpFoundation | Q | A | ------------- | --- | Branch? | 5.x | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | We dont need HttpFoundation to give us this constant. HttpFoundation is also missing from composer.json Commits ------- d37f158 [Notifier][Bridge] Remove hidden dependency on HttpFoundation
2 parents 0f96ac7 + d37f158 commit 1e42411

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/Symfony/Component/Notifier/Bridge/Gitter/GitterTransport.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Notifier\Bridge\Gitter;
1313

14-
use Symfony\Component\HttpFoundation\Response;
1514
use Symfony\Component\Notifier\Exception\TransportException;
1615
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
1716
use Symfony\Component\Notifier\Message\ChatMessage;
@@ -69,7 +68,7 @@ protected function doSend(MessageInterface $message): SentMessage
6968

7069
$result = $response->toArray(false);
7170

72-
if (Response::HTTP_OK !== $response->getStatusCode()) {
71+
if (200 !== $response->getStatusCode()) {
7372
throw new TransportException(sprintf('Unable to post the Gitter message: "%s".', $result['error']), $response);
7473
}
7574

src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
namespace Symfony\Component\Notifier\Bridge\LightSms;
1313

14-
use Symfony\Component\HttpFoundation\Response;
1514
use Symfony\Component\Notifier\Exception\TransportException;
1615
use Symfony\Component\Notifier\Exception\UnsupportedMessageTypeException;
1716
use Symfony\Component\Notifier\Message\MessageInterface;
@@ -118,7 +117,7 @@ protected function doSend(MessageInterface $message): SentMessage
118117
]
119118
);
120119

121-
if (Response::HTTP_OK !== $response->getStatusCode()) {
120+
if (200 !== $response->getStatusCode()) {
122121
throw new TransportException('Unable to send the SMS.', $response);
123122
}
124123

0 commit comments

Comments
 (0)