'Replacement for GuzzleHttp\UriTemplateFactory?
I have a plugin (for Magento 2.4.4), it is using the following class "GuzzleHttp\UriTemplateFactory" but "UriTemplateFactory" is deprecated and removed from Guzzle. Looking for a replacement. See code:
use GuzzleHttp\ClientFactory;
use GuzzleHttp\Psr7\ResponseFactory;
use Taxamo\Tax\Logger\Debug\Logger as DebugLogger;
use Taxamo\Tax\Logger\Error\Logger;
use Taxamo\Tax\Model\Api\Body\CalculateTax;
use Taxamo\Tax\Model\Config;
use Taxamo\Tax\Model\Api\Entity\Address;
use GuzzleHttp\UriTemplateFactory;
class CalculateTaxService extends AbstractService
{
const API_REQUEST_ENDPOINT = 'seller/tax/calculate';
protected Body\CalculateTax $calculateTaxBody;
/**
* CalculateTaxService constructor.
* @param ClientFactory $clientFactory
* @param ResponseFactory $responseFactory
* @param Config $config
* @param Logger $errorLogger
* @param DebugLogger $debugLogger
* @param CalculateTax $calculateTaxBody
*/
public function __construct(
ClientFactory $clientFactory,
ResponseFactory $responseFactory,
UriTemplateFactory $uriTemplateFactory,
Config $config,
Logger $errorLogger,
DebugLogger $debugLogger,
CalculateTax $calculateTaxBody
) {
parent::__construct($clientFactory, $responseFactory, $uriTemplateFactory, $config, $errorLogger, $debugLogger);
$this->calculateTaxBody = $calculateTaxBody;
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|