- 🇦🇲Armenia murz Yerevan, Armenia
The actual source of this specific issue is the Drupal Core issue 🐛 [warning] No configuration objects have been updated. Needs work that got reverted for some reason.
But the general issue with this - is that the stdout output can be mixed with any output, which causes the JSON parsing issues in many Drush commands.
Actually, this happens not only with JSON-formatted logs, but for any log style that outputs to stdout (for example, by this module: https://www.drupal.org/project/log_stdout → ).
But for non-json output this issue in most cases doesn't produce the fatal error, because Drush tries to remove non-json output using this trick:
$result = $process->getOutputAsJson();
that uses under the hood the function
Consolidation\SiteProcess\ProcessBase::getOutputAsJson()
which uses a trick to remove non-json prefixes and suffixes in the functionProcessBase::removeNonJsonJunk()
.This is why it doesn't cause errors on non-json-formatted logs in most cases, until the log record doesn't have the
{
symbol.