Problem/Motivation

I now have this issue:
Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service [error]
"commerce_invoice.invoice_total_summary": argument "$adjustmentTransformer" of method
"Drupal\commerce_invoice\InvoiceTotalSummary::__construct()" references interface
"Drupal\commerce_order\AdjustmentTransformerInterface" but no such service exists. You should maybe
alias this interface to the existing "commerce_order.adjustment_transformer" service. in
drupal-10.4.x/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php:51

Once the above was fixed I got this one:

Symfony\Component\DependencyInjection\Exception\RuntimeException: Cannot autowire service "commerce_invoice.invoice_confirmation_mail": argument "$mailHandler" of method "Drupal\commerce_invoice\Mail\InvoiceConfirmationMail::__construct()" references interface "Drupal\commerce\MailHandlerInterface" but no such service exists. You should maybe alias this interface to the existing "commerce.mail_handler" service. in Symfony\Component\DependencyInjection\Compiler\DefinitionErrorExceptionPass->process() (line 51 of drupal-10.4.x/vendor/symfony/dependency-injection/Compiler/DefinitionErrorExceptionPass.php).

Steps to reproduce

I honestly cannot pin point it. I updated commerce to commerce 2.x-dev

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

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

socialnicheguru created an issue. See original summary.

socialnicheguru’s picture

Status: Active » Needs review
StatusFileSize
new1.15 KB
socialnicheguru’s picture

StatusFileSize
new651 bytes

That was the wrong patch for the wrong module.

Here is the correct one

jsacksick’s picture

Assigned: Unassigned » jsacksick

Hm, your patch isn't the correct one... Was probably optimistic to make these changes as I didn't realize this would imply forcing requiring Commerce 3.
Can you confirm you're still on Commerce 2?

Will fix this.

  • jsacksick committed c43c6e10 on 8.x-2.x
    Issue #3522599 by jsacksick: Symfony autowire issues
    
jsacksick’s picture

Status: Needs review » Fixed
socialnicheguru’s picture

i am using 2.x-dev so yes commerce 2

socialnicheguru’s picture

OK. so adding autowire in would force the use of commerce 3. I was on commerce 2.x that is why I had to add the patch that I did.

jsacksick’s picture

I fixed this and tagged a new release, updating to 2.2 should fix this.

Status: Fixed » Closed (fixed)

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