Created on 7 February 2023, over 1 year ago
Updated 15 February 2023, over 1 year ago

Problem/Motivation

When using PHP8.0 there are error messages that cause the reports to fail to generate.

Steps to reproduce

Using a local installation I have setup the site with ddev
ddev config --php-version=7.4
Visit: /admin/reports/upgrade-audit
Click to Generate the Audit report
Report is generated as expected.

ddev config --php-version=8.0
ddev restart

Visit: /admin/reports/upgrade-audit
Click to Generate the Audit report
View the error messages that are generated

Error: Undefined constant "smr_summary" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).
Error: Undefined constant "smr_basic_information" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).
Error: Undefined constant "smr_content" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).
Error: Undefined constant "smr_modules" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).
Error: Undefined constant "smr_theme" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).
Error: Undefined constant "smr_users" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).
Error: Undefined constant "smr_crons" in eval() (line 1 of /var/www/html/vendor/drush/drush/commands/core/core.drush.inc(1178) : eval()'d code).

Proposed resolution

Fix the code to allow the reports to generate as expected

Remaining tasks

Code changes
Reviewing
Merging

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

RTBC

Version

2.1

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom the_g_bomb

Live updates comments and jobs are added and updated live.
  • PHP 8.0

    The issue particularly affects sites running on PHP version 8.0.0 or later.

  • PHP 8.1

    The issue particularly affects sites running on PHP version 8.1.0 or later.

Sign in to follow issues

Comments & Activities

  • Issue created by @the_g_bomb
  • πŸ‡ΊπŸ‡¦Ukraine i-trokhanenko Lutsk πŸ‡ΊπŸ‡¦

    +1
    I have the same issue with PHP 8

  • @the_g_bomb opened merge request.
  • πŸ‡¬πŸ‡§United Kingdom the_g_bomb

    The above MR includes fixes that will solve πŸ› Error: Required parameter $context follows optional parameter $format RTBC

  • Assigned to i-trokhanenko
  • Status changed to Needs review over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine i-trokhanenko Lutsk πŸ‡ΊπŸ‡¦
  • Issue was unassigned.
  • Status changed to RTBC over 1 year ago
  • πŸ‡ΊπŸ‡¦Ukraine i-trokhanenko Lutsk πŸ‡ΊπŸ‡¦

    The MR-4 works well for me, tested with PHP 8.0.26 and Drupal 7.94. Making RTBC, please commit.
    Thanks Gareth for the quick fix!

  • πŸ‡¨πŸ‡¦Canada joelpittet Vancouver

    The MR is against the 1.0.x branch it should be on a 7.x-2.x-dev branch that doesn't exist. Not sure what to do but bump the version here.

    Sorry, I think I sound grumpy... I'll go drink some coffee :D

    The merge request fixes the fatal due to the require method called twice by drush when trying to enable the module so bumping the priority.

    PHP Fatal error: Cannot redeclare site_migration_report_drush_command() (previously declared in /var/www/html/public/sites/all/modules/dev/upgrade_audit/site_migration_report.drush.inc:25) in /var/www/html/public/sites/all/modules/dev/upgrade_audit/site_migration_report.drush.inc on line 25

Production build 0.69.0 2024