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

Event argument transport is Deprecated: . Use transportObject instead. #804

Closed
Aquive opened this issue Dec 29, 2023 · 2 comments
Closed
Labels
compatibility Compatibility issues feature New feature or request released

Comments

@Aquive
Copy link
Contributor

Aquive commented Dec 29, 2023

Plugin/theme name

Magento Core

What problem does this feature solve?

I wrote an observer which works in normal Magento flow. But when using Myparcel i get errors. This is because event dispatch of email_shipment_set_template_vars_before lacks the Transport object. See also the deprecated warning in the code block below.

What should the solution look like?

This is from the Magento core

        /**
         * Event argument `transport` is @deprecated. Use `transportObject` instead.
         */
        $this->eventManager->dispatch(
            'email_shipment_set_template_vars_before',
            ['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
        );

This is from Myparcel module:

  $this->eventManager->dispatch(
                'email_shipment_set_template_vars_before',
                ['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject]
            );

Relevant log output

No response

Additional context

No response

@Aquive Aquive added compatibility Compatibility issues feature New feature or request labels Dec 29, 2023
@Aquive
Copy link
Contributor Author

Aquive commented Jan 24, 2024

Fixed

@Aquive Aquive closed this as completed Jan 24, 2024
@MyParcelBot
Copy link

🎉 This issue has been resolved in version 4.12.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compatibility Compatibility issues feature New feature or request released
Development

No branches or pull requests

2 participants