Purge 8.x-3.0-beta4 is incompatible with Monolog 8.x-1.0-alpha2. Enabling them together on a fresh Drupal install results in the following error:

Recoverable fatal error: Argument 1 passed to Drupal\purge\Logger\LoggerChannelPartFactory::__construct() must implement interface Drupal\Core\Logger\LoggerChannelInterface, instance of Drupal\monolog\Logger\Logger given, called in /var/www/core/lib/Drupal/Component/DependencyInjection/Container.php on line 268 and defined in Drupal\purge\Logger\LoggerChannelPartFactory->__construct() (line 32 of modules/contrib/purge/src/Logger/LoggerChannelPartFactory.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TravisCarden created an issue. See original summary.

TravisCarden’s picture

Issue summary: View changes
TravisCarden’s picture

Issue summary: View changes
davidwbarratt’s picture

There isn't a reason to require Drupal\Core\Logger\LoggerChannelInterface since this module doesn't use any of the methods defined in that interface. Instead we'll require Psr\Log\LoggerInterface which is the parent of Drupal\Core\Logger\LoggerChannelInterface.

nielsvm’s picture

Working on this.

nielsvm’s picture

Status: Needs review » Fixed
[8.x-3.x 0e9f78a] Issue #2724217 by davidwbarratt, TravisCarden, nielsvm: Incompatibility with Monolog
 Author: davidwbarratt <davidwbarratt@411675.no-reply.drupal.org>
 5 files changed, 23 insertions(+), 24 deletions(-)

Thank you very much for your testing efforts and provided patch. I'm closing the issue as I've comitted a similar patch to the branch that will become release 8.x-3.0-beta5. Please, leave the issue in this status until the version has been released and turned out not to fix the problem, thank you!

I did not rename the $this->loggerChannelPurge member as its name is actually reflective of what it is, the general log stream for the entirety of purge and its submodules. Therefore this rename would have been very confusing, as subparts of the Purge framework are supposed to use the partchannels for their respective units.

  • nielsvm committed 0e9f78a on 8.x-3.x authored by davidwbarratt
    Issue #2724217 by davidwbarratt, TravisCarden, nielsvm: Incompatibility...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.