From f1f83b9e5ccc19dc97e17de2cf0b76ee48ae7352 Mon Sep 17 00:00:00 2001 From: Vasilij Dusko | CREATION Date: Tue, 6 Apr 2021 13:12:05 +0300 Subject: [PATCH] * LightSmsTransport.php - use query string parameters --- .../Notifier/Bridge/LightSms/LightSmsTransport.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php b/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php index 9cb318cf29..205a7f1f7e 100644 --- a/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php +++ b/src/Symfony/Component/Notifier/Bridge/LightSms/LightSmsTransport.php @@ -86,7 +86,7 @@ final class LightSmsTransport extends AbstractTransport public function __toString(): string { - return sprintf('lightsms://%s/external/get/send.php?from=%s', $this->getEndpoint(), $this->from); + return sprintf('lightsms://%s?from=%s', $this->getEndpoint(), $this->from); } public function supports(MessageInterface $message): bool @@ -109,9 +109,15 @@ final class LightSmsTransport extends AbstractTransport 'timestamp' => $timestamp, ]; $data['signature'] = $this->generateSignature($data, $timestamp); - $endpoint = 'https://'.$this->getEndpoint().'/external/get/send.php?'.http_build_query($data); - $response = $this->client->request('GET', $endpoint); + $endpoint = sprintf('https://%s/external/get/send.php', $this->getEndpoint()); + $response = $this->client->request( + 'GET', + $endpoint, + [ + 'query' => $data, + ] + ); if (Response::HTTP_OK !== $response->getStatusCode()) { throw new TransportException('Unable to send the SMS', $response);