Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.3-develop][Forwardport] Transport variable can not be altered in email_invoice_set_template_vars_before Event #15039

Merged
merged 1 commit into from
May 20, 2018

Conversation

gwharton
Copy link
Contributor

@gwharton gwharton commented May 7, 2018

Fix missing commits from #10210 Transport variable can not be altered in email_invoice_set_template_vars_before Event

Description

Original commit in #10210 missed updates to the /app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php file

Fixed Issues (if relevant)

  1. Transport variable can not be altered in email_invoice_set_template_vars_before Event #10210

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

Add missing commits for \app\code\Magento\Sales\Model\Order\Email\Sender\OrderSender.php
@VladimirZaets
Copy link
Contributor

Hi, @gwharton , I took your PR into processing, thank you for collaboration.

$this->eventManager->dispatch(
'email_order_set_template_vars_before',
['sender' => $this, 'transport' => $transport]
['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, @gwharton, due to Magento backward-compatible guide we can't rename or remove event arguments or change their type.

Adding the new arguments is allowed. If it doesn't help, you can introduce new event argument with new name or type and deprecate the old argument by adding @deprecated annotation before dispatching the event

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is what has been done. $transport = $transportObject->getData() therefore the original arguments have not changed type or name. We introduce a new argument $transportObject

@magento-engcom-team
Copy link
Contributor

Hi @gwharton. Thank you for your contribution.
Changes from your Pull Request will be available with the upcoming 2.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants