Skip to content

Commit 2633933

Browse files
author
Sergii Kovalenko
committed
MAGETWO-56989: Deployment process can't be executed on separate machine
-move deploy static command
1 parent d63bb1f commit 2633933

File tree

3 files changed

+2
-156
lines changed

3 files changed

+2
-156
lines changed

app/code/Magento/Store/App/Config/Type/Scopes.php

Lines changed: 2 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,7 @@
77

88
use Magento\Framework\App\Config\ConfigTypeInterface;
99
use Magento\Framework\App\Config\ConfigSourceInterface;
10-
use Magento\Framework\Cache\FrontendInterface;
1110
use Magento\Framework\DataObject;
12-
use Magento\Framework\Serialize\Serializer\Serialize;
13-
use Magento\Framework\Serialize\SerializerInterface;
14-
use Magento\Store\Model\Group;
15-
use Magento\Store\Model\Store;
16-
use Magento\Store\Model\Website;
1711

1812
/**
1913
* Merge and hold scopes data from different sources
@@ -34,38 +28,14 @@ class Scopes implements ConfigTypeInterface
3428
*/
3529
private $data;
3630

37-
/**
38-
* @var FrontendInterface
39-
*/
40-
private $cache;
41-
42-
/**
43-
* @var int
44-
*/
45-
private $cachingNestedLevel;
46-
47-
/**
48-
* @var Serialize
49-
*/
50-
private $serializer;
51-
5231
/**
5332
* System constructor.
5433
* @param ConfigSourceInterface $source
55-
* @param FrontendInterface $cache
56-
* @param int $cachingNestedLevel
57-
* @param SerializerInterface $serializer
5834
*/
5935
public function __construct(
60-
ConfigSourceInterface $source,
61-
FrontendInterface $cache,
62-
Serialize $serializer,
63-
$cachingNestedLevel = 1
36+
ConfigSourceInterface $source
6437
) {
6538
$this->source = $source;
66-
$this->cache = $cache;
67-
$this->cachingNestedLevel = $cachingNestedLevel;
68-
$this->serializer = $serializer;
6939
}
7040

7141
/**
@@ -74,18 +44,7 @@ public function __construct(
7444
public function get($path = '')
7545
{
7646
if (!$this->data) {
77-
/** @var DataObject $data */
78-
$data = $this->cache->load(self::CONFIG_TYPE);
79-
if (!$data) {
80-
$this->data = new DataObject($this->source->get());
81-
$this->cache->save(
82-
$this->serializer->serialize($this->data->getData()),
83-
self::CONFIG_TYPE,
84-
[Group::CACHE_TAG, Store::CACHE_TAG, Website::CACHE_TAG]
85-
);
86-
} else {
87-
$this->data = new DataObject($this->serializer->unserialize($data));
88-
}
47+
$this->data = new DataObject($this->source->get());
8948
}
9049

9150
return $this->data->getData($path);
@@ -99,9 +58,5 @@ public function get($path = '')
9958
public function clean()
10059
{
10160
$this->data = null;
102-
$this->cache->clean(
103-
\Zend_Cache::CLEANING_MODE_MATCHING_TAG,
104-
[Group::CACHE_TAG, Store::CACHE_TAG, Website::CACHE_TAG]
105-
);
10661
}
10762
}

app/code/Magento/Store/Test/Unit/App/Config/Type/ScopesTest.php

Lines changed: 0 additions & 108 deletions
This file was deleted.

app/code/Magento/Store/etc/di.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,6 @@
332332
<type name="Magento\Store\App\Config\Type\Scopes">
333333
<arguments>
334334
<argument name="source" xsi:type="object">scopesConfigSourceAggregatedProxy</argument>
335-
<argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Config</argument>
336335
</arguments>
337336
</type>
338337
<virtualType name="scopesConfigSourceAggregatedProxy" type="Magento\Framework\App\Config\ConfigSourceAggregated\Proxy">

0 commit comments

Comments
 (0)