From c75682499d36c48804d4ee56da57608f372097e3 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Tue, 23 May 2023 17:24:39 +0200 Subject: [PATCH 1/7] [7.0] Bump to PHP 8.2 minimum --- composer.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 8537f78..3203f6f 100644 --- a/composer.json +++ b/composer.json @@ -19,14 +19,14 @@ "psr/link-implementation": "1.0|2.0" }, "require": { - "php": ">=8.1", + "php": ">=8.2", "psr/link": "^1.1|^2.0" }, "require-dev": { - "symfony/http-kernel": "^5.4|^6.0|^7.0" + "symfony/http-kernel": "^6.4|^7.0" }, "conflict": { - "symfony/http-kernel": "<5.4" + "symfony/http-kernel": "<6.4" }, "autoload": { "psr-4": { "Symfony\\Component\\WebLink\\": "" }, From e398029975aeef972024ddffe4dfd9a17c2a6c8d Mon Sep 17 00:00:00 2001 From: Wouter de Jong Date: Sun, 2 Jul 2023 23:52:21 +0200 Subject: [PATCH 2/7] [Components] Convert to native return types --- Link.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Link.php b/Link.php index af32d21..6e893f0 100644 --- a/Link.php +++ b/Link.php @@ -117,7 +117,7 @@ class Link implements EvolvableLinkInterface public const REL_SERVICE_DESC = 'service-desc'; public const REL_SERVICE_DOC = 'service-doc'; public const REL_SERVICE_META = 'service-meta'; - public const REL_SIPTRUNKINGCAPABILITY= 'siptrunkingcapability'; + public const REL_SIPTRUNKINGCAPABILITY = 'siptrunkingcapability'; public const REL_SPONSORED = 'sponsored'; public const REL_START = 'start'; public const REL_STATUS = 'status'; From 074289b512178258f9db8a14d7c4896fd1674e95 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Fri, 8 Dec 2023 15:23:08 +0100 Subject: [PATCH 3/7] Fx README files --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fe33a9c..7e958a0 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,8 @@ wiki](http://microformats.org/wiki/existing-rel-values#HTML5_link_type_extension Getting Started --------------- -``` -$ composer require symfony/web-link +```bash +composer require symfony/web-link ``` ```php From 3dc0fd02063df680b0b335577d290856627820b0 Mon Sep 17 00:00:00 2001 From: Alexandre Daubois Date: Thu, 14 Dec 2023 11:03:37 +0100 Subject: [PATCH 4/7] Set `strict` parameter of `in_array` to true where possible --- GenericLinkProvider.php | 2 +- Tests/LinkTest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/GenericLinkProvider.php b/GenericLinkProvider.php index 3df2f98..78c319d 100644 --- a/GenericLinkProvider.php +++ b/GenericLinkProvider.php @@ -45,7 +45,7 @@ public function getLinksByRel(string $rel): array $links = []; foreach ($this->links as $link) { - if (\in_array($rel, $link->getRels())) { + if (\in_array($rel, $link->getRels(), true)) { $links[] = $link; } } diff --git a/Tests/LinkTest.php b/Tests/LinkTest.php index e1c03ba..226bc3a 100644 --- a/Tests/LinkTest.php +++ b/Tests/LinkTest.php @@ -45,7 +45,7 @@ public function testCanRemoveValues() ->withoutRel('next'); $this->assertEquals('http://www.google.com', $link->getHref()); - $this->assertFalse(\in_array('next', $link->getRels())); + $this->assertFalse(\in_array('next', $link->getRels(), true)); $this->assertArrayNotHasKey('me', $link->getAttributes()); } From 242ad86e8df9971bda95e6c8d14ba75fcbeba8ef Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 24 May 2024 13:05:21 +0200 Subject: [PATCH 5/7] 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 6/7] 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 7/7] 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 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