WP_CLI::error() doesn't always terminate
Opened this issue · 2 comments
johnbillion commented
The WP_CLI::error()
method is marked as an early terminating method, but it doesn't terminate if the $exit
parameter is set to false
.
Its entry in the earlyTerminatingMethodCalls
config should be removed and replaced with something else that's conditional, but I'm not sure what.
szepeviktor commented
I tell you not to use that $exit
parameter.
Just like
Line 119 in f7ff091
It feels really-really bad to handle these parts of WordPress.
That is all I could contribute.
herndlm commented
a conditional return type using https://phpstan.org/writing-php-code/phpdoc-types#bottom-type in stubs might work 🤔 https://phpstan.org/r/cf63373b-41ba-4298-9639-26051d6eb5fb