Skip to content

Commit c8a2db9

Browse files
committed
make classes final
1 parent 4d1ca68 commit c8a2db9

Some content is hidden

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

43 files changed

+57
-115
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
55
# Version 2
66

77
# 2.0.0 - (unreleased)
8+
89
- Increased min PHP version to 8.1
910
- Removed the deprecated `Http\HttplugBundle\ClientFactory\PluginClientFactory`. Use `Http\Client\Common\PluginClientFactory` instead.
1011
- Fixed a deprecation when creating a `HttpMethodsClient` via `http_methods_client: true`. Only PSR-17 factories are now passed as constructor arguments.
@@ -18,6 +19,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
1819
- Changed the type of `httplug.client.default` to `ClientInterface` instead of `HttpClient`
1920
- Removed the `DummyClient` interface
2021
- Removed the `Http\Client\HttpClient` alias use the `Psr\Http\Client\ClientInterface` typehint in your services for autowiring.
22+
- Changed classes marked as `@final` to be actually `final`. If you extended any of those, instead implement interfaces or decorate the class rather than extending it. Open an issue if you think a class needs to be made non-final to discuss what we should do.
2123

2224
# Version 1
2325

src/ClientFactory/AutoDiscoveryFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010
* Use auto discovery to find a HTTP client.
1111
*
1212
* @author Tobias Nyholm <[email protected]>
13-
*
14-
* @final
1513
*/
16-
class AutoDiscoveryFactory implements ClientFactory
14+
final class AutoDiscoveryFactory implements ClientFactory
1715
{
1816
public function createClient(array $config = [])
1917
{

src/ClientFactory/BuzzFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010

1111
/**
1212
* @author Tobias Nyholm <[email protected]>
13-
*
14-
* @final
1513
*/
16-
class BuzzFactory implements ClientFactory
14+
final class BuzzFactory implements ClientFactory
1715
{
1816
public function __construct(private readonly ResponseFactoryInterface $responseFactory)
1917
{

src/ClientFactory/CurlFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@
1010

1111
/**
1212
* @author Tobias Nyholm <[email protected]>
13-
*
14-
* @final
1513
*/
16-
class CurlFactory implements ClientFactory
14+
final class CurlFactory implements ClientFactory
1715
{
1816
public function __construct(
1917
private readonly ResponseFactoryInterface $responseFactory,

src/ClientFactory/Guzzle6Factory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88

99
/**
1010
* @author Tobias Nyholm <[email protected]>
11-
*
12-
* @final
1311
*/
14-
class Guzzle6Factory implements ClientFactory
12+
final class Guzzle6Factory implements ClientFactory
1513
{
1614
public function createClient(array $config = [])
1715
{

src/ClientFactory/Guzzle7Factory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88

99
/**
1010
* @author Tobias Nyholm <[email protected]>
11-
*
12-
* @final
1311
*/
14-
class Guzzle7Factory implements ClientFactory
12+
final class Guzzle7Factory implements ClientFactory
1513
{
1614
public function createClient(array $config = [])
1715
{

src/ClientFactory/ReactFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88

99
/**
1010
* @author Tobias Nyholm <[email protected]>
11-
*
12-
* @final
1311
*/
14-
class ReactFactory implements ClientFactory
12+
final class ReactFactory implements ClientFactory
1513
{
1614
public function createClient(array $config = [])
1715
{

src/ClientFactory/SocketFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,8 @@
88

99
/**
1010
* @author Tobias Nyholm <[email protected]>
11-
*
12-
* @final
1311
*/
14-
class SocketFactory implements ClientFactory
12+
final class SocketFactory implements ClientFactory
1513
{
1614
public function createClient(array $config = [])
1715
{

src/ClientFactory/SymfonyFactory.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111

1212
/**
1313
* @author Tobias Nyholm <[email protected]>
14-
*
15-
* @final
1614
*/
17-
class SymfonyFactory implements ClientFactory
15+
final class SymfonyFactory implements ClientFactory
1816
{
1917
public function __construct(
2018
private readonly ResponseFactoryInterface $responseFactory,

src/Collector/Collector.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
* @author Fabien Bourigault <[email protected]>
1919
*
2020
* @internal
21-
*
22-
* @final
2321
*/
24-
class Collector extends DataCollector
22+
final class Collector extends DataCollector
2523
{
2624
private ?Stack $activeStack = null;
2725

0 commit comments

Comments
 (0)