Run any Drush command results in:
PHP Fatal error: Cannot use Drupal\Component\Utility\Html as Html because the name is already in use in /mnt/wsl/PHYSICALDRIVE0p1/www/unctad/target/web/modules/contrib/file_download/modules/file_download_counter/file_download_counter.module on line 11
Drupal 10.1.5
PHP 8.1.18
Comments
Comment #2
webfaqtory commentedComment #3
shelaneI have the file_download and file_download_counter modules enabled on Drupal 10.1.5 and PHP 8.1.14. I have run several drush commands without any errors reported. What commands are you running that you're encountering this?
Comment #4
webfaqtory commentedJust upgraded again from 1.5 to 1.6 and it's worse than just Drush. The site fails to load with a 500 error. In the apache error log there is the same error.
Previously I hadn't even tried the site due to the error from a drush cr
In the .theme file there is
use Drupal\Component\Utility\Html;Also in THEME_preprocess_html there is
I suggest you try using
Drupal\Component\Utility\Htmlin your .theme file to get the errorComment #5
shelaneThe class uses have been moved to a Hook class and should not have a conflict. Look for this in a coming release.
Comment #6
shelane