I’ve checked the documentation and maybe I’ve missed something.
How do you run commands such as “wp media regenerate” in v4 the right way?
I seem to be able to do it in a hacky way by installing php7.2-mysql and wp-cli globally, but that is really not the ideal way to do it.