Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit aeea1d6

Browse filesBrowse files
committed
Framework integration
1 parent 7f14890 commit aeea1d6
Copy full SHA for aeea1d6

File tree

Expand file treeCollapse file tree

3 files changed

+11
-1
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+11
-1
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
+6Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Resources/config/web_link.php
+4Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/WebLink/HttpHeaderSerializer.php
+1-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.