From 19c86e7f0183a2b85c79ff5163e6f30ec181f773 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jul 2026 13:06:12 +0000 Subject: [PATCH 1/3] Build(deps-dev): Bump nextcloud/coding-standard from 1.4.0 to 1.5.0 Bumps [nextcloud/coding-standard](https://github.com/nextcloud/coding-standard) from 1.4.0 to 1.5.0. - [Release notes](https://github.com/nextcloud/coding-standard/releases) - [Changelog](https://github.com/nextcloud/coding-standard/blob/master/CHANGELOG.md) - [Commits](https://github.com/nextcloud/coding-standard/compare/v1.4.0...v1.5.0) --- updated-dependencies: - dependency-name: nextcloud/coding-standard dependency-version: 1.5.0 dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- composer.lock | 62 +++++++++++++++++++++++++-------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/composer.lock b/composer.lock index dd742c88a..2f0193389 100644 --- a/composer.lock +++ b/composer.lock @@ -51,16 +51,16 @@ }, { "name": "kubawerlos/php-cs-fixer-custom-fixers", - "version": "v3.35.1", + "version": "v3.37.2", "source": { "type": "git", "url": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers.git", - "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395" + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/2a35f80ae24ca77443a7af1599c3a3db1b6bd395", - "reference": "2a35f80ae24ca77443a7af1599c3a3db1b6bd395", + "url": "https://api.github.com/repos/kubawerlos/php-cs-fixer-custom-fixers/zipball/678df979ce743466b42ddb6eea46b3f4c9a7bade", + "reference": "678df979ce743466b42ddb6eea46b3f4c9a7bade", "shasum": "" }, "require": { @@ -70,7 +70,7 @@ "php": "^7.4 || ^8.0" }, "require-dev": { - "phpunit/phpunit": "^9.6.24 || ^10.5.51 || ^11.5.32" + "phpunit/phpunit": "^9.6.34 || ^10.5.63 || ^11.5.55" }, "type": "library", "autoload": { @@ -91,7 +91,7 @@ "description": "A set of custom fixers for PHP CS Fixer", "support": { "issues": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/issues", - "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.35.1" + "source": "https://github.com/kubawerlos/php-cs-fixer-custom-fixers/tree/v3.37.2" }, "funding": [ { @@ -99,7 +99,7 @@ "type": "github" } ], - "time": "2025-09-28T18:43:35+00:00" + "time": "2026-05-12T16:22:19+00:00" }, { "name": "myclabs/deep-copy", @@ -163,16 +163,16 @@ }, { "name": "nextcloud/coding-standard", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/nextcloud/coding-standard.git", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011" + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/8e06808c1423e9208d63d1bd205b9a38bd400011", - "reference": "8e06808c1423e9208d63d1bd205b9a38bd400011", + "url": "https://api.github.com/repos/nextcloud/coding-standard/zipball/80547a93236fbb9c783e05f0f0899043851b0dba", + "reference": "80547a93236fbb9c783e05f0f0899043851b0dba", "shasum": "" }, "require": { @@ -202,9 +202,9 @@ ], "support": { "issues": "https://github.com/nextcloud/coding-standard/issues", - "source": "https://github.com/nextcloud/coding-standard/tree/v1.4.0" + "source": "https://github.com/nextcloud/coding-standard/tree/v1.5.0" }, - "time": "2025-06-19T12:27:27+00:00" + "time": "2026-05-19T18:30:09+00:00" }, { "name": "nextcloud/ocp", @@ -433,16 +433,16 @@ }, { "name": "php-cs-fixer/shim", - "version": "v3.88.2", + "version": "v3.95.11", "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/shim.git", - "reference": "b70300670e5a37dd3a9cb0f188e186c8c206f70f" + "reference": "87c59806c6ec3da0c554ca154a14c7e970fe5f26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/b70300670e5a37dd3a9cb0f188e186c8c206f70f", - "reference": "b70300670e5a37dd3a9cb0f188e186c8c206f70f", + "url": "https://api.github.com/repos/PHP-CS-Fixer/shim/zipball/87c59806c6ec3da0c554ca154a14c7e970fe5f26", + "reference": "87c59806c6ec3da0c554ca154a14c7e970fe5f26", "shasum": "" }, "require": { @@ -479,9 +479,9 @@ "description": "A tool to automatically fix PHP code style", "support": { "issues": "https://github.com/PHP-CS-Fixer/shim/issues", - "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.88.2" + "source": "https://github.com/PHP-CS-Fixer/shim/tree/v3.95.11" }, - "time": "2025-09-27T00:25:01+00:00" + "time": "2026-06-25T14:17:29+00:00" }, { "name": "php-webdriver/webdriver", @@ -2387,16 +2387,16 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.33.0", + "version": "v1.38.2", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493" + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/6d857f4d76bd4b343eac26d6b539585d2bc56493", - "reference": "6d857f4d76bd4b343eac26d6b539585d2bc56493", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", + "reference": "d3d318bad5e7a1bfbd026009c8bfb8d8f99ae6b6", "shasum": "" }, "require": { @@ -2448,7 +2448,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.33.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.38.2" }, "funding": [ { @@ -2468,20 +2468,20 @@ "type": "tidelift" } ], - "time": "2024-12-23T08:48:59+00:00" + "time": "2026-05-27T06:59:30+00:00" }, { "name": "symfony/process", - "version": "v7.4.5", + "version": "v7.4.13", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "608476f4604102976d687c483ac63a79ba18cc97" + "reference": "f5804be144caceb570f6747519999636b664f24c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/608476f4604102976d687c483ac63a79ba18cc97", - "reference": "608476f4604102976d687c483ac63a79ba18cc97", + "url": "https://api.github.com/repos/symfony/process/zipball/f5804be144caceb570f6747519999636b664f24c", + "reference": "f5804be144caceb570f6747519999636b664f24c", "shasum": "" }, "require": { @@ -2513,7 +2513,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v7.4.5" + "source": "https://github.com/symfony/process/tree/v7.4.13" }, "funding": [ { @@ -2533,7 +2533,7 @@ "type": "tidelift" } ], - "time": "2026-01-26T15:07:59+00:00" + "time": "2026-05-23T16:05:06+00:00" }, { "name": "theseer/tokenizer", From f0bfe744ef72b1d18424da4bc202fd62b165b3a1 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Mon, 6 Jul 2026 15:14:13 +0200 Subject: [PATCH 2/3] Make PHP scripts compatible with current PHP code rules Signed-off-by: Christian Wolf --- lib/Controller/Implementation/RecipeImplementation.php | 3 --- lib/Controller/RecipeApiController.php | 2 -- lib/Controller/RecipeController.php | 2 -- lib/Helper/HtmlToDomParser.php | 1 - lib/Helper/TimestampHelper.php | 2 -- lib/Helper/UserFolderHelper.php | 1 - lib/Service/RecipeService.php | 3 --- .../Setup/Migrations/Version000000Date20220703174647Test.php | 2 -- .../Controller/Implementation/CategoryImplementationTest.php | 3 --- .../Controller/Implementation/KeywordImplementationTest.php | 2 -- .../Controller/Implementation/RecipeImplementationTest.php | 3 --- tests/Unit/Helper/Filter/JSONFilterTest.php | 1 - tests/Unit/Helper/TimestampHelperTest.php | 1 - 13 files changed, 26 deletions(-) diff --git a/lib/Controller/Implementation/RecipeImplementation.php b/lib/Controller/Implementation/RecipeImplementation.php index 9a7cddbd5..14c741b5d 100644 --- a/lib/Controller/Implementation/RecipeImplementation.php +++ b/lib/Controller/Implementation/RecipeImplementation.php @@ -45,7 +45,6 @@ class RecipeImplementation { /** @var LoggerInterface */ private $logger; - public function __construct( IRequest $request, RecipeService $recipeService, @@ -440,8 +439,6 @@ public function getAllInCategory($category) { } } - - /** * Get all recipes with a tag associated * diff --git a/lib/Controller/RecipeApiController.php b/lib/Controller/RecipeApiController.php index c5af2328d..d88c51ca2 100644 --- a/lib/Controller/RecipeApiController.php +++ b/lib/Controller/RecipeApiController.php @@ -121,8 +121,6 @@ public function category($category) { return $this->impl->getAllInCategory($category); } - - /** * @param string $keywords * @return JSONResponse diff --git a/lib/Controller/RecipeController.php b/lib/Controller/RecipeController.php index 1fdf5bdd2..d4bbc4dc4 100755 --- a/lib/Controller/RecipeController.php +++ b/lib/Controller/RecipeController.php @@ -102,8 +102,6 @@ public function category($category) { return $this->impl->getAllInCategory($category); } - - /** * @param string $keywords * @return JSONResponse diff --git a/lib/Helper/HtmlToDomParser.php b/lib/Helper/HtmlToDomParser.php index 1669f5ac6..01278bb2c 100644 --- a/lib/Helper/HtmlToDomParser.php +++ b/lib/Helper/HtmlToDomParser.php @@ -200,7 +200,6 @@ private function logWarning(int $code, array $group, string $url): void { $this->state = max($this->state, self::PARSING_WARNING); } - private function logError(int $code, array $group, string $url): void { $msg = $this->l->n('Error %u occurred while parsing %s.', 'Error %u occurred %n times while parsing %s.', $group['count'], [$code, $url]); $this->logger->warning($this->formatError($msg, $group['first'])); diff --git a/lib/Helper/TimestampHelper.php b/lib/Helper/TimestampHelper.php index 7ddd1ba78..05a04d515 100644 --- a/lib/Helper/TimestampHelper.php +++ b/lib/Helper/TimestampHelper.php @@ -14,7 +14,6 @@ class TimestampHelper { /** @var IL10N */ private $l; - // Output format: Ignore fractions of a second public const OUTPUT_FORMAT = 'Y-m-d\TH:i:sP'; @@ -133,7 +132,6 @@ private function parseIsoWeekDateFormat(string $timestamp, string $dateSeparator throw new InvalidTimestampException($this->l->t('Could not parse timestamp {timestamp}', ['timestamp' => $timestamp])); } - /** * Parses the string $timestamp and checks if it has a valid ISO 8601. Uses the date format given by $dateFormat * and checks several allowed formats for the time. diff --git a/lib/Helper/UserFolderHelper.php b/lib/Helper/UserFolderHelper.php index 4d31229a9..2a3c2294c 100644 --- a/lib/Helper/UserFolderHelper.php +++ b/lib/Helper/UserFolderHelper.php @@ -101,7 +101,6 @@ public function getFolder(): Folder { $path = '/' . $this->userId . '/files/' . $path; $path = str_replace('//', '/', $path); - $this->cache = $this->getOrCreateFolder($path); } diff --git a/lib/Service/RecipeService.php b/lib/Service/RecipeService.php index 8abcbbdad..b7c2bf549 100755 --- a/lib/Service/RecipeService.php +++ b/lib/Service/RecipeService.php @@ -445,8 +445,6 @@ public function getAllCategoriesInSearchIndex() { return $this->db->findAllCategories($this->user_id); } - - /** Adds modification and creation date to each recipe in the list * * @param array $recipes @@ -579,7 +577,6 @@ public function parseRecipeFile(File $file): ?array { $json['id'] = $file->getParent()->getId(); - if (!array_key_exists('dateCreated', $json)) { $json['dateCreated'] = $file->getCreationTime(); } diff --git a/tests/Migration/Setup/Migrations/Version000000Date20220703174647Test.php b/tests/Migration/Setup/Migrations/Version000000Date20220703174647Test.php index f176062e4..103b80542 100644 --- a/tests/Migration/Setup/Migrations/Version000000Date20220703174647Test.php +++ b/tests/Migration/Setup/Migrations/Version000000Date20220703174647Test.php @@ -50,11 +50,9 @@ public function testRedundantEntriesInDB(/*$data, $updatedUsers*/) { $this->assertNull($row['date_created']); $this->assertNull($row['date_modified']); - //$this->assertEquals([null, null], $data[0]); } - protected function getPreviousMigrationName(): string { return '000000Date20210701093123'; } diff --git a/tests/Unit/Controller/Implementation/CategoryImplementationTest.php b/tests/Unit/Controller/Implementation/CategoryImplementationTest.php index 35d543cf9..20a8c269b 100644 --- a/tests/Unit/Controller/Implementation/CategoryImplementationTest.php +++ b/tests/Unit/Controller/Implementation/CategoryImplementationTest.php @@ -85,9 +85,6 @@ public function testGetCategories(): void { $this->assertEquals($cat, $ret->getData()); } - - - /** * @dataProvider dataProviderCategoryUpdateNoName * @param mixed $requestParams diff --git a/tests/Unit/Controller/Implementation/KeywordImplementationTest.php b/tests/Unit/Controller/Implementation/KeywordImplementationTest.php index fe810a4fc..64a001329 100644 --- a/tests/Unit/Controller/Implementation/KeywordImplementationTest.php +++ b/tests/Unit/Controller/Implementation/KeywordImplementationTest.php @@ -42,8 +42,6 @@ private function ensureCacheCheckTriggered(): void { $this->dbCacheService->expects($this->once())->method('triggerCheck'); } - - public function testGetKeywords(): void { $this->ensureCacheCheckTriggered(); diff --git a/tests/Unit/Controller/Implementation/RecipeImplementationTest.php b/tests/Unit/Controller/Implementation/RecipeImplementationTest.php index c1ef8d8d7..e798c6916 100644 --- a/tests/Unit/Controller/Implementation/RecipeImplementationTest.php +++ b/tests/Unit/Controller/Implementation/RecipeImplementationTest.php @@ -90,8 +90,6 @@ private function ensureCacheCheckTriggered(): void { $this->dbCacheService->expects($this->once())->method('triggerCheck'); } - - public function testImportFailed(): void { $this->ensureCacheCheckTriggered(); @@ -169,7 +167,6 @@ public function testImportOther(): void { */ $ret = $this->sut->import(); - $this->assertEquals(400, $ret->getStatus()); $this->assertEquals($errorMsg, $ret->getData()); } diff --git a/tests/Unit/Helper/Filter/JSONFilterTest.php b/tests/Unit/Helper/Filter/JSONFilterTest.php index 29f6ded6f..bc8c5523e 100644 --- a/tests/Unit/Helper/Filter/JSONFilterTest.php +++ b/tests/Unit/Helper/Filter/JSONFilterTest.php @@ -62,7 +62,6 @@ protected function setUp(): void { $this->fixDurationsFilter = $this->createStub(FixDurationsFilter::class); $this->fixNutritionFilter = $this->createStub(FixNutritionFilter::class); - $this->dut = new JSONFilter( $this->schemaConformityFilter, $this->recipeNameFilter, diff --git a/tests/Unit/Helper/TimestampHelperTest.php b/tests/Unit/Helper/TimestampHelperTest.php index 18bc70370..747f286f8 100644 --- a/tests/Unit/Helper/TimestampHelperTest.php +++ b/tests/Unit/Helper/TimestampHelperTest.php @@ -35,7 +35,6 @@ public static function dpIso() { ['2000-01-01T01:01:00.123+01:00', '2000-01-01T01:01:00+01:00'], ['2000-01-01T01:01:00.123-01:00', '2000-01-01T01:01:00-01:00'], - ['20000101T01:01:00.123-01:00', '2000-01-01T01:01:00-01:00'], ['20000101T01:01:00-01:00', '2000-01-01T01:01:00-01:00'], From 8b5d73ecba98cc558bf22be13c37a831d64fb626 Mon Sep 17 00:00:00 2001 From: Christian Wolf Date: Mon, 6 Jul 2026 15:15:17 +0200 Subject: [PATCH 3/3] Update Changelog Signed-off-by: Christian Wolf --- .changelog/current/3171-cosing-standards.md | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .changelog/current/3171-cosing-standards.md diff --git a/.changelog/current/3171-cosing-standards.md b/.changelog/current/3171-cosing-standards.md new file mode 100644 index 000000000..e435a44fd --- /dev/null +++ b/.changelog/current/3171-cosing-standards.md @@ -0,0 +1,4 @@ +# Maintenance + +- Move to current coding standards in the backend +