PHPStan command failed in Drupal 10 compatibility check

Created on 3 November 2023, about 1 year ago
Updated 2 July 2024, 5 months ago

Problem/Motivation

We are looking into upgrading Drupal 9 to Drupal 10. There are a set of similar custom modules which are flagged by Upgrade Status as 'Fix Manually'. If you look at the local scan result, each one has an identical problem.

web/PHPStan failed

PHPStan command failed:
/opt/alt/php81/usr/bin/php-cgi /home/limestonedouglas/test/vendor/bin/phpstan analyse --memory-limit=1500M --error-format=json --configuration=/tmp/upgrade_status/deprecation_testing.neon /home/limestonedouglas/test/web/modules/custom/ddw_d9_config

Command output:
X-Powered-By: PHP/8.1.24 Cache-Control: must-revalidate, no-cache, private Date: Fri, 03 Nov 2023 17:58:24 GMT Content-Type: application/json X-UA-Compatible: IE=edge Content-language: en X-Content-Type-Options: nosniff X-Frame-Options: SAMEORIGIN Expires: Sun, 19 Nov 1978 05:00:00 GMT X-Generator: Drupal 9 (https://www.drupal.org) {"status":true,"percentage":"9","message":"Completed 1 of 11.","label":"Analysis complete for ddw_d9_config."}

Command error:
Empty.

Any ideas on what might be causing this? The modules are "Local 10 ready" but they are custom, non-applicable modules in terms of drupal.org status.

Steps to reproduce

You'd have to have these custom modules enabled to reproduce. Perhaps this issue has come up before with custom modules.

πŸ’¬ Support request
Status

Active

Version

4.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rraney

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

Comments & Activities

  • Issue created by @rraney
  • Is there a ddw_d9_config.module file? I had a PHPStan problem with some of my custom modules, but adding an empty .module file fixed it.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    The custom modules have PHP/module files so adding a .module file doesn't seem like it would help in my case.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    I am getting the same error with Drupal 9 scanning my custom modules for Drupal 10.

    PhpStan fails and the command error is always empty. This happens for all my modules.

    PHP 8.1.13

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    I'm forced to simply ignore the Upgrade Status response to custom modules in the process of Drupal 10 upgrade.

  • πŸ‡ΊπŸ‡ΈUnited States loze Los Angeles

    Actually, It works using drush, I only get the error when scanning using the UI.

    drush us-a --all --ignore-contrib --ignore-uninstalled

  • πŸ‡«πŸ‡·France nicolas bouteille

    thank you for the tip, it works much better indeed!

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Interesting that the HTTP headers are included in the error message. Otherwise that looks like a normal progress AJAX response. The problem with the "missing .module file" has been resolved, you don't need an empty PHP file for PHPStan checking to pass anymore. That may be useful for people posting on this issue.

Production build 0.71.5 2024