Skip to content

Commit 16a4681

Browse files
committed
minor #51376 [Notifier] rename GoIP notifier bridge to GoIp (xabbuh)
This PR was merged into the 6.4 branch. Discussion ---------- [Notifier] rename GoIP notifier bridge to GoIp | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Let's be consistent in naming our bridges. Commits ------- c2feb5e rename GoIP notifier bridge to GopIp
2 parents 6141656 + c2feb5e commit 16a4681

File tree

11 files changed

+29
-29
lines changed

11 files changed

+29
-29
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2799,7 +2799,7 @@ private function registerNotifierConfiguration(array $config, ContainerBuilder $
27992799
NotifierBridge\FreeMobile\FreeMobileTransportFactory::class => 'notifier.transport_factory.free-mobile',
28002800
NotifierBridge\GatewayApi\GatewayApiTransportFactory::class => 'notifier.transport_factory.gateway-api',
28012801
NotifierBridge\Gitter\GitterTransportFactory::class => 'notifier.transport_factory.gitter',
2802-
NotifierBridge\GoIP\GoIPTransportFactory::class => 'notifier.transport_factory.goip',
2802+
NotifierBridge\GoIp\GoIpTransportFactory::class => 'notifier.transport_factory.goip',
28032803
NotifierBridge\GoogleChat\GoogleChatTransportFactory::class => 'notifier.transport_factory.google-chat',
28042804
NotifierBridge\Infobip\InfobipTransportFactory::class => 'notifier.transport_factory.infobip',
28052805
NotifierBridge\Iqsms\IqsmsTransportFactory::class => 'notifier.transport_factory.iqsms',

src/Symfony/Bundle/FrameworkBundle/Resources/config/notifier_transports.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
->set('notifier.transport_factory.redlink', Bridge\Redlink\RedlinkTransportFactory::class)
304304
->parent('notifier.transport_factory.abstract')
305305
->tag('texter.transport_factory')
306-
->set('notifier.transport_factory.goip', Bridge\GoIP\GoIPTransportFactory::class)
306+
->set('notifier.transport_factory.goip', Bridge\GoIp\GoIpTransportFactory::class)
307307
->parent('notifier.transport_factory.abstract')
308308
->tag('texter.transport_factory')
309309
;

src/Symfony/Component/Notifier/Bridge/GoIP/GoIPOptions.php renamed to src/Symfony/Component/Notifier/Bridge/GoIP/GoIpOptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Notifier\Bridge\GoIP;
12+
namespace Symfony\Component\Notifier\Bridge\GoIp;
1313

1414
use Symfony\Component\Notifier\Message\MessageOptionsInterface;
1515

1616
/**
1717
* @author Ahmed Ghanem <ahmedghanem7361@gmail.com>
1818
*/
19-
final class GoIPOptions implements MessageOptionsInterface
19+
final class GoIpOptions implements MessageOptionsInterface
2020
{
2121
private array $options = [];
2222

src/Symfony/Component/Notifier/Bridge/GoIP/GoIPTransport.php renamed to src/Symfony/Component/Notifier/Bridge/GoIP/GoIpTransport.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Notifier\Bridge\GoIP;
12+
namespace Symfony\Component\Notifier\Bridge\GoIp;
1313

1414
use Symfony\Component\Notifier\Exception\LogicException;
1515
use Symfony\Component\Notifier\Exception\TransportException;
@@ -28,7 +28,7 @@
2828
/**
2929
* @author Ahmed Ghanem <ahmedghanem7361@gmail.com>
3030
*/
31-
final class GoIPTransport extends AbstractTransport
31+
final class GoIpTransport extends AbstractTransport
3232
{
3333
public function __construct(
3434
private readonly string $username,
@@ -48,7 +48,7 @@ public function __toString(): string
4848

4949
public function supports(MessageInterface $message): bool
5050
{
51-
return $message instanceof SmsMessage && (null === $message->getOptions() || $message->getOptions() instanceof GoIPOptions);
51+
return $message instanceof SmsMessage && (null === $message->getOptions() || $message->getOptions() instanceof GoIpOptions);
5252
}
5353

5454
/**
@@ -63,8 +63,8 @@ protected function doSend(MessageInterface $message): SentMessage
6363
throw new UnsupportedMessageTypeException(__CLASS__, SmsMessage::class, $message);
6464
}
6565

66-
if (($options = $message->getOptions()) && !$options instanceof GoIPOptions) {
67-
throw new LogicException(sprintf('The "%s" transport only supports an instance of the "%s" as an option class.', __CLASS__, GoIPOptions::class));
66+
if (($options = $message->getOptions()) && !$options instanceof GoIpOptions) {
67+
throw new LogicException(sprintf('The "%s" transport only supports an instance of the "%s" as an option class.', __CLASS__, GoIpOptions::class));
6868
}
6969

7070
if ('' !== $message->getFrom()) {

src/Symfony/Component/Notifier/Bridge/GoIP/GoIPTransportFactory.php renamed to src/Symfony/Component/Notifier/Bridge/GoIP/GoIpTransportFactory.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Notifier\Bridge\GoIP;
12+
namespace Symfony\Component\Notifier\Bridge\GoIp;
1313

1414
use Symfony\Component\Notifier\Exception\InvalidArgumentException;
1515
use Symfony\Component\Notifier\Exception\UnsupportedSchemeException;
@@ -19,11 +19,11 @@
1919
/**
2020
* @author Ahmed Ghanem <ahmedghanem7361@gmail.com>
2121
*/
22-
final class GoIPTransportFactory extends AbstractTransportFactory
22+
final class GoIpTransportFactory extends AbstractTransportFactory
2323
{
2424
private const SCHEME_NAME = 'goip';
2525

26-
public function create(Dsn $dsn): GoIPTransport
26+
public function create(Dsn $dsn): GoIpTransport
2727
{
2828
if (self::SCHEME_NAME !== $dsn->getScheme()) {
2929
throw new UnsupportedSchemeException($dsn, self::SCHEME_NAME, $this->getSupportedSchemes());
@@ -36,7 +36,7 @@ public function create(Dsn $dsn): GoIPTransport
3636
throw new InvalidArgumentException(sprintf('The provided SIM-Slot: "%s" is not valid.', $simSlot));
3737
}
3838

39-
return (new GoIPTransport($username, $password, $simSlot, $this->client, $this->dispatcher))
39+
return (new GoIpTransport($username, $password, $simSlot, $this->client, $this->dispatcher))
4040
->setHost($dsn->getHost())
4141
->setPort($dsn->getPort());
4242
}

src/Symfony/Component/Notifier/Bridge/GoIP/Tests/GoIPTransportFactoryTest.php renamed to src/Symfony/Component/Notifier/Bridge/GoIP/Tests/GoIpTransportFactoryTest.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Notifier\Bridge\GoIP\Tests;
12+
namespace Symfony\Component\Notifier\Bridge\GoIp\Tests;
1313

14-
use Symfony\Component\Notifier\Bridge\GoIP\GoIPTransportFactory;
14+
use Symfony\Component\Notifier\Bridge\GoIp\GoIpTransportFactory;
1515
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
1616

1717
/**
1818
* @author Ahmed Ghanem <ahmedghanem7361@gmail.com>
1919
*/
20-
final class GoIPTransportFactoryTest extends TransportFactoryTestCase
20+
final class GoIpTransportFactoryTest extends TransportFactoryTestCase
2121
{
2222
public static function createProvider(): iterable
2323
{
@@ -48,8 +48,8 @@ public static function missingRequiredOptionProvider(): iterable
4848
yield 'missing required option: sim_slot' => ['goip://user:pass@host.test'];
4949
}
5050

51-
public function createFactory(): GoIPTransportFactory
51+
public function createFactory(): GoIpTransportFactory
5252
{
53-
return new GoIPTransportFactory();
53+
return new GoIpTransportFactory();
5454
}
5555
}

src/Symfony/Component/Notifier/Bridge/GoIP/Tests/GoIPTransportTest.php renamed to src/Symfony/Component/Notifier/Bridge/GoIP/Tests/GoIpTransportTest.php

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99
* file that was distributed with this source code.
1010
*/
1111

12-
namespace Symfony\Component\Notifier\Bridge\GoIP\Tests;
12+
namespace Symfony\Component\Notifier\Bridge\GoIp\Tests;
1313

1414
use Symfony\Component\HttpClient\MockHttpClient;
1515
use Symfony\Component\HttpClient\Response\MockResponse;
16-
use Symfony\Component\Notifier\Bridge\GoIP\GoIPOptions;
17-
use Symfony\Component\Notifier\Bridge\GoIP\GoIPTransport;
16+
use Symfony\Component\Notifier\Bridge\GoIp\GoIpOptions;
17+
use Symfony\Component\Notifier\Bridge\GoIp\GoIpTransport;
1818
use Symfony\Component\Notifier\Exception\TransportException;
1919
use Symfony\Component\Notifier\Exception\TransportExceptionInterface;
2020
use Symfony\Component\Notifier\Message\ChatMessage;
@@ -26,24 +26,24 @@
2626
/**
2727
* @author Ahmed Ghanem <ahmedghanem7361@gmail.com>
2828
*/
29-
final class GoIPTransportTest extends TransportTestCase
29+
final class GoIpTransportTest extends TransportTestCase
3030
{
3131
public static function toStringProvider(): iterable
3232
{
3333
yield ['goip://host.test:4000?sim_slot=4', self::createTransport()];
3434
}
3535

36-
public static function createTransport(HttpClientInterface $client = null): GoIPTransport
36+
public static function createTransport(HttpClientInterface $client = null): GoIpTransport
3737
{
38-
return (new GoIPTransport('user', 'pass', 4, $client ?? new MockHttpClient()))
38+
return (new GoIpTransport('user', 'pass', 4, $client ?? new MockHttpClient()))
3939
->setHost('host.test')
4040
->setPort(4000);
4141
}
4242

4343
public static function supportedMessagesProvider(): iterable
4444
{
4545
$message = new SmsMessage('0611223344', 'Hello!');
46-
$message->options((new GoIPOptions())->setSimSlot(3));
46+
$message->options((new GoIpOptions())->setSimSlot(3));
4747

4848
yield [$message];
4949
}

src/Symfony/Component/Notifier/Bridge/GoIP/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"autoload": {
2424
"psr-4": {
25-
"Symfony\\Component\\Notifier\\Bridge\\GoIP\\": ""
25+
"Symfony\\Component\\Notifier\\Bridge\\GoIp\\": ""
2626
},
2727

2828
"exclude-from-classmap": [

src/Symfony/Component/Notifier/Exception/UnsupportedSchemeException.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ class UnsupportedSchemeException extends LogicException
9393
'package' => 'symfony/gitter-notifier',
9494
],
9595
'goip' => [
96-
'class' => Bridge\GoIP\GoIPTransportFactory::class,
96+
'class' => Bridge\GoIp\GoIpTransportFactory::class,
9797
'package' => 'symfony/goip-notifier',
9898
],
9999
'googlechat' => [

src/Symfony/Component/Notifier/Tests/Exception/UnsupportedSchemeExceptionTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static function setUpBeforeClass(): void
4545
Bridge\FreeMobile\FreeMobileTransportFactory::class => false,
4646
Bridge\GatewayApi\GatewayApiTransportFactory::class => false,
4747
Bridge\Gitter\GitterTransportFactory::class => false,
48-
Bridge\GoIP\GoIPTransportFactory::class => false,
48+
Bridge\GoIp\GoIpTransportFactory::class => false,
4949
Bridge\GoogleChat\GoogleChatTransportFactory::class => false,
5050
Bridge\Infobip\InfobipTransportFactory::class => false,
5151
Bridge\Iqsms\IqsmsTransportFactory::class => false,

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy