From 242ad86e8df9971bda95e6c8d14ba75fcbeba8ef Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 24 May 2024 13:05:21 +0200 Subject: [PATCH 1/4] use constructor property promotion --- Link.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Link.php b/Link.php index 5eab613..f8bf6e4 100644 --- a/Link.php +++ b/Link.php @@ -141,8 +141,6 @@ class Link implements EvolvableLinkInterface // Extra relations public const REL_MERCURE = 'mercure'; - private string $href = ''; - /** * @var string[] */ @@ -153,12 +151,13 @@ class Link implements EvolvableLinkInterface */ private array $attributes = []; - public function __construct(?string $rel = null, string $href = '') - { + public function __construct( + ?string $rel = null, + private string $href = '', + ) { if (null !== $rel) { $this->rel[$rel] = $rel; } - $this->href = $href; } public function getHref(): string From ea2480d186bad451bdb46529750fe03ec282e88f Mon Sep 17 00:00:00 2001 From: "Alexander M. Turek" Date: Thu, 20 Jun 2024 17:52:34 +0200 Subject: [PATCH 2/4] Prefix all sprintf() calls --- HttpHeaderSerializer.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/HttpHeaderSerializer.php b/HttpHeaderSerializer.php index 2ecdff0..4d537c9 100644 --- a/HttpHeaderSerializer.php +++ b/HttpHeaderSerializer.php @@ -35,18 +35,18 @@ public function serialize(iterable $links): ?string continue; } - $attributesParts = ['', sprintf('rel="%s"', implode(' ', $link->getRels()))]; + $attributesParts = ['', \sprintf('rel="%s"', implode(' ', $link->getRels()))]; foreach ($link->getAttributes() as $key => $value) { if (\is_array($value)) { foreach ($value as $v) { - $attributesParts[] = sprintf('%s="%s"', $key, preg_replace('/(?%s', $link->getHref(), implode('; ', $attributesParts)); + $elements[] = \sprintf('<%s>%s', $link->getHref(), implode('; ', $attributesParts)); } return $elements ? implode(',', $elements) : null; From 9e17706c2136311d4d6c8c416fedbe4ffe88907d Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Sat, 6 Jul 2024 09:57:16 +0200 Subject: [PATCH 3/4] Update .gitattributes --- .gitattributes | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.gitattributes b/.gitattributes index 84c7add..14c3c35 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ /Tests export-ignore /phpunit.xml.dist export-ignore -/.gitattributes export-ignore -/.gitignore export-ignore +/.git* export-ignore From 8595204221c4307b5fd30644a225b0b952082b18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Thu, 15 May 2025 17:29:37 +0200 Subject: [PATCH 4/4] [WebLink] Hint that prerender is deprecated --- Link.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Link.php b/Link.php index 5eab613..ebad518 100644 --- a/Link.php +++ b/Link.php @@ -98,6 +98,12 @@ class Link implements EvolvableLinkInterface public const REL_PREDECESSOR_VERSION = 'predecessor-version'; public const REL_PREFETCH = 'prefetch'; public const REL_PRELOAD = 'preload'; + + /** + * This feature is deprecated and superseded by the Speculation Rules API. + * + * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/rel/prerender + */ public const REL_PRERENDER = 'prerender'; public const REL_PREV = 'prev'; public const REL_PREVIEW = 'preview'; pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy