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
-------
d37f158a88
[Notifier][Bridge] Remove hidden dependency on HttpFoundation
This commit is contained in:
commit
1e4241175f
@ -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