From 301b0993760d3a94f09e436c24f0c43a410c5b0e Mon Sep 17 00:00:00 2001 From: Gordon Date: Tue, 10 Jan 2023 16:22:17 -0700 Subject: [PATCH 1/2] rename protected method to allow for php 8.x usage --- src/Negotiation/AbstractNegotiator.php | 4 ++-- src/Negotiation/LanguageNegotiator.php | 2 +- src/Negotiation/Negotiator.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Negotiation/AbstractNegotiator.php b/src/Negotiation/AbstractNegotiator.php index 79c7c9b..8048bd1 100644 --- a/src/Negotiation/AbstractNegotiator.php +++ b/src/Negotiation/AbstractNegotiator.php @@ -111,7 +111,7 @@ abstract protected function acceptFactory($header); * * @return AcceptMatch|null Headers matched */ - protected function match(AcceptHeader $header, AcceptHeader $priority, $index) + protected function matchHeader(AcceptHeader $header, AcceptHeader $priority, $index) { $ac = $header->getType(); $pc = $priority->getType(); @@ -154,7 +154,7 @@ private function findMatches(array $headerParts, array $priorities) $matches = []; foreach ($priorities as $index => $p) { foreach ($headerParts as $h) { - if (null !== $match = $this->match($h, $p, $index)) { + if (null !== $match = $this->matchHeader($h, $p, $index)) { $matches[] = $match; } } diff --git a/src/Negotiation/LanguageNegotiator.php b/src/Negotiation/LanguageNegotiator.php index ba33616..0337e7e 100644 --- a/src/Negotiation/LanguageNegotiator.php +++ b/src/Negotiation/LanguageNegotiator.php @@ -15,7 +15,7 @@ protected function acceptFactory($accept) /** * {@inheritdoc} */ - protected function match(AcceptHeader $acceptLanguage, AcceptHeader $priority, $index) + protected function matchHeader(AcceptHeader $acceptLanguage, AcceptHeader $priority, $index) { if (!$acceptLanguage instanceof AcceptLanguage || !$priority instanceof AcceptLanguage) { return null; diff --git a/src/Negotiation/Negotiator.php b/src/Negotiation/Negotiator.php index 9b98a2e..58110cd 100644 --- a/src/Negotiation/Negotiator.php +++ b/src/Negotiation/Negotiator.php @@ -15,7 +15,7 @@ protected function acceptFactory($accept) /** * {@inheritdoc} */ - protected function match(AcceptHeader $accept, AcceptHeader $priority, $index) + protected function matchHeader(AcceptHeader $accept, AcceptHeader $priority, $index) { if (!$accept instanceof Accept || !$priority instanceof Accept) { return null; From 098d8d5013ff6639a7c49c0db91015958b4cef9e Mon Sep 17 00:00:00 2001 From: Gordon Date: Tue, 10 Jan 2023 16:23:06 -0700 Subject: [PATCH 2/2] add php 8.2 to test matrix --- .github/workflows/ci.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d3fee8c..f7a93fb 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -17,6 +17,7 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" steps: - uses: actions/checkout@v2