When visiting /admin/reports/upgrade-status with upgrade_status 5.0.x-alpha installed, the following fatal error is thrown:
Error: Class "DrupalFinder\DrupalFinderComposerRuntime" not found in
Drupal\upgrade_status\DeprecationAnalyzer->initEnvironment()
(line 224 of modules/contrib/upgrade_status/src/DeprecationAnalyzer.php).
Cause
DeprecationAnalyzer now uses DrupalFinder\DrupalFinderComposerRuntime, which was introduced in webflo/drupal-finder 1.3.0. However, the module's composer.json declares the dependency as "webflo/drupal-finder": "^1.2", which allows Composer to resolve version 1.2.x where this class does not exist.
Projects that have webflo/drupal-finder pinned to 1.2.x will hit this error.
Steps to reproduce
- Have
webflo/drupal-finderat version 1.2.x installed (e.g. pinned in your root composer.json). - Install
drupal/upgrade_status:^5.0@alpha. - Visit
/admin/reports/upgrade-status.
Fix
Update webflo/drupal-finder to ^1.3:
composer require "webflo/drupal-finder:^1.3" --update-with-dependencies
After running this, clear Drupal's cache:
drush cache:rebuild
Note for DDEV users: Even after updating the package and rebuilding caches, you may still see the error if OPcache in the web container is serving stale data. If the error persists after drush cache:rebuild, a full DDEV restart is required to flush OPcache:
ddev restart
Issue fork upgrade_status-3576798
Show commands
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 #4
nickolajUpdated composer.json to require `webflo/drupal-finder: ^1.3` instead of `^1.2`, since the `DrupalFinderComposerRuntime` class used in `DeprecationAnalyzer.php` was introduced in 1.3.0.
Comment #5
dallen33 commentedFix works great for me.