Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From 5b09c44ecfeb59756427f9d84b8da2ab22cd1d4b Mon Sep 17 00:00:00 2001
From: David Dreschner <david.dreschner@nextcloud.com>
Date: Thu, 12 Feb 2026 12:21:20 +0100
Subject: [PATCH] fix: Fix deprecation warning on PHP >= 8.5

Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
---
src/URL/Normalizer.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/URL/Normalizer.php b/src/URL/Normalizer.php
index 930f7b7..7dabf14 100755
--- a/src/URL/Normalizer.php
+++ b/src/URL/Normalizer.php
@@ -83,7 +83,7 @@ class Normalizer
// parse URL into respective parts
$url_components = $this->mbParseUrl($this->url);

- if (! $url_components) {
+ if (count($url_components) === 0) {
// Reset URL
$this->url = '';

@@ -356,7 +356,7 @@ class Normalizer

private function mbParseUrl($url)
{
- $result = false;
+ $result = [];

// Build arrays of values we need to decode before parsing
$entities = array('%21', '%2A', '%27', '%28', '%29', '%3B', '%3A', '%40', '%26', '%3D', '%24', '%2C', '%2F', '%3F', '%23', '%5B', '%5D');
--
2.43.0

6 changes: 6 additions & 0 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,9 @@ path = [".patches/dkimvalidator-fix-broken-canonical-handling.patch"]
precedence = "aggregate"
SPDX-FileCopyrightText = "angrychimp, Teon d.o.o. - Bostjan Skufca, Marcus Bointon"
SPDX-License-Identifier = "MIT"

[[annotations]]
path = [".patches/url-normalizer-fix-deprecation-warning-on-PHP-8.5.patch"]
precedence = "aggregate"
SPDX-FileCopyrightText = "2013 Glen Scott"
SPDX-License-Identifier = "MIT"
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,23 @@
"bamarni/composer-bin-plugin": "^1.8.3",
"bytestream/horde-exception": "^2.2.0",
"bytestream/horde-imap-client": "^2.33.6",
"bytestream/horde-mail": "^2.7.1",
"bytestream/horde-mime": "^2.13.2",
"bytestream/horde-mail": "^2.7.2",
"bytestream/horde-mime": "^2.14.0",
"bytestream/horde-stream": "^1.7.2",
"bytestream/horde-stringprep": "^1.2.1",
"bytestream/horde-support": "^2.4.0",
"bytestream/horde-text-filter": "^2.5.0",
"bytestream/horde-text-flowed": "^2.1",
"bytestream/horde-util": "^2.8.0",
"bytestream/horde-util": "^2.8.1",
"cerdic/css-tidy": "v2.2.1",
"cweagans/composer-patches": "~2.0",
"ezyang/htmlpurifier": "4.19.0",
"glenscott/url-normalizer": "^1.4",
"gravatarphp/gravatar": "dev-master#6b9f6a45477ce48285738d9d0c3f0dbf97abe263",
"hamza221/html2text": "^1.0",
"jeremykendall/php-domain-parser": "^6.4.0",
"nextcloud/horde-managesieve": "^1.0",
"nextcloud/horde-smtp": "^1.0.2",
"nextcloud/horde-managesieve": "^1.0.1",
"nextcloud/horde-smtp": "^1.0.3",
"nextcloud/kitinerary": "^1.0",
"nextcloud/kitinerary-bin": "^1.0.4",
"nextcloud/kitinerary-flatpak": "^1.0",
Expand Down
64 changes: 32 additions & 32 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions patches.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
{
"patches": {
"glenscott/url-normalizer": [
{
"description": "Fix to prevent deprecation warning when using PHP >= 8.5",
"url": ".patches/url-normalizer-fix-deprecation-warning-on-PHP-8.5.patch",
"sha256":"856c3bc4d3e883f86efc3a24946681a3a6e4c22afa67d7b8cb1d78391668c365",
"extra": {
"upstream-fix-url": "https://github.com/glenscott/url-normalizer/pull/33"
}
}
],
"phpmailer/dkimvalidator": [
{
"description": "Fix incorrect canonicalization handling and modified message content",
Expand Down
15 changes: 14 additions & 1 deletion patches.lock.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
{
"_hash": "0e361a02397cd9d8d46e434d387c107639b0c9b7541b3f9446da4e3c90758e98",
"_hash": "e3297c923adcdbd735cc8da9765e21e3f6bcb9f669ed228d8954814d910fc127",
"patches": {
"glenscott/url-normalizer": [
{
"package": "glenscott/url-normalizer",
"description": "Fix to prevent deprecation warning when using PHP >= 8.5",
"url": ".patches/url-normalizer-fix-deprecation-warning-on-PHP-8.5.patch",
"sha256": "856c3bc4d3e883f86efc3a24946681a3a6e4c22afa67d7b8cb1d78391668c365",
"depth": 1,
"extra": {
"upstream-fix-url": "https://github.com/glenscott/url-normalizer/pull/33",
"provenance": "patches-file:patches.json"
}
}
],
"phpmailer/dkimvalidator": [
{
"package": "phpmailer/dkimvalidator",
Expand Down
15 changes: 15 additions & 0 deletions tests/Unit/BackgroundJob/ContextChat/SubmitContentJobTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,21 @@ class SubmitContentJobTest extends TestCase {
/** @var ContextChatProvider */
private $contextChatProvider;

/** @var ITimeFactory|MockObject */
private $time;

/** @var IMAPClientFactory|MockObject */
private $imapClientFactory;

/** @var LoggerInterface|MockObject */
private $logger;

/** @var MailboxMapper|MockObject */
private $mailboxMapper;

/** @var SubmitContentJob */
private $submitContentJob;

protected function setUp(): void {
parent::setUp();

Expand Down
1 change: 1 addition & 0 deletions tests/Unit/Command/CreateAccountTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class CreateAccountTest extends TestCase {
private $service;
private $crypto;
private $userManager;
private $classificationSettingsService;
private $command;
private $args = [
'user-id',
Expand Down
3 changes: 3 additions & 0 deletions tests/Unit/ContextChat/ContextChatProviderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ class ContextChatProviderTest extends TestCase {
/** @var IContentManager|MockObject */
private $contentManager;

/** @var IJobList|MockObject */
private $jobList;

/** @var ContextChatProvider */
private $contextChatProvider;

Expand Down
2 changes: 0 additions & 2 deletions tests/Unit/Controller/MessagesControllerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -518,11 +518,9 @@ public function testDownloadAttachments() {
// Reflection is needed to get private properties
$refZip = new ReflectionObject($zip);
$prop = $refZip->getProperty('resources');
$prop->setAccessible(true);
$zipValues = $prop->getValue($zip);
$refResponse = new ReflectionObject($response);
$prop = $refResponse->getProperty('resources');
$prop->setAccessible(true);
$responseValues = $prop->getValue($zip);

$this->assertTrue(is_resource($zipValues[0]['resource']));
Expand Down
Loading