Skip to content

Commit 2ee6dbf

Browse files
author
Igor Melnikov
committed
MAGETWO-60442: Add optional SerializerInterface dependency to child classes of \Magento\Framework\Config\Data
Adding class and __constructor descriptions
1 parent 57b33ce commit 2ee6dbf

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

dev/tests/integration/etc/install-config-mysql.php.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
return [
88
'db-host' => 'localhost',
99
'db-user' => 'root',
10-
'db-password' => 'vagrant',
10+
'db-password' => '123123q',
1111
'db-name' => 'magento_integration_tests',
1212
'db-prefix' => '',
1313
'backend-frontname' => 'backend',

lib/internal/Magento/Framework/App/ResourceConnection/Config.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ class Config extends \Magento\Framework\Config\Data\Scoped implements ConfigInte
2121
protected $_connectionNames = [];
2222

2323
/**
24+
* Constructor
25+
*
2426
* @param Config\Reader $reader
2527
* @param \Magento\Framework\Config\ScopeInterface $configScope
2628
* @param \Magento\Framework\Config\CacheInterface $cache

lib/internal/Magento/Framework/Config/Data.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class Data implements \Magento\Framework\Config\DataInterface
6868
/**
6969
* @var SerializerInterface
7070
*/
71-
protected $serializer;
71+
private $serializer;
7272

7373
/**
7474
* Constructor

lib/internal/Magento/Framework/Config/Data/Scoped.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ class Scoped extends \Magento\Framework\Config\Data
5555
*/
5656
protected $_loadedScopes = [];
5757

58+
/**
59+
* @var SerializerInterface
60+
*/
61+
private $serializer;
62+
5863
/**
5964
* Constructor
6065
*

lib/internal/Magento/Framework/Interception/PluginList/PluginList.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ class PluginList extends Scoped implements InterceptionPluginList
8282
*/
8383
private $logger;
8484

85+
/**
86+
* @var SerializerInterface
87+
*/
88+
private $serializer;
89+
8590
/**
8691
* Constructor
8792
*
@@ -111,8 +116,8 @@ public function __construct(
111116
$cacheId = 'plugins',
112117
SerializerInterface $serializer = null
113118
) {
114-
$serializer = $serializer ?: $objectManager->get(Serialize::class);
115-
parent::__construct($reader, $configScope, $cache, $cacheId, $serializer);
119+
$this->serializer = $serializer ?: $objectManager->get(Serialize::class);
120+
parent::__construct($reader, $configScope, $cache, $cacheId, $this->serializer);
116121
$this->_omConfig = $omConfig;
117122
$this->_relations = $relations;
118123
$this->_definitions = $definitions;

0 commit comments

Comments
 (0)