Fix issues reported by upgrade_status for Drupal 11.x

Created on 17 November 2024, about 1 month ago

Problem/Motivation

When running the upgrade status it reports the next errors:

CONTRIBUTED PROJECTS
--------------------------------------------------------------------------------
Mask Field
Scanned on Sun, 11/17/2024 - 18:04.

56 warnings found.

web/modules/contrib/mask/mask.module:
+----------------+------+-------------------------------------------------------------+
| status         | line | message                                                     |
+----------------+------+-------------------------------------------------------------+
| Check
manually | 93   | Only booleans are allowed in an if condition, mixed given.
 |
+----------------+------+-------------------------------------------------------------+
web/modules/contrib/mask/src/Form/SettingsForm.php:
+----------------+------+------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                          |
+----------------+------+------------------------------------------------------------------------------------------------------------------+
| Check
manually | 104  | Only booleans are allowed in a ternary operator condition,
mixed given.
                                         |
| Check
manually | 143  | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
| Check
manually | 154  | Only booleans are allowed in a negated boolean, mixed
given.
                                                    |
| Check
manually | 212  | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
| Check
manually | 335  | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
| Check
manually | 351  | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
| Check
manually | 372  | Only booleans are allowed in an if condition, mixed given.
                                                      |
| Check
manually | 375  | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
| Check
manually | 378  | Short ternary operator is not allowed. Use null coalesce
operator if applicable or consider using long ternary.
 |
| Check
manually | 379  | Short ternary operator is not allowed. Use null coalesce
operator if applicable or consider using long ternary.
 |
| Check
manually | 380  | Short ternary operator is not allowed. Use null coalesce
operator if applicable or consider using long ternary.
 |
| Check
manually | 381  | Short ternary operator is not allowed. Use null coalesce
operator if applicable or consider using long ternary.
 |
| Check
manually | 382  | Short ternary operator is not allowed. Use null coalesce
operator if applicable or consider using long ternary.
 |
| Check
manually | 468  | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
+----------------+------+------------------------------------------------------------------------------------------------------------------+
web/modules/contrib/mask/src/Helper/ElementHelper.php:
+----------------+------+------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                          |
+----------------+------+------------------------------------------------------------------------------------------------------------------+
| Check
manually | 33   | Construct empty() is not allowed. Use more strict
comparison.
                                                   |
| Check
manually | 51   | Short ternary operator is not allowed. Use null coalesce
operator if applicable or consider using long ternary.
 |
+----------------+------+------------------------------------------------------------------------------------------------------------------+
web/modules/contrib/mask/src/Plugin/FieldWidgetPlugin.php:
+----------------+------+----------------------------------------------------------------+
| status         | line | message                                                        |
+----------------+------+----------------------------------------------------------------+
| Check
manually | 172  | Only booleans are allowed in an if condition, mixed given.
    |
| Check
manually | 179  | Construct empty() is not allowed. Use more strict
comparison.
 |
| Check
manually | 180  | Construct empty() is not allowed. Use more strict
comparison.
 |
+----------------+------+----------------------------------------------------------------+
web/modules/contrib/mask/src/Plugin/FieldWidgetPluginManager.php:
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                                                    |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------+
| Check
manually | 40   | Drupal\mask\Plugin\FieldWidgetPluginManager::__construct()
does not call parent constructor from
Drupal\Core\Plugin\DefaultPluginManager.
 |
+----------------+------+--------------------------------------------------------------------------------------------------------------------------------------------+
web/modules/contrib/mask/tests/src/Kernel/LibraryInfoAlterTest.php:
+----------------+------+-------------------------------------------------------------------------------+
| status         | line | message                                                                       |
+----------------+------+-------------------------------------------------------------------------------+
| Check
manually | 54   | Dynamic call to static method
PHPUnit\Framework\Assert::assertCount().
       |
| Check
manually | 55   | Dynamic call to static method
PHPUnit\Framework\Assert::assertArrayHasKey().
 |
| Check
manually | 56   | Dynamic call to static method
PHPUnit\Framework\Assert::assertEquals().
      |
| Check
manually | 57   | Dynamic call to static method
PHPUnit\Framework\Assert::assertTrue().
        |
| Check
manually | 72   | Dynamic call to static method
PHPUnit\Framework\Assert::assertCount().
       |
| Check
manually | 73   | Dynamic call to static method
PHPUnit\Framework\Assert::assertArrayHasKey().
 |
| Check
manually | 74   | Dynamic call to static method
PHPUnit\Framework\Assert::assertEquals().
      |
| Check
manually | 75   | Dynamic call to static method
PHPUnit\Framework\Assert::assertTrue().
        |
| Check
manually | 85   | Dynamic call to static method
PHPUnit\Framework\Assert::assertEmpty().
       |
+----------------+------+-------------------------------------------------------------------------------+
web/modules/contrib/mask/tests/src/Unit/ElementHelperTest.php:
+----------------+------+----------------------------------------------------------------------------+
| status         | line | message                                                                    |
+----------------+------+----------------------------------------------------------------------------+
| Check
manually | 32   | Dynamic call to static method
PHPUnit\Framework\Assert::assertTrue().
     |
| Check
manually | 33   | Construct empty() is not allowed. Use more strict
comparison.
             |
| Check
manually | 33   | Construct empty() is not allowed. Use more strict
comparison.
             |
| Check
manually | 36   | Dynamic call to static method
PHPUnit\Framework\Assert::assertContains().
 |
| Check
manually | 54   | Dynamic call to static method
PHPUnit\Framework\Assert::assertEquals().
   |
| Check
manually | 55   | Dynamic call to static method
PHPUnit\Framework\Assert::assertContains().
 |
| Check
manually | 73   | Construct empty() is not allowed. Use more strict
comparison.
             |
| Check
manually | 73   | Dynamic call to static method
PHPUnit\Framework\Assert::assertTrue().
     |
+----------------+------+----------------------------------------------------------------------------+
web/modules/contrib/mask/tests/src/Unit/FieldWidgetPluginTest.php:
+----------------+------+-------------------------------------------------------------------------------+
| status         | line | message                                                                       |
+----------------+------+-------------------------------------------------------------------------------+
| Check
manually | 33   | Dynamic call to static method
PHPUnit\Framework\Assert::assertArrayHasKey().
 |
| Check
manually | 34   | Dynamic call to static method
PHPUnit\Framework\Assert::assertArrayHasKey().
 |
| Check
manually | 35   | Dynamic call to static method
PHPUnit\Framework\Assert::assertArrayHasKey().
 |
| Check
manually | 36   | Dynamic call to static method
PHPUnit\Framework\Assert::assertArrayHasKey().
 |
| Check
manually | 55   | Implicit array creation is not allowed - variable $context
does not exist.
   |
| Check
manually | 65   | Dynamic call to static method
PHPUnit\Framework\Assert::assertTrue().
        |
| Check
manually | 66   | Construct empty() is not allowed. Use more strict
comparison.
                |
| Check
manually | 66   | Construct empty() is not allowed. Use more strict
comparison.
                |
| Check
manually | 87   | Dynamic call to static method
PHPUnit\Framework\TestCase::any().
             |
| Check
manually | 89   | Dynamic call to static method
PHPUnit\Framework\Assert::equalTo().
           |
| Check
manually | 90   | Dynamic call to static method
PHPUnit\Framework\TestCase::returnValue().
     |
+----------------+------+-------------------------------------------------------------------------------+
web/modules/contrib/mask/tests/src/Unit/MaskUnitTest.php:
+----------------+------+---------------------------------------------------------------------------+
| status         | line | message                                                                   |
+----------------+------+---------------------------------------------------------------------------+
| Check
manually | 61   | Dynamic call to static method
PHPUnit\Framework\TestCase::any().
         |
| Check
manually | 63   | Dynamic call to static method
PHPUnit\Framework\Assert::equalTo().
       |
| Check
manually | 64   | Dynamic call to static method
PHPUnit\Framework\TestCase::returnValue().
 |
| Check
manually | 68   | Dynamic call to static method
PHPUnit\Framework\TestCase::any().
         |
| Check
manually | 70   | Dynamic call to static method
PHPUnit\Framework\Assert::equalTo().
       |
| Check
manually | 71   | Dynamic call to static method
PHPUnit\Framework\TestCase::returnValue().
 |
+----------------+------+---------------------------------------------------------------------------+
web/modules/contrib/mask/mask.info.yml:
+----------------+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| status         | line | message                                                                                                                                            |
+----------------+------+----------------------------------------------------------------------------------------------------------------------------------------------------+
| Check
manually | 5    | Value of core_version_requirement: ^9.2 | ^10 is not
compatible with the next major version of Drupal core. See
https://drupal.org/node/3070687.
 |
+----------------+------+----------------------------------------------------------------------------------------------------------------------------------------------------+

Steps to reproduce

  • Install Drupal 10.3.x
  • Install upgrade_status
  • Scan module

Proposed resolution

ix problems

Remaining tasks

ix problems

User interface changes

-

API changes

-

Data model changes

-

📌 Task
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium tim-diels Belgium 🇧🇪

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024