Uncommented String on test modules

Created on 9 July 2025, 25 days ago

Problem/Motivation

Steps to reproduce

Go to application/web/modules/contrib/upgrade_status/tests/modules/upgrade_status_test_fatal/fatal.php
there is a non commented string "Fatal error" at line: 5

Proposed resolution

This line should be commented

Remaining tasks

This line should be commented

User interface changes

none

API changes

none

Data model changes

none

๐Ÿ› Bug report
Status

Active

Version

4.3

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia piyush.sharma0985

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

  • Issue created by @piyush.sharma0985
  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    This is intended to cause a fatal error, that is what is being tested that Upgrade Status does not collapse on scanning a module with a PHP fatal error in it :) So not sure what you mean here? If we would comment out that line it would not cause the fatal error that we need.

  • ๐Ÿ‡บ๐Ÿ‡ธUnited States mikemadison Seattle, WA

    Hey Gabor, when I'm trying to run PHPStan and Drupal Check and other tools on my contrib modules, they are all erring out on this specific test. I think your "fatal error" test is working a bit too well, unfortunately.

    Not sure what we need to do to allow your fatal error testing to work, but what you're doing now is making a bunch of other automated scanning tools impossible in CI.

  • ๐Ÿ‡ญ๐Ÿ‡บHungary Gรกbor Hojtsy Hungary

    @mikemadison: For example with PHPStan, you can ignore errors or whole files and directories: https://phpstan.org/user-guide/ignoring-errors#excluding-whole-files, so you would run your tool in CI with configuration that ignores the test files of Upgrade Status. (You would probably want to ignore tests of contributed and core modules in general to speed up your CI, even if you want to keep checking tests of your own custom modules).

Production build 0.71.5 2024