Problem/Motivation
While running it, I'm receiving this error almost to any module while processing:
[error] Error: Call to undefined method Drupal\upgrade_status\DeprecationMessage::setFile() in Drupal\upgrade_status\LibraryDeprecationAnalyzer->analyzeLibraryDependencies() (line 150 of /var/www/html/web/modules/contrib/upgrade_status/src/LibraryDeprecationAnalyzer.php) #0 /var/www/html/web/modules/contrib/upgrade_status/src/LibraryDeprecationAnalyzer.php(96): Drupal\upgrade_status\LibraryDeprecationAnalyzer->analyzeLibraryDependencies()
#1 /var/www/html/web/modules/contrib/upgrade_status/src/DeprecationAnalyzer.php(456): Drupal\upgrade_status\LibraryDeprecationAnalyzer->analyze()
#2 /var/www/html/web/modules/contrib/upgrade_status/src/Drush/Commands/UpgradeStatusCommands.php(394): Drupal\upgrade_status\DeprecationAnalyzer->analyze()
#3 /var/www/html/web/modules/contrib/upgrade_status/src/Drush/Commands/UpgradeStatusCommands.php(137): Drupal\upgrade_status\Drush\Commands\UpgradeStatusCommands->doAnalyze()
#4 [internal function]: Drupal\upgrade_status\Drush\Commands\UpgradeStatusCommands->analyze()
#5 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(276): call_user_func_array()
#6 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(212): Consolidation\AnnotatedCommand\CommandProcessor->runCommandCallback()
#7 /var/www/html/vendor/consolidation/annotated-command/src/CommandProcessor.php(175): Consolidation\AnnotatedCommand\CommandProcessor->validateRunAndAlter()
#8 /var/www/html/vendor/consolidation/annotated-command/src/AnnotatedCommand.php(389): Consolidation\AnnotatedCommand\CommandProcessor->process()
#9 /var/www/html/vendor/symfony/console/Command/Command.php(326): Consolidation\AnnotatedCommand\AnnotatedCommand->execute()
#10 /var/www/html/vendor/symfony/console/Application.php(1121): Symfony\Component\Console\Command\Command->run()
#11 /var/www/html/vendor/drush/drush/src/Application.php(201): Symfony\Component\Console\Application->doRunCommand()
#12 /var/www/html/vendor/symfony/console/Application.php(324): Drush\Application->doRunCommand()
#13 /var/www/html/vendor/symfony/console/Application.php(175): Symfony\Component\Console\Application->doRun()
#14 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(113): Symfony\Component\Console\Application->run()
#15 /var/www/html/vendor/drush/drush/src/Runtime/Runtime.php(40): Drush\Runtime\Runtime->doRun()
#16 /var/www/html/vendor/drush/drush/drush.php(140): Drush\Runtime\Runtime->run()
#17 /var/www/html/vendor/bin/drush.php(119): include('...')
#18 {main}.
I was checking the Class: upgrade_status/src/DeprecationMessage.php
And it really does not have that method so I'm not sure why the Class upgrade_status/src/LibraryDeprecationAnalyzer.php calls it after checking if is an instance DeprecationMessage:
if ($is_deprecated instanceof DeprecationMessage) {
$is_deprecated->setFile($file->getPathName());
$deprecations[] = $is_deprecated;
}
Versions:
PHP: 8.3
drupal/core: 10.6.12
drupal/core-dev: 10.6.12
drupal/upgrade_status: 4.3.10
Modules I notice the issue:
addtocal
better_exposed_filters
better_social_sharing_buttons
bootstrap_styles.
I stop trying to add modules to ignore so I stop scanning, maybe more modules would trigger it.
Issue fork upgrade_status-3607698
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 #2
aurora.luzzardiIt seems that this commit: https://git.drupalcode.org/project/upgrade_status/-/commit/886b95ee359e5... removed setFile and setLine as phpcs did not found directly pointing to it, but probably they it have some usage.
Comment #5
gábor hojtsysetLine indeed does not seem to be used. setFile is though
I'm wondering why we had no test coverage of those cases, are they for older Drupal versions?!
Comment #6
gábor hojtsyOk test only properly fails, fix with test works. Looks good. Thanks for reporting!
Comment #8
gábor hojtsyComment #10
gábor hojtsyReleased in https://www.drupal.org/project/upgrade_status/releases/5.0.0-alpha3 just now. Hope its good!