From a718b0a7de76411ea20765cbdea2a6e58d02e9d7 Mon Sep 17 00:00:00 2001 From: Leszek Manicki Date: Fri, 10 Jan 2025 12:11:33 +0100 Subject: [PATCH] lib data model services: Bump PHPMD version 2.15 The newer version of the tool (pulled by the existing dependency compatibility range) seems to find some issues that older version(s) didn't. This change makes the new version dependency more explicit, and temporarily disables identified issues. Bug: T381168 Change-Id: I229749887fcc930f6f598babdfe25242df1c8021 --- composer.json | 2 +- src/Lookup/EntityRetrievingClosestReferencedEntityIdLookup.php | 2 ++ src/Lookup/MaxReferencedEntityVisitsExhaustedException.php | 2 ++ tests/unit/Diff/Internal/AliasGroupListPatcherTest.php | 2 ++ tests/unit/Diff/TermListPatcherTest.php | 2 ++ .../EntityRetrievingClosestReferencedEntityIdLookupTest.php | 2 ++ .../Lookup/MaxReferencedEntityVisitsExhaustedExceptionTest.php | 2 ++ 7 files changed, 13 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 3b83c8bd..c2502356 100644 --- a/composer.json +++ b/composer.json @@ -31,7 +31,7 @@ "wikimedia/assert": "~0.2.2|~0.3.0|~0.4.0|~0.5.0" }, "require-dev": { - "phpmd/phpmd": "~2.3", + "phpmd/phpmd": "~2.15", "phpunit/phpunit": "~8.0" }, "autoload": { diff --git a/src/Lookup/EntityRetrievingClosestReferencedEntityIdLookup.php b/src/Lookup/EntityRetrievingClosestReferencedEntityIdLookup.php index f70f1246..27831296 100644 --- a/src/Lookup/EntityRetrievingClosestReferencedEntityIdLookup.php +++ b/src/Lookup/EntityRetrievingClosestReferencedEntityIdLookup.php @@ -21,6 +21,8 @@ * * @license GPL-2.0-or-later * @author Marius Hoch + * + * @SuppressWarnings(PHPMD.LongClassName) */ class EntityRetrievingClosestReferencedEntityIdLookup implements ReferencedEntityIdLookup { diff --git a/src/Lookup/MaxReferencedEntityVisitsExhaustedException.php b/src/Lookup/MaxReferencedEntityVisitsExhaustedException.php index 9d9295c9..32e63121 100644 --- a/src/Lookup/MaxReferencedEntityVisitsExhaustedException.php +++ b/src/Lookup/MaxReferencedEntityVisitsExhaustedException.php @@ -11,6 +11,8 @@ * * @license GPL-2.0-or-later * @author Marius Hoch + * + * @SuppressWarnings(PHPMD.LongClassName) */ class MaxReferencedEntityVisitsExhaustedException extends ReferencedEntityIdLookupException { diff --git a/tests/unit/Diff/Internal/AliasGroupListPatcherTest.php b/tests/unit/Diff/Internal/AliasGroupListPatcherTest.php index 84ac4def..4cf4397c 100644 --- a/tests/unit/Diff/Internal/AliasGroupListPatcherTest.php +++ b/tests/unit/Diff/Internal/AliasGroupListPatcherTest.php @@ -16,6 +16,8 @@ * * @license GPL-2.0-or-later * @author Bene* < benestar.wikimedia@gmail.com > + * + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ class AliasGroupListPatcherTest extends TestCase { diff --git a/tests/unit/Diff/TermListPatcherTest.php b/tests/unit/Diff/TermListPatcherTest.php index 1aed6945..0524683f 100644 --- a/tests/unit/Diff/TermListPatcherTest.php +++ b/tests/unit/Diff/TermListPatcherTest.php @@ -16,6 +16,8 @@ * * @license GPL-2.0-or-later * @author Bene* < benestar.wikimedia@gmail.com > + * + * @SuppressWarnings(PHPMD.ExcessiveMethodLength) */ class TermListPatcherTest extends TestCase { diff --git a/tests/unit/Lookup/EntityRetrievingClosestReferencedEntityIdLookupTest.php b/tests/unit/Lookup/EntityRetrievingClosestReferencedEntityIdLookupTest.php index d5f27980..fa777e73 100644 --- a/tests/unit/Lookup/EntityRetrievingClosestReferencedEntityIdLookupTest.php +++ b/tests/unit/Lookup/EntityRetrievingClosestReferencedEntityIdLookupTest.php @@ -29,6 +29,8 @@ * * @license GPL-2.0-or-later * @author Marius Hoch + * + * @SuppressWarnings(PHPMD.LongClassName) */ class EntityRetrievingClosestReferencedEntityIdLookupTest extends TestCase { diff --git a/tests/unit/Lookup/MaxReferencedEntityVisitsExhaustedExceptionTest.php b/tests/unit/Lookup/MaxReferencedEntityVisitsExhaustedExceptionTest.php index 207e1466..150049ac 100644 --- a/tests/unit/Lookup/MaxReferencedEntityVisitsExhaustedExceptionTest.php +++ b/tests/unit/Lookup/MaxReferencedEntityVisitsExhaustedExceptionTest.php @@ -13,6 +13,8 @@ * * @license GPL-2.0-or-later * @author Marius Hoch + * + * @SuppressWarnings(PHPMD.LongClassName) */ class MaxReferencedEntityVisitsExhaustedExceptionTest extends TestCase {