Skip to content

Commit c8b0fcc

Browse files
committed
deprecate the TransportFactoryTestCase
1 parent 4511394 commit c8b0fcc

File tree

160 files changed

+823
-339
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

160 files changed

+823
-339
lines changed

UPGRADE-7.2.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ Messenger
5252

5353
* Add `getRetryDelay()` method to `RecoverableExceptionInterface`
5454

55+
Notifier
56+
--------
57+
58+
* Deprecate `TransportFactoryTestCase`, extend `AbstractTransportFactoryTestCase` instead
59+
60+
The `testIncompleteDsnException()` and `testMissingRequiredOptionException()` tests are no longer provided by default. If you make use of them (i.e. by implementing the
61+
`incompleteDsnProvider()` or `missingRequiredOptionProvider()` data providers), you now need to use the `IncompleteDsnTestTrait` or `MissingRequiredOptionTestTrait` respectively.
62+
5563
Security
5664
--------
5765

src/Symfony/Component/Notifier/Bridge/AllMySms/Tests/AllMySmsTransportFactoryTest.php

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
namespace Symfony\Component\Notifier\Bridge\AllMySms\Tests;
1313

1414
use Symfony\Component\Notifier\Bridge\AllMySms\AllMySmsTransportFactory;
15-
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
15+
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
16+
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
1617

17-
final class AllMySmsTransportFactoryTest extends TransportFactoryTestCase
18+
final class AllMySmsTransportFactoryTest extends AbstractTransportFactoryTestCase
1819
{
20+
use IncompleteDsnTestTrait;
21+
1922
public function createFactory(): AllMySmsTransportFactory
2023
{
2124
return new AllMySmsTransportFactory();
@@ -44,4 +47,10 @@ public static function unsupportedSchemeProvider(): iterable
4447
{
4548
yield ['somethingElse://login:apiKey@default'];
4649
}
50+
51+
public static function incompleteDsnProvider(): iterable
52+
{
53+
yield ['allmysms://login@default'];
54+
yield ['allmysms://:apiKey@default'];
55+
}
4756
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=8.2",
2020
"symfony/http-client": "^6.4|^7.0",
21-
"symfony/notifier": "^6.4|^7.0"
21+
"symfony/notifier": "^7.2"
2222
},
2323
"autoload": {
2424
"psr-4": { "Symfony\\Component\\Notifier\\Bridge\\AllMySms\\": "" },

src/Symfony/Component/Notifier/Bridge/AmazonSns/Tests/AmazonSnsTransportFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
namespace Symfony\Component\Notifier\Bridge\AmazonSns\Tests;
1313

1414
use Symfony\Component\Notifier\Bridge\AmazonSns\AmazonSnsTransportFactory;
15-
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
15+
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
1616

17-
class AmazonSnsTransportFactoryTest extends TransportFactoryTestCase
17+
class AmazonSnsTransportFactoryTest extends AbstractTransportFactoryTestCase
1818
{
1919
public function createFactory(): AmazonSnsTransportFactory
2020
{

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=8.2",
2020
"symfony/http-client": "^6.4|^7.0",
21-
"symfony/notifier": "^6.4|^7.0",
21+
"symfony/notifier": "^7.2",
2222
"async-aws/sns": "^1.0"
2323
},
2424
"autoload": {

src/Symfony/Component/Notifier/Bridge/Bandwidth/Tests/BandwidthTransportFactoryTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
namespace Symfony\Component\Notifier\Bridge\Bandwidth\Tests;
1313

1414
use Symfony\Component\Notifier\Bridge\Bandwidth\BandwidthTransportFactory;
15-
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
15+
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
16+
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
17+
use Symfony\Component\Notifier\Test\MissingRequiredOptionTestTrait;
1618

17-
final class BandwidthTransportFactoryTest extends TransportFactoryTestCase
19+
final class BandwidthTransportFactoryTest extends AbstractTransportFactoryTestCase
1820
{
21+
use IncompleteDsnTestTrait;
22+
use MissingRequiredOptionTestTrait;
23+
1924
public function createFactory(): BandwidthTransportFactory
2025
{
2126
return new BandwidthTransportFactory();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"require": {
2222
"php": ">=8.2",
2323
"symfony/http-client": "^6.4|^7.0",
24-
"symfony/notifier": "^6.4|^7.0"
24+
"symfony/notifier": "^7.2"
2525
},
2626
"require-dev": {
2727
"symfony/event-dispatcher": "^6.4|^7.0"

src/Symfony/Component/Notifier/Bridge/Bluesky/Tests/BlueskyTransportFactoryTest.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,13 @@
1212
namespace Symfony\Component\Notifier\Bridge\Bluesky\Tests;
1313

1414
use Symfony\Component\Notifier\Bridge\Bluesky\BlueskyTransportFactory;
15-
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
15+
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
16+
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
1617

17-
class BlueskyTransportFactoryTest extends TransportFactoryTestCase
18+
class BlueskyTransportFactoryTest extends AbstractTransportFactoryTestCase
1819
{
20+
use IncompleteDsnTestTrait;
21+
1922
public function createFactory(): BlueskyTransportFactory
2023
{
2124
return new BlueskyTransportFactory();

src/Symfony/Component/Notifier/Bridge/Brevo/Tests/BrevoTransportFactoryTest.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
namespace Symfony\Component\Notifier\Bridge\Brevo\Tests;
1313

1414
use Symfony\Component\Notifier\Bridge\Brevo\BrevoTransportFactory;
15-
use Symfony\Component\Notifier\Test\TransportFactoryTestCase;
15+
use Symfony\Component\Notifier\Test\AbstractTransportFactoryTestCase;
16+
use Symfony\Component\Notifier\Test\IncompleteDsnTestTrait;
17+
use Symfony\Component\Notifier\Test\MissingRequiredOptionTestTrait;
1618

17-
final class BrevoTransportFactoryTest extends TransportFactoryTestCase
19+
final class BrevoTransportFactoryTest extends AbstractTransportFactoryTestCase
1820
{
21+
use IncompleteDsnTestTrait;
22+
use MissingRequiredOptionTestTrait;
23+
1924
public function createFactory(): BrevoTransportFactory
2025
{
2126
return new BrevoTransportFactory();

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"require": {
1919
"php": ">=8.2",
2020
"symfony/http-client": "^6.4|^7.0",
21-
"symfony/notifier": "^6.4|^7.0"
21+
"symfony/notifier": "^7.2"
2222
},
2323
"require-dev": {
2424
"symfony/event-dispatcher": "^5.4|^6.0|^7.0"

0 commit comments

Comments
 (0)