문제

Magento 2.3.3 Getting below error when creating plugin for Magento\Ups\Model\Carrier class

1 exception(s): Exception #0 (BadMethodCallException): Missing required argument $data of Magento\Ups\Model\Carrier.

Exception #0 (BadMethodCallException): Missing required argument $data of Magento\Ups\Model\Carrier.

As my understand issue is because of class::__construct last param (newly added in to 2.3.3) $proxyDeferredFactory is not follow compatibility

Magento\Ups\Model\Carrier::__construct (last parameter should be null)

It should be null require

Consider basic knowledge of Plugin!

Welcome suggestion to work with lower MAGENTO version also.

도움이 되었습니까?

해결책

Will be fixed in Magento 2.4. See https://github.com/magento/magento2/commit/cfd5c22848f82f29f69cd42ffbcc8e09fa848568. Workaround: Replace the following line:

?ProxyDeferredFactory $proxyDeferredFactory

with

?ProxyDeferredFactory $proxyDeferredFactory = null

in the constructor arguments

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top