Skip to content

Commit

Permalink
Merge pull request #622 from magento-frontend/MAGETWO-60832
Browse files Browse the repository at this point in the history
[Frontend] MAGETWO-60832: UI Upgrade Fails from CE 2.1.1 to EE 2.1.3
  • Loading branch information
slavvka authored Nov 28, 2016
2 parents 7186af8 + e858b69 commit ec5a7f5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 128 deletions.
39 changes: 2 additions & 37 deletions app/code/Magento/Store/App/Config/Type/Scopes.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,7 @@

use Magento\Framework\App\Config\ConfigTypeInterface;
use Magento\Framework\App\Config\ConfigSourceInterface;
use Magento\Framework\Cache\FrontendInterface;
use Magento\Framework\DataObject;
use Magento\Store\Model\Group;
use Magento\Store\Model\Store;
use Magento\Store\Model\Website;

/**
* Merge and hold scopes data from different sources
Expand All @@ -32,30 +28,14 @@ class Scopes implements ConfigTypeInterface
*/
private $data;

/**
* @var FrontendInterface
*/
private $cache;

/**
* @var int
*/
private $cachingNestedLevel;

/**
* System constructor.
* @param ConfigSourceInterface $source
* @param FrontendInterface $cache
* @param int $cachingNestedLevel
*/
public function __construct(
ConfigSourceInterface $source,
FrontendInterface $cache,
$cachingNestedLevel = 1
ConfigSourceInterface $source
) {
$this->source = $source;
$this->cache = $cache;
$this->cachingNestedLevel = $cachingNestedLevel;
}

/**
Expand All @@ -64,18 +44,7 @@ public function __construct(
public function get($path = '')
{
if (!$this->data) {
/** @var DataObject $data */
$data = $this->cache->load(self::CONFIG_TYPE);
if (!$data) {
$this->data = new DataObject($this->source->get());
$this->cache->save(
serialize($this->data),
self::CONFIG_TYPE,
[Group::CACHE_TAG, Store::CACHE_TAG, Website::CACHE_TAG]
);
} else {
$this->data = unserialize($data);
}
$this->data = new DataObject($this->source->get());
}

return $this->data->getData($path);
Expand All @@ -89,9 +58,5 @@ public function get($path = '')
public function clean()
{
$this->data = null;
$this->cache->clean(
\Zend_Cache::CLEANING_MODE_MATCHING_TAG,
[Group::CACHE_TAG, Store::CACHE_TAG, Website::CACHE_TAG]
);
}
}
90 changes: 0 additions & 90 deletions app/code/Magento/Store/Test/Unit/App/Config/Type/ScopesTest.php

This file was deleted.

1 change: 0 additions & 1 deletion app/code/Magento/Store/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@
<type name="Magento\Store\App\Config\Type\Scopes">
<arguments>
<argument name="source" xsi:type="object">scopesConfigSourceAggregatedProxy</argument>
<argument name="cache" xsi:type="object">Magento\Framework\App\Cache\Type\Config</argument>
</arguments>
</type>
<virtualType name="scopesConfigSourceAggregatedProxy" type="Magento\Framework\App\Config\ConfigSourceAggregated\Proxy">
Expand Down

0 comments on commit ec5a7f5

Please sign in to comment.