8000 [WebLink] Hint that prerender is deprecated · lyrixx/symfony@fc10d48 · GitHub
[go: up one dir, main page]

Skip to content

Commit fc10d48

Browse files
dunglasnicolas-grekas
authored andcommitted
[WebLink] Hint that prerender is deprecated
1 parent ca85f5f commit fc10d48

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/Symfony/Bridge/Twig/Extension/WebLinkExtension.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public function getFunctions(): array
4646
/**
4747
* Adds a "Link" HTTP header.
4848
*
49-
* @param string $rel The relation type (e.g. "preload", "prefetch", "prerender" or "dns-prefetch")
49+
* @param string $rel The relation type (e.g. "preload", "prefetch", or "dns-prefetch")
5050
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
5151
*
5252
* @return string The relation URI
@@ -117,7 +117,11 @@ public function prefetch(string $uri, array $attributes = []): string
117117
}
118118

119119
/**
120-
* Indicates to the client that it should prerender this resource .
120+
* Indicates to the client that it should prerender this resource.
121+
*
122+
* This feature is deprecated and superseded by the Speculation Rules API.
123+
*
124+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/prerender
121125
*
122126
* @param array $attributes The attributes of this link (e.g. "['as' => true]", "['pr' => 0.5]")
123127
*

src/Symfony/Component/WebLink/Link.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,12 @@ class Link implements EvolvableLinkInterface
9898
public const REL_PREDECESSOR_VERSION = 'predecessor-version';
9999
public const REL_PREFETCH = 'prefetch';
100100
public const REL_PRELOAD = 'preload';
101+
102+
/**
103+
* This feature is deprecated and superseded by the Speculation Rules API.
104+
*
105+
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/prerender
106+
*/
101107
public const REL_PRERENDER = 'prerender';
102108
public const REL_PREV = 'prev';
103109
public const REL_PREVIEW = 'preview';

0 commit comments

Comments
 (0)
0