Fixed
Project:
Commerce Core
Version:
3.3.5
Component:
Other
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Apr 2026 at 12:37 UTC
Updated:
8 May 2026 at 11:45 UTC
Jump to comment: Most recent
Upgrading from 3.3.4 to 3.3.5 I get the following error when trying to run drush updb after the composer update:
Circular reference detected for service "Drupal\Core\Logger\LoggerChannelFactoryInterface", path: "asset.js.collection_optimizer -> asset.js.optimizer -> logger.channel.default -> Drupal\Core\Logger\LoggerChannelFactoryInterface ->
logger.watchdog_mailer -> Drupal\commerce\Hook\CommerceHooks -> commerce.inbox_message_fetcher -> commerce.logger".
drush cr does NOT help.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
anybody#3582355: Circular reference detected looks similar but different!
Comment #3
anybodyMaybe lazy-loading the logger is an alternative? Unsure if there's a pattern to solve this...?
Comment #5
anybodyphpstan won't be happy...
Comment #6
anybodyComment #7
jsacksick commentedHow come I never experience this on my installs... I wasn't affected by any of these related bugs in the projects I've upgraded...
This never seems to end.
Comment #8
jsacksick commentedSee CommerceCartHooks for a pattern you can follow, using the AutowireServiceClosure. Also, there is absolutely no reason for this to break from 3.3.5 and not from 3.3.4.
Comment #9
anybody@jsacksick looking at the entries this only seems to happen with custom logger. Yeah had similar issues in core in the past...
I understand, but I can for sure tell it happened...
Comment #10
jsacksick commentedAre you going to test the change suggested?
Comment #12
anybody@jsacksick yes, thanks!!
Like this? (MR!679)
Comment #13
davidwhthomas commentedJust noting a similar error for me too after updating from 3.1.0 => 3.3.5, with WSOD:
Looking forward to the fix.
Comment #14
davidwhthomas commentedUpgrading to critical because the site is completely dead with WSOD because of this error.
Comment #15
davidwhthomas commentedThe patch in MR!678 fixes the issue. I understand it may not be the final fix but works as a workaround to get the site running again.
Comment #16
davidwhthomas commented@anybody, thanks for your help with this. I added
use Symfony\Component\DependencyInjection\Attribute\AutowireServiceClosure;to MR!679 to fix the phpunit pipeline errors previously seen in https://git.drupalcode.org/issue/commerce-3587604/-/jobs/9603253Comment #17
davidwhthomas commentedComment #19
anybodyThanks @davidwhthomas. Does MR!679 also fix the issue entirely for you? For us it does now. Thank you for your help, very busy days...
RTBC from my side, if it's fine for you both!
Comment #20
davidwhthomas commentedYou're welcome, thanks for your help too. Yes MR!679 now also fixes the issue as well, looks better!
Comment #22
jsacksick commentedComment #24
davidwhthomas commentedThanks @jsacksick!