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
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 3522599-fix-symfony-autowire-issues.patch | 651 bytes | socialnicheguru |
Issue fork commerce_invoice-3522599
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
Comment #2
socialnicheguru commentedComment #3
socialnicheguru commentedThat was the wrong patch for the wrong module.
Here is the correct one
Comment #4
jsacksick commentedHm, 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.
Comment #7
jsacksick commentedComment #8
socialnicheguru commentedi am using 2.x-dev so yes commerce 2
Comment #9
socialnicheguru commentedOK. 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.
Comment #10
jsacksick commentedI fixed this and tagged a new release, updating to 2.2 should fix this.