Skip to content

Commit

Permalink
Merge remote-tracking branch 'main_ce/develop' into static_tests
Browse files Browse the repository at this point in the history
Conflicts:
	dev/tests/unit/testsuite/Magento/Store/Model/App/EmulationTest.php
	lib/internal/Magento/Framework/Validator/Factory.php
  • Loading branch information
dkvashninbay committed Jan 23, 2015
2 parents 11a30c1 + 46c48d3 commit 783d706
Show file tree
Hide file tree
Showing 43 changed files with 630 additions and 240 deletions.
6 changes: 3 additions & 3 deletions app/code/Magento/Backup/Model/Backup.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
namespace Magento\Backup\Model;

use Magento\Framework\App\Filesystem\DirectoryList;
use Magento\Framework\Filesystem\DriverPool;

/**
* Backup file item model
Expand Down Expand Up @@ -293,11 +294,10 @@ public function open($write = false)

try {
/** @var \Magento\Framework\Filesystem\Directory\WriteInterface $varDirectory */
$varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR);
$varDirectory = $this->_filesystem->getDirectoryWrite(DirectoryList::VAR_DIR, DriverPool::ZLIB);
$this->_stream = $varDirectory->openFile(
$this->_getFilePath(),
$mode,
\Magento\Framework\Filesystem\DriverPool::ZLIB
$mode
);
} catch (\Magento\Framework\Filesystem\FilesystemException $e) {
throw new \Magento\Framework\Backup\Exception\NotEnoughPermissions(
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Customer/Model/Resource/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
class Address extends \Magento\Eav\Model\Entity\AbstractEntity
{
/**
* @var \Magento\Core\Model\Validator\Factory
* @var \Magento\Framework\Validator\Factory
*/
protected $_validatorFactory;

Expand All @@ -28,7 +28,7 @@ class Address extends \Magento\Eav\Model\Entity\AbstractEntity
* @param \Magento\Framework\Locale\FormatInterface $localeFormat
* @param \Magento\Eav\Model\Resource\Helper $resourceHelper
* @param \Magento\Framework\Validator\UniversalFactory $universalFactory
* @param \Magento\Core\Model\Validator\Factory $validatorFactory
* @param \Magento\Framework\Validator\Factory $validatorFactory
* @param \Magento\Customer\Model\CustomerFactory $customerFactory
* @param array $data
*/
Expand All @@ -39,7 +39,7 @@ public function __construct(
\Magento\Framework\Locale\FormatInterface $localeFormat,
\Magento\Eav\Model\Resource\Helper $resourceHelper,
\Magento\Framework\Validator\UniversalFactory $universalFactory,
\Magento\Core\Model\Validator\Factory $validatorFactory,
\Magento\Framework\Validator\Factory $validatorFactory,
\Magento\Customer\Model\CustomerFactory $customerFactory,
$data = []
) {
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Customer/Model/Resource/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
{
/**
* @var \Magento\Core\Model\Validator\Factory
* @var \Magento\Framework\Validator\Factory
*/
protected $_validatorFactory;

Expand All @@ -38,7 +38,7 @@ class Customer extends \Magento\Eav\Model\Entity\AbstractEntity
* @param \Magento\Eav\Model\Resource\Helper $resourceHelper
* @param \Magento\Framework\Validator\UniversalFactory $universalFactory
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Core\Model\Validator\Factory $validatorFactory
* @param \Magento\Framework\Validator\Factory $validatorFactory
* @param \Magento\Framework\Stdlib\DateTime $dateTime
* @param array $data
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
Expand All @@ -51,7 +51,7 @@ public function __construct(
\Magento\Eav\Model\Resource\Helper $resourceHelper,
\Magento\Framework\Validator\UniversalFactory $universalFactory,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Core\Model\Validator\Factory $validatorFactory,
\Magento\Framework\Validator\Factory $validatorFactory,
\Magento\Framework\Stdlib\DateTime $dateTime,
$data = []
) {
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Email/Model/AbstractTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
protected $_design = null;

/**
* @var \Magento\Core\Model\App\Emulation
* @var \Magento\Store\Model\App\Emulation
*/
protected $_appEmulation;

Expand All @@ -69,15 +69,15 @@ abstract class AbstractTemplate extends AbstractModel implements TemplateTypesIn
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Registry $registry
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param array $data
*/
public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Registry $registry,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
\Magento\Store\Model\StoreManagerInterface $storeManager,
array $data = []
) {
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Email/Model/BackendTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class BackendTemplate extends Template
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Registry $registry
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\View\Asset\Repository $assetRepo
Expand All @@ -38,7 +38,7 @@ public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Registry $registry,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\Filesystem $filesystem,
\Magento\Framework\View\Asset\Repository $assetRepo,
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Email/Model/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate implements \Magento
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Registry $registry
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\Filesystem $filesystem
* @param \Magento\Framework\View\Asset\Repository $assetRepo
Expand All @@ -173,7 +173,7 @@ public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Registry $registry,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
StoreManagerInterface $storeManager,
\Magento\Framework\Filesystem $filesystem,
\Magento\Framework\View\Asset\Repository $assetRepo,
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Newsletter/Model/Queue.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class Queue extends \Magento\Email\Model\AbstractTemplate
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Registry $registry
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Newsletter\Model\Template\Filter $templateFilter
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate
Expand All @@ -131,7 +131,7 @@ public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Registry $registry,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Newsletter\Model\Template\Filter $templateFilter,
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $localeDate,
Expand Down
4 changes: 2 additions & 2 deletions app/code/Magento/Newsletter/Model/Template.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Template extends \Magento\Email\Model\AbstractTemplate
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Registry $registry
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Framework\App\RequestInterface $request
* @param \Magento\Newsletter\Model\Template\Filter $filter
Expand All @@ -108,7 +108,7 @@ public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Registry $registry,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Framework\App\RequestInterface $request,
\Magento\Newsletter\Model\Template\Filter $filter,
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/Payment/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
/**
* App emulation model
*
* @var \Magento\Core\Model\App\Emulation
* @var \Magento\Store\Model\App\Emulation
*/
protected $_appEmulation;

Expand All @@ -69,7 +69,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param LayoutFactory $layoutFactory
* @param \Magento\Payment\Model\Method\Factory $paymentMethodFactory
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Payment\Model\Config $paymentConfig
* @param \Magento\Framework\App\Config\Initial $initialConfig
*/
Expand All @@ -78,7 +78,7 @@ public function __construct(
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
LayoutFactory $layoutFactory,
\Magento\Payment\Model\Method\Factory $paymentMethodFactory,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
\Magento\Payment\Model\Config $paymentConfig,
\Magento\Framework\App\Config\Initial $initialConfig
) {
Expand Down
6 changes: 3 additions & 3 deletions app/code/Magento/ProductAlert/Model/Email.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
protected $customerRepository;

/**
* @var \Magento\Core\Model\App\Emulation
* @var \Magento\Store\Model\App\Emulation
*/
protected $_appEmulation;

Expand All @@ -115,7 +115,7 @@ class Email extends \Magento\Framework\Model\AbstractModel
* @param \Magento\Store\Model\StoreManagerInterface $storeManager
* @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository
* @param \Magento\Customer\Helper\View $customerHelper
* @param \Magento\Core\Model\App\Emulation $appEmulation
* @param \Magento\Store\Model\App\Emulation $appEmulation
* @param \Magento\Framework\Mail\Template\TransportBuilder $transportBuilder
* @param \Magento\Framework\Model\Resource\AbstractResource $resource
* @param \Magento\Framework\Data\Collection\Db $resourceCollection
Expand All @@ -130,7 +130,7 @@ public function __construct(
\Magento\Store\Model\StoreManagerInterface $storeManager,
\Magento\Customer\Api\CustomerRepositoryInterface $customerRepository,
\Magento\Customer\Helper\View $customerHelper,
\Magento\Core\Model\App\Emulation $appEmulation,
\Magento\Store\Model\App\Emulation $appEmulation,
\Magento\Framework\Mail\Template\TransportBuilder $transportBuilder,
\Magento\Framework\Model\Resource\AbstractResource $resource = null,
\Magento\Framework\Data\Collection\Db $resourceCollection = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@
*
* @author Magento Core Team <core@magentocommerce.com>
*/
namespace Magento\Core\Model\App;
namespace Magento\Store\Model\App;

use Magento\Framework\Object;
use Magento\Framework\Translate\Inline\ConfigInterface;

class Emulation extends \Magento\Framework\Object
Expand Down Expand Up @@ -145,7 +146,7 @@ public function startEnvironmentEmulation(
*
* Function restores initial store environment
*
* @return \Magento\Core\Model\App\Emulation
* @return \Magento\Store\Model\App\Emulation
*/
public function stopEnvironmentEmulation()
{
Expand Down
1 change: 0 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@
"magento/language-pt_br": "self.version",
"magento/language-zh_cn": "self.version",
"magento/framework": "self.version",
"magento/project-setup": "0.1.0",
"oyejorge/less.php": "1.7.0",
"trentrichardson/jquery-timepicker-addon": "1.4.3",
"components/handlebars.js": "1.3.0",
Expand Down
42 changes: 20 additions & 22 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ protected function setUp()
$objectManager->get('Magento\Framework\Model\Context'),
$objectManager->get('Magento\Framework\View\DesignInterface'),
$objectManager->get('Magento\Framework\Registry'),
$objectManager->get('Magento\Core\Model\App\Emulation'),
$objectManager->get('Magento\Store\Model\App\Emulation'),
$objectManager->get('Magento\Store\Model\StoreManager'),
$objectManager->create('Magento\Framework\Filesystem'),
$objectManager->create('Magento\Framework\View\Asset\Repository'),
Expand Down
Loading

0 comments on commit 783d706

Please sign in to comment.