Skip to content

phpmd runs into errors #33430

@AntonEvers

Description

@AntonEvers

Preconditions (*)

  1. Install Magento as 2.4-develop

Steps to reproduce (*)

  1. run vendor/bin/phpmd app/code ansi dev/tests/static/testsuite/Magento/Test/Php/_files/phpmd/ruleset.xml

Expected result (*)

  1. Maybe some violations, hopefully no mess

Actual result (*)

Several exceptions, a selection of the output:

Notice: Undefined offset: 0 in /Users/evers/web/AntonEvers/magento2/dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/CookieAndSessionMisuse.php on line 113
PHP Notice:  Undefined offset: 0 in /Users/evers/web/AntonEvers/magento2/dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/CookieAndSessionMisuse.php on line 113

Notice: Undefined offset: 0 in /Users/evers/web/AntonEvers/magento2/dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/CookieAndSessionMisuse.php on line 142
PHP Warning:  class_implements(): Class Magento\Developer\Console\Command\DevTestsRunCommandTest does not exist and could not be loaded in /Users/evers/web/AntonEvers/magento2/dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/AllPurposeAction.php on line 35

Warning: class_implements(): Class Magento\Developer\Console\Command\DevTestsRunCommandTest does not exist and could not be loaded in /Users/evers/web/AntonEvers/magento2/dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/AllPurposeAction.php on line 35
PHP Notice:  Undefined offset: 0 in /Users/evers/web/AntonEvers/magento2/dev/tests/static/framework/Magento/CodeMessDetector/Rule/Design/CookieAndSessionMisuse.php on line 113

ERROR while parsing /Users/evers/web/AntonEvers/magento2/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/DownloadableLinkDataProvider.php
---------------------------------------------------------------------------------------------------------------------------------------------
The parser has reached an invalid state near line "35" in file "/Users/evers/web/AntonEvers/magento2/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/DownloadableLinkDataProvider.php". Please check the following conditions: Mandatory expression expected.

Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.

  • Severity: S0 - Affects critical data or functionality and leaves users without workaround.
  • Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
  • Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
  • Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
  • Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.

Metadata

Metadata

Labels

Component: TestIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P2A defect with this priority could have functionality issues which are not to expectations.Progress: doneProject: Platform HealthReproduced on 2.4.xThe issue has been reproduced on latest 2.4-develop branchSeverity: S3Affects non-critical data or functionality and does not force users to employ a workaround.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions