Problem/Motivation
Upgrade status reports the following warnings that I would like to understand and if necessary know how to troubleshoot. I have this warning a lot.
web/PHPStan failed
/usr/bin/php /var/www/vendor/bin/phpstan analyse --memory-limit=1500M --error-format=json --configuration=/tmp/upgrade_status/deprecation_testing.neon /www/web/modules/somemodule
Command output:
No! This is not for you! Your Drupal installation does not support utf8mb4. Have a fruitless look at https://www.drupal.org/docs/7/api/schema-api/data-types/encoding-collati... and then forget this module.Caught exception: \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container.
Command error:
Empty.
What does it refer to? Character SET of the tables? Collation? a module's file format?
Comments
Comment #2
gábor hojtsyIs this included in the error like this?
Comment #3
maxilein commentedyes
Comment #4
gábor hojtsyGoogling for that specific error message it comes up from https://www.drupal.org/forum/support/module-development-and-code-questio..., looks like you either use that custom module or someone very strongly got inspired by that code (copy-pasted it). This would be output when that code is run (since it echos and dies). The container in this case is not yet initiatialized because the error happens in a global context while the codebase is being assembled. Look at your own site codebase to find this code.
Comment #5
maxilein commentedThank you very much.
I found it in the wayback filer module.
I will move the issue there.
Comment #6
maxilein commentedThere seems to be an incomplete install routine (in \wayback_filter\wayback_filter.install) that causes errors when running upgrade_status.
Why do you need this routine?
Was it copied from somewhere and forgotten or does it fullfill a purpose?
Comment #7
steven snedker commentedI'm so sorry for
a) Not seeing this until now
b) Making such a shoddy error message
The utf8mb4 check in the install file has now been vastly improved.
Is it still useful?
My guess is that 99% of people running Drupal 10, 11 do it on a database using utf8mb4.
Yet, I made a utf8mb4 check in the install file in order to save the few poor souls not using utf8mb4 from a White Screen of Death upon installation.
Phpstan should not choke on version 1.2.1. My apologies for the old, shoddy version.
Comment #8
steven snedker commentedSolved by v1.2.1.
Comment #10
maxilein commentedthank you!