Skip to content

Commit 44ec77a

Browse files
OskarStarknicolas-grekas
authored andcommitted
[BC Break] Make data providers for abstract test cases static
1 parent d4861a4 commit 44ec77a

File tree

5 files changed

+19
-11
lines changed

5 files changed

+19
-11
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
CHANGELOG
22
=========
33

4+
5.4.21
5+
------
6+
7+
* [BC BREAK] The following data providers for `TransportFactoryTestCase` are now static:
8+
`supportsProvider()`, `createProvider()`, `unsupportedSchemeProvider()`and `incompleteDsnProvider()`
9+
* [BC BREAK] The following data providers for `TransportTestCase` are now static:
10+
`toStringProvider()`, `supportedMessagesProvider()` and `unsupportedMessagesProvider()`
11+
412
5.4
513
---
614

Test/TransportFactoryTestCase.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,16 +37,16 @@ abstract class TransportFactoryTestCase extends TestCase
3737

3838
abstract public function getFactory(): TransportFactoryInterface;
3939

40-
abstract public function supportsProvider(): iterable;
40+
abstract public static function supportsProvider(): iterable;
4141

42-
abstract public function createProvider(): iterable;
42+
abstract public static function createProvider(): iterable;
4343

44-
public function unsupportedSchemeProvider(): iterable
44+
public static function unsupportedSchemeProvider(): iterable
4545
{
4646
return [];
4747
}
4848

49-
public function incompleteDsnProvider(): iterable
49+
public static function incompleteDsnProvider(): iterable
5050
{
5151
return [];
5252
}

Tests/Transport/NullTransportFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public function getFactory(): TransportFactoryInterface
2424
return new NullTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger());
2525
}
2626

27-
public function supportsProvider(): iterable
27+
public static function supportsProvider(): iterable
2828
{
2929
yield [
3030
new Dsn('null', ''),
3131
true,
3232
];
3333
}
3434

35-
public function createProvider(): iterable
35+
public static function createProvider(): iterable
3636
{
3737
yield [
3838
new Dsn('null', 'null'),

Tests/Transport/SendmailTransportFactoryTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public function getFactory(): TransportFactoryInterface
2424
return new SendmailTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger());
2525
}
2626

27-
public function supportsProvider(): iterable
27+
public static function supportsProvider(): iterable
2828
{
2929
yield [
3030
new Dsn('sendmail+smtp', 'default'),
3131
true,
3232
];
3333
}
3434

35-
public function createProvider(): iterable
35+
public static function createProvider(): iterable
3636
{
3737
yield [
3838
new Dsn('sendmail+smtp', 'default'),
@@ -45,7 +45,7 @@ public function createProvider(): iterable
4545
];
4646
}
4747

48-
public function unsupportedSchemeProvider(): iterable
48+
public static function unsupportedSchemeProvider(): iterable
4949
{
5050
yield [
5151
new Dsn('sendmail+http', 'default'),

Tests/Transport/Smtp/EsmtpTransportFactoryTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public function getFactory(): TransportFactoryInterface
2525
return new EsmtpTransportFactory($this->getDispatcher(), $this->getClient(), $this->getLogger());
2626
}
2727

28-
public function supportsProvider(): iterable
28+
public static function supportsProvider(): iterable
2929
{
3030
yield [
3131
new Dsn('smtp', 'example.com'),
@@ -43,7 +43,7 @@ public function supportsProvider(): iterable
4343
];
4444
}
4545

46-
public function createProvider(): iterable
46+
public static function createProvider(): iterable
4747
{
4848
$eventDispatcher = $this->getDispatcher();
4949
$logger = $this->getLogger();

0 commit comments

Comments
 (0)