Closed (fixed)
Project:
Upgrade Status
Version:
4.3.6
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
9 Jul 2025 at 06:21 UTC
Updated:
6 Mar 2026 at 15:50 UTC
Jump to comment: Most recent
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
This line should be commented
This line should be commented
none
none
none
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gábor hojtsyThis 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.
Comment #3
mikemadison commentedHey 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.
Comment #4
gábor hojtsy@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).
Comment #6
gábor hojtsyI'm adding a custom phpstan.neon file with a baseline in the project, similar to other contrib projects. Whatever you use to run phpstan on Drupal codebases should consider these files as Drupal projects may define their own phpstan rules / exceptions. With this Gitlab CI runs phpstan fine. I am also resolving a bunch of the simpler ones in this MR, so it gets closer to be useful. (Not going to fix all since some are related to DrupalFinder deprecations, which probably is better on its own as it may change the compatibility of the project with PHP or Drupal core too).
Comment #7
gábor hojtsyComment #9
gábor hojtsy