Skip to content

Commit 089e77a

Browse files
committed
FIX optional constructor parameter for backward compatiblity
1 parent a63a3b5 commit 089e77a

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010
namespace Magento\Framework\Webapi;
1111

12-
use Magento\Framework\Webapi\ServiceTypeToEntityTypeMap;
1312
use Magento\Framework\Api\AttributeValue;
1413
use Magento\Framework\Api\AttributeValueFactory;
1514
use Magento\Framework\Api\SimpleDataObjectConverter;
1615
use Magento\Framework\Exception\InputException;
1716
use Magento\Framework\Exception\SerializationException;
17+
use Magento\Framework\ObjectManager\ConfigInterface;
1818
use Magento\Framework\ObjectManagerInterface;
1919
use Magento\Framework\Phrase;
2020
use Magento\Framework\Reflection\MethodsMap;
@@ -68,7 +68,7 @@ class ServiceInputProcessor implements ServicePayloadConverterInterface
6868
private $serviceTypeToEntityTypeMap;
6969

7070
/**
71-
* @var \Magento\Framework\ObjectManager\ConfigInterface
71+
* @var ConfigInterface
7272
*/
7373
private $config;
7474

@@ -80,7 +80,7 @@ class ServiceInputProcessor implements ServicePayloadConverterInterface
8080
* @param AttributeValueFactory $attributeValueFactory
8181
* @param CustomAttributeTypeLocatorInterface $customAttributeTypeLocator
8282
* @param MethodsMap $methodsMap
83-
* @param \Magento\Framework\ObjectManager\ConfigInterface $config
83+
* @param ConfigInterface $config
8484
* @param ServiceTypeToEntityTypeMap $serviceTypeToEntityTypeMap
8585
*/
8686
public function __construct(
@@ -89,7 +89,7 @@ public function __construct(
8989
AttributeValueFactory $attributeValueFactory,
9090
CustomAttributeTypeLocatorInterface $customAttributeTypeLocator,
9191
MethodsMap $methodsMap,
92-
\Magento\Framework\ObjectManager\ConfigInterface $config,
92+
ConfigInterface $config = null,
9393
ServiceTypeToEntityTypeMap $serviceTypeToEntityTypeMap = null
9494
) {
9595
$this->typeProcessor = $typeProcessor;
@@ -99,7 +99,8 @@ public function __construct(
9999
$this->methodsMap = $methodsMap;
100100
$this->serviceTypeToEntityTypeMap = $serviceTypeToEntityTypeMap
101101
?: \Magento\Framework\App\ObjectManager::getInstance()->get(ServiceTypeToEntityTypeMap::class);
102-
$this->config = $config;
102+
$this->config = $config
103+
?: \Magento\Framework\App\ObjectManager::getInstance()->get(ConfigInterface::class);
103104
}
104105

105106
/**

0 commit comments

Comments
 (0)