Skip to content

Commit

Permalink
[BC Break] Make data providers for abstract test cases static
Browse files Browse the repository at this point in the history
  • Loading branch information
OskarStark authored and nicolas-grekas committed Feb 17, 2023
1 parent 49f9035 commit 114853f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=========

5.4.21
------

* [BC BREAK] The following data providers for `ProviderFactoryTestCase` are now static:
`supportsProvider()`, `createProvider()`, `unsupportedSchemeProvider()`and `incompleteDsnProvider()`
* [BC BREAK] `ProviderTestCase::toStringProvider()` is now static

5.4
---

Expand Down
10 changes: 5 additions & 5 deletions Test/ProviderFactoryTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@ abstract public function createFactory(): ProviderFactoryInterface;
/**
* @return iterable<array{0: bool, 1: string}>
*/
abstract public function supportsProvider(): iterable;
abstract public static function supportsProvider(): iterable;

/**
* @return iterable<array{0: string, 1: string, 2: TransportInterface}>
* @return iterable<array{0: string, 1: string}>
*/
abstract public function createProvider(): iterable;
abstract public static function createProvider(): iterable;

/**
* @return iterable<array{0: string, 1: string|null}>
*/
public function unsupportedSchemeProvider(): iterable
public static function unsupportedSchemeProvider(): iterable
{
return [];
}

/**
* @return iterable<array{0: string, 1: string|null}>
*/
public function incompleteDsnProvider(): iterable
public static function incompleteDsnProvider(): iterable
{
return [];
}
Expand Down
2 changes: 1 addition & 1 deletion Test/ProviderTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ abstract public function createProvider(HttpClientInterface $client, LoaderInter
/**
* @return iterable<array{0: ProviderInterface, 1: string}>
*/
abstract public function toStringProvider(): iterable;
abstract public static function toStringProvider(): iterable;

/**
* @dataProvider toStringProvider
Expand Down

0 comments on commit 114853f

Please sign in to comment.