Skip to content

Commit 07d0e5c

Browse files
committed
Remove support for Symfony versions below 5.4
1 parent 47bb000 commit 07d0e5c

File tree

4 files changed

+23
-29
lines changed

4 files changed

+23
-29
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ jobs:
6060
symfony-deprecations-helper: "weak"
6161

6262
# Test maintained versions of Symfony
63-
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^4.4"
64-
symfony-require: "4.4.*"
65-
php-version: "7.3"
66-
symfony-deprecations-helper: "weak"
67-
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^5.0"
63+
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^5.4"
6864
symfony-require: "5.4.*"
6965
php-version: "7.3"
7066
symfony-deprecations-helper: "weak"
67+
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^6.0"
68+
symfony-require: "6.3.*"
69+
php-version: "8.2"
70+
symfony-deprecations-helper: "weak"
7171

7272
steps:
7373
- name: "Checkout"

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ The change log describes what is "Added", "Removed", "Changed" or "Fixed" betwee
1111
- Removed support of deprecated PHP-HTTP factories, only PSR-17 factories are now supported and used.
1212
- Removed `message_factory`, `uri_factory`, and `stream_factory` classes config option. You can configure your own factories via psr17_*_factory classes config
1313
- Removed support for guzzle5-adapter
14+
- Removed support for Symfony versions <5.4
1415

1516
# Version 1
1617

composer.json

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
"php-http/stopwatch-plugin": "^1.2",
3636
"psr/http-factory-implementation": "^1.0",
3737
"psr/http-message": "^1.0 || ^2.0",
38-
"symfony/config": "^4.4 || ^5.0 || ^6.0",
39-
"symfony/dependency-injection": "^4.4 || ^5.0 || ^6.0",
40-
"symfony/event-dispatcher": "^4.4 || ^5.0 || ^6.0",
41-
"symfony/http-kernel": "^4.4 || ^5.0 || ^6.0",
42-
"symfony/options-resolver": "^4.4 || ^5.0 || ^6.0"
38+
"symfony/config": "^5.4 || ^6.0",
39+
"symfony/dependency-injection": "^5.4 || ^6.0",
40+
"symfony/event-dispatcher": "^5.4 || ^6.0",
41+
"symfony/http-kernel": "^5.4 || ^6.0",
42+
"symfony/options-resolver": "^5.4 || ^6.0"
4343
},
4444
"conflict": {
4545
"php-http/guzzle6-adapter": "<1.1",
@@ -57,15 +57,15 @@
5757
"php-http/cache-plugin": "^1.7",
5858
"php-http/mock-client": "^1.2",
5959
"php-http/promise": "^1.0",
60-
"symfony/browser-kit": "^4.4 || ^5.0 || ^6.0",
61-
"symfony/cache": "^4.4 || ^5.0 || ^6.0",
62-
"symfony/dom-crawler": "^4.4 || ^5.0 || ^6.0",
63-
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
64-
"symfony/http-foundation": "^4.4.19 || ^5.0 || ^6.0",
65-
"symfony/phpunit-bridge": "^5.3",
66-
"symfony/stopwatch": "^4.4 || ^5.0 || ^6.0",
67-
"symfony/twig-bundle": "^4.4 || ^5.0 || ^6.0",
68-
"symfony/web-profiler-bundle": "^4.4.19 || ^5.0 || ^6.0",
60+
"symfony/browser-kit": "^5.4 || ^6.0",
61+
"symfony/cache": "^5.4 || ^6.0",
62+
"symfony/dom-crawler": "^5.4 || ^6.0",
63+
"symfony/framework-bundle": "^5.4 || ^6.0",
64+
"symfony/http-foundation": "^5.4 || ^6.0",
65+
"symfony/phpunit-bridge": "^5.4 || ^6.0",
66+
"symfony/stopwatch": "^5.4 || ^6.0",
67+
"symfony/twig-bundle": "^5.4 || ^6.0",
68+
"symfony/web-profiler-bundle": "^5.4 || ^6.0",
6969
"twig/twig": "^1.41 || ^2.10 || ^3.0"
7070
},
7171
"suggest": {
@@ -76,7 +76,8 @@
7676
"config": {
7777
"sort-packages": true,
7878
"allow-plugins": {
79-
"symfony/flex": true
79+
"symfony/flex": true,
80+
"php-http/discovery": false
8081
}
8182
},
8283
"autoload": {

src/Collector/PluginClientFactoryListener.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,9 @@
55
namespace Http\HttplugBundle\Collector;
66

77
use Http\Client\Common\PluginClientFactory as DefaultPluginClientFactory;
8-
use Symfony\Component\EventDispatcher\Event as LegacyEvent;
98
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
10-
use Symfony\Component\HttpKernel\Kernel;
119
use Symfony\Contracts\EventDispatcher\Event;
1210

13-
if (Kernel::MAJOR_VERSION >= 5) {
14-
\class_alias(Event::class, 'Http\HttplugBundle\Collector\PluginClientFactoryListenerEventClass');
15-
} else {
16-
\class_alias(LegacyEvent::class, 'Http\HttplugBundle\Collector\PluginClientFactoryListenerEventClass');
17-
}
18-
1911
/**
2012
* This subscriber ensures that every PluginClient created when using Http\Client\Common\PluginClientFactory without
2113
* using the Symfony dependency injection container uses the Http\HttplugBundle\Collector\PluginClientFactory factory
@@ -40,7 +32,7 @@ public function __construct(PluginClientFactory $factory)
4032
/**
4133
* Make sure to profile clients created using PluginClientFactory.
4234
*/
43-
public function onEvent(PluginClientFactoryListenerEventClass $e)
35+
public function onEvent(Event $e)
4436
{
4537
DefaultPluginClientFactory::setFactory([$this->factory, 'createClient']);
4638
}

0 commit comments

Comments
 (0)