10BC0 Framework integration · symfony/symfony@2afdc15 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2afdc15

Browse files
committed
Framework integration
1 parent 3a4e7fe commit 2afdc15

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,7 @@
216216
use Symfony\Component\Validator\ObjectInitializerInterface;
217217
use Symfony\Component\Validator\Validation;
218218
use Symfony\Component\Webhook\Controller\WebhookController;
219+
use Symfony\Component\WebLink\HttpHeaderParser;
219220
use Symfony\Component\WebLink\HttpHeaderSerializer;
220221
use Symfony\Component\Workflow;
221222
use Symfony\Component\Workflow\WorkflowInterface;
@@ -497,6 +498,11 @@ public function load(array $configs, ContainerBuilder $container): void
497498
}
498499

499500
$loader->load('web_link.php');
501+
502+
// Require symfony/web-link 7.4
503+
if (!class_exists(HttpHeaderParser::class)) {
504+
$container->removeDefinition('web_link.http_header_parser');
505+
}
500506
}
501507

502508
if ($this->readConfigEnabled('uid', $container, $config['uid'])) {

src/Symfony/Bundle/FrameworkBundle/Resources/config/web_link.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
1313

1414
use Symfony\Component\WebLink\EventListener\AddLinkHeaderListener;
15+
use Symfony\Component\WebLink\HttpHeaderParser;
1516
use Symfony\Component\WebLink\HttpHeaderSerializer;
1617

1718
return static function (ContainerConfigurator $container) {
@@ -20,6 +21,9 @@
2021
->set('web_link.http_header_serializer', HttpHeaderSerializer::class)
2122
->alias(HttpHeaderSerializer::class, 'web_link.http_header_serializer')
2223

24+
->set('web_link.http_header_parser', HttpHeaderParser::class)
25+
->alias(HttpHeaderParser::class, 'web_link.http_header_parser')
26+
2327
->set('web_link.add_link_header_listener', AddLinkHeaderListener::class)
2428
->args([
2529
service('web_link.http_header_serializer'),

src/Symfony/Component/WebLink/HttpHeaderSerializer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
*
2121
* @author Kévin Dunglas <dunglas@gmail.com>
2222
*/
23-
final class HttpHeaderSerializer
23+
class HttpHeaderSerializer
2424
{
2525
/**
2626
* Builds the value of the "Link" HTTP header.

0 commit comments

Comments
 (0)
0