Improve guidance for case when phpstan is not found but composer was used

Created on 7 August 2020, over 4 years ago
Updated 12 July 2023, over 1 year ago

Problem/Motivation

error:

Vendor binary path not correct or phpstan is not installed there. Did you install Upgrade Status with composer? Checked: /var/www/html/docroot/vendor/bin/phpstan

Steps to reproduce

  • using ddev multisite
  • core 8.9.3
  • Upgrade Status was installed using composer require 'drupal/upgrade_status:^2.0'
  • upgrade_status module was enable
  • on the Upgrade Status page: /admin/reports/upgrade-status , there is a warning:

Vendor binary path not correct or phpstan is not installed there. Did you install Upgrade Status with composer? Checked: /var/www/html/docroot/vendor/bin/phpstan

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

3.1

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States mario.elias

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡«πŸ‡·France fgm Paris, France

    FWIW, it just started again. I've been working on the same D9 install for over one month and suddenly today it stopped working after a brew upgrade, saying it could not find PHP.

    Stopping the brew php service and restarting it fixed the problem. It seems there is an attempt to find the exact same php binary as the one used to serve the report page, which is not the case when upgrading.

  • πŸ‡«πŸ‡·France fgm Paris, France

    Funnily enough I just had this issue again after Drupal 10.4.2 upgrade and upgrade_status 4.3.6

    The error looked a bit different from the one in the original issue:

    PHPStan command failed:
    
    /(redacted)/vendor/bin/phpstan analyse --memory-limit=1500M --error-format=json --configuration=/tmp/upgrade_status/deprecation_testing.neon /(redacted)/web/modules/contrib/poll
    
    Command output:
    
    Empty.
    
    Command error:
    
    sh: line 0: exec: : not found

    A brew services restart php@8.3 fixed the problem again. Maybe worth suggesting it in the module documentation ?

Production build 0.71.5 2024