Skip to content

Commit c6856aa

Browse files
committed
2.0.0.0-dev68
* Cache: * Implemented depersonalization of private content generation * Implemented content invalidation * Added Edge Side Includes (ESI) support * Added a built-in caching application * GitHub requests: * [#454](#454) -- Allow to specify list of IPs in a body on maintenance.flag which will be granted access even if the flag is on * [#204](#204) -- Mage_ImportExport: Exporting configurable products ignores multiple configurable options * [#418](#418) -- Echo vs print * [#419](#419) -- Some translation keys are not correct. * [#244](#244) -- Retrieve base host URL without path in error processor * [#411](#411) -- Missed column 'payment_method' of table 'sales_flat_quote_address' * [#284](#284) -- Fix for Issue #278 (Import -> Stores with large amount of Configurable Products) * Fixed bugs: * Fixed an issue where Mage_Eav_Model_Entity_Type::fetchNewIncrementId() did not rollback on exception * Fixed an issue where a category containing more than 1000 products could not be saved * Fixed inappropriate error messages displayed during installation when required extensions were not installed * Fixed synopsis of the install.php script * Fixed an issue where the schedule of recurring payments was not displayed in the shopping cart * Modularity improvements: * Introduced the OfflinePayments module - a saparate module for offline payment methods * Added the ability to enable/disable the Paypal module * Moved the framework part of the Locale functionality from the Core module to library * The Locale logic was split among appropriate classes in library, according to their responsibilities * Removed the deprecated DHL functionality * Introduced the OfflineShipping module for offline shipping carrier functionality: Flatrate, Tablerate, Freeshipping, Pickup * Introduced a separate module for the DHL shipping carrier * Introduced a separate module for the Fedex shipping carrier * Introduced a separate module for the UPS shipping carrier * Introduced a separate module for the USPS shipping carrier * Framework Improvements: * Added the ability to intercept internal public calls * Added the ability to access public interface of the intercepted object * Added a static integrity test for plugin interface validation * Added support for both class addressing approaches in DI: with and without slash ("\") at the beginning of a class name * Customer Service usage: * Refactored the Customer module blocks and controllers to use customer service layer * Security: * Introduced the ability to hash a password with a random salt of default length (32 chars) by the encryption library * Utilized a random salt of default length for admin users, and frontend customers
1 parent b1cebfa commit c6856aa

File tree

1,385 files changed

+32592
-19235
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,385 files changed

+32592
-19235
lines changed

CHANGELOG.md

+43
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
2.0.0.0-dev68
2+
=============
3+
* Cache:
4+
* Implemented depersonalization of private content generation
5+
* Implemented content invalidation
6+
* Added Edge Side Includes (ESI) support
7+
* Added a built-in caching application
8+
* GitHub requests:
9+
* [#454](https://github.com/magento/magento2/pull/454) -- Allow to specify list of IPs in a body on maintenance.flag which will be granted access even if the flag is on
10+
* [#204](https://github.com/magento/magento2/issues/204) -- Mage_ImportExport: Exporting configurable products ignores multiple configurable options
11+
* [#418](https://github.com/magento/magento2/issues/418) -- Echo vs print
12+
* [#419](https://github.com/magento/magento2/issues/419) -- Some translation keys are not correct.
13+
* [#244](https://github.com/magento/magento2/issues/244) -- Retrieve base host URL without path in error processor
14+
* [#411](https://github.com/magento/magento2/issues/411) -- Missed column 'payment_method' of table 'sales_flat_quote_address'
15+
* [#284](https://github.com/magento/magento2/pull/284) -- Fix for Issue #278 (Import -> Stores with large amount of Configurable Products)
16+
* Fixed bugs:
17+
* Fixed an issue where Mage_Eav_Model_Entity_Type::fetchNewIncrementId() did not rollback on exception
18+
* Fixed an issue where a category containing more than 1000 products could not be saved
19+
* Fixed inappropriate error messages displayed during installation when required extensions were not installed
20+
* Fixed synopsis of the install.php script
21+
* Fixed an issue where the schedule of recurring payments was not displayed in the shopping cart
22+
* Modularity improvements:
23+
* Introduced the OfflinePayments module - a saparate module for offline payment methods
24+
* Added the ability to enable/disable the Paypal module
25+
* Moved the framework part of the Locale functionality from the Core module to library
26+
* The Locale logic was split among appropriate classes in library, according to their responsibilities
27+
* Removed the deprecated DHL functionality
28+
* Introduced the OfflineShipping module for offline shipping carrier functionality: Flatrate, Tablerate, Freeshipping, Pickup
29+
* Introduced a separate module for the DHL shipping carrier
30+
* Introduced a separate module for the Fedex shipping carrier
31+
* Introduced a separate module for the UPS shipping carrier
32+
* Introduced a separate module for the USPS shipping carrier
33+
* Framework Improvements:
34+
* Added the ability to intercept internal public calls
35+
* Added the ability to access public interface of the intercepted object
36+
* Added a static integrity test for plugin interface validation
37+
* Added support for both class addressing approaches in DI: with and without slash ("\") at the beginning of a class name
38+
* Customer Service usage:
39+
* Refactored the Customer module blocks and controllers to use customer service layer
40+
* Security:
41+
* Introduced the ability to hash a password with a random salt of default length (32 chars) by the encryption library
42+
* Utilized a random salt of default length for admin users, and frontend customers
43+
144
2.0.0.0-dev67
245
=============
346
* GitHub requests:

app/bootstrap.php

+9-6
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,19 @@
7777

7878
if (!defined('BARE_BOOTSTRAP')) {
7979
if (file_exists(BP . '/maintenance.flag')) {
80-
if (PHP_SAPI == 'cli') {
81-
echo 'Service temporarily unavailable due to maintenance downtime.';
82-
} else {
83-
include_once BP . '/pub/errors/503.php';
80+
81+
if (!in_array($_SERVER['REMOTE_ADDR'], explode(",", file_get_contents(BP . '/maintenance.flag')))) {
82+
if (PHP_SAPI == 'cli') {
83+
echo 'Service temporarily unavailable due to maintenance downtime.';
84+
} else {
85+
include_once BP . '/pub/errors/503.php';
86+
}
87+
exit;
8488
}
85-
exit;
8689
}
8790

8891
if (!empty($_SERVER['MAGE_PROFILER'])) {
8992
\Magento\Profiler::applyConfig($_SERVER['MAGE_PROFILER'], dirname(__DIR__), !empty($_REQUEST['isAjax']));
9093
}
9194
}
92-
date_default_timezone_set(\Magento\Core\Model\LocaleInterface::DEFAULT_TIMEZONE);
95+
date_default_timezone_set(\Magento\Stdlib\DateTime\TimezoneInterface::DEFAULT_TIMEZONE);

app/code/Magento/AdminNotification/Block/ToolbarEntry.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,8 @@ public function getLatestUnreadNotifications()
8484
public function formatNotificationDate($dateString)
8585
{
8686
if (date('Ymd') == date('Ymd', strtotime($dateString))) {
87-
return $this->formatTime($dateString, \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_SHORT, false);
87+
return $this->formatTime($dateString, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_SHORT, false);
8888
}
89-
return $this->formatDate($dateString, \Magento\Core\Model\LocaleInterface::FORMAT_TYPE_MEDIUM, true);
89+
return $this->formatDate($dateString, \Magento\Stdlib\DateTime\TimezoneInterface::FORMAT_TYPE_MEDIUM, true);
9090
}
9191
}

app/code/Magento/Authorizenet/Model/Authorizenet.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ class Authorizenet extends \Magento\Payment\Model\Method\Cc
248248
* @param \Magento\Logger\AdapterFactory $logAdapterFactory
249249
* @param \Magento\Logger $logger
250250
* @param \Magento\Module\ModuleListInterface $moduleList
251-
* @param \Magento\Core\Model\LocaleInterface $locale
251+
* @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate
252252
* @param \Magento\Centinel\Model\Service $centinelService
253253
* @param \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory
254254
* @param \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory
@@ -267,7 +267,7 @@ public function __construct(
267267
\Magento\Logger\AdapterFactory $logAdapterFactory,
268268
\Magento\Logger $logger,
269269
\Magento\Module\ModuleListInterface $moduleList,
270-
\Magento\Core\Model\LocaleInterface $locale,
270+
\Magento\Stdlib\DateTime\TimezoneInterface $localeDate,
271271
\Magento\Centinel\Model\Service $centinelService,
272272
\Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory,
273273
\Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory,
@@ -290,7 +290,7 @@ public function __construct(
290290
$logAdapterFactory,
291291
$logger,
292292
$moduleList,
293-
$locale,
293+
$localeDate,
294294
$centinelService,
295295
$data
296296
);

app/code/Magento/Authorizenet/Model/Directpost.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class Directpost extends \Magento\Authorizenet\Model\Authorizenet
8787
* @param \Magento\Logger\AdapterFactory $logAdapterFactory
8888
* @param \Magento\Logger $logger
8989
* @param \Magento\Module\ModuleListInterface $moduleList
90-
* @param \Magento\Core\Model\LocaleInterface $locale
90+
* @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate
9191
* @param \Magento\Centinel\Model\Service $centinelService
9292
* @param \Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory
9393
* @param \Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory
@@ -111,7 +111,7 @@ public function __construct(
111111
\Magento\Logger\AdapterFactory $logAdapterFactory,
112112
\Magento\Logger $logger,
113113
\Magento\Module\ModuleListInterface $moduleList,
114-
\Magento\Core\Model\LocaleInterface $locale,
114+
\Magento\Stdlib\DateTime\TimezoneInterface $localeDate,
115115
\Magento\Centinel\Model\Service $centinelService,
116116
\Magento\Authorizenet\Model\Authorizenet\CardsFactory $cardsFactory,
117117
\Magento\Authorizenet\Model\Authorizenet\RequestFactory $requestFactory,
@@ -133,7 +133,7 @@ public function __construct(
133133
$logAdapterFactory,
134134
$logger,
135135
$moduleList,
136-
$locale,
136+
$localeDate,
137137
$centinelService,
138138
$cardsFactory,
139139
$requestFactory,

app/code/Magento/Authorizenet/etc/adminhtml/system.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
</field>
8989
<field id="currency" translate="label" type="select" sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="0">
9090
<label>Accepted Currency</label>
91-
<source_model>Magento\Backend\Model\Config\Source\Currency</source_model>
91+
<source_model>Magento\Backend\Model\Config\Source\Locale\Currency</source_model>
9292
</field>
9393
<field id="allowspecific" translate="label" type="allowspecific" sortOrder="50" showInDefault="1" showInWebsite="1" showInStore="0">
9494
<label>Payment from Applicable Countries</label>
@@ -172,7 +172,7 @@
172172
</field>
173173
<field id="currency" translate="label" type="select" sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="0">
174174
<label>Accepted Currency</label>
175-
<source_model>Magento\Backend\Model\Config\Source\Currency</source_model>
175+
<source_model>Magento\Backend\Model\Config\Source\Locale\Currency</source_model>
176176
</field>
177177
<field id="debug" translate="label" type="select" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="0">
178178
<label>Debug</label>

app/code/Magento/Authorizenet/view/adminhtml/info/cc.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
<?php foreach ($cards as $key => $card): ?>
4040
<?php if ($showCount): ?>
41-
<span><?php echo sprintf(__('Credit Card %s'), $key + 1); ?></span>
41+
<span><?php echo __('Credit Card %1', $key + 1); ?></span>
4242
<?php endif;?>
4343

4444
<table class="data-table<?php if ($showCount):?> offset<?php endif;?>">

app/code/Magento/Authorizenet/view/adminhtml/info/pdf.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?>{{pdf_row_separator}}
3434
<?php foreach ($cards as $key => $card): ?>
3535
<?php if ($showCount): ?>
36-
<?php echo sprintf(__('Credit Card %s'), $key + 1); ?>
36+
<?php echo __('Credit Card %1', $key + 1); ?>
3737
{{pdf_row_separator}}
3838
<?php endif;?>
3939

app/code/Magento/Authorizenet/view/frontend/info/cc.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
<?php foreach ($cards as $key => $card): ?>
4040

4141
<?php if ($showCount): ?>
42-
<dt><?php echo sprintf(__('Credit Card %s'), $key + 1); ?></dt>
42+
<dt><?php echo __('Credit Card %1', $key + 1); ?></dt>
4343
<?php endif; ?>
4444
<dd class="content">
4545
<table class="data table">

app/code/Magento/Backend/App/AbstractAction.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@ abstract class AbstractAction extends \Magento\App\Action\Action
8383
protected $_backendUrl;
8484

8585
/**
86-
* @var \Magento\Core\Model\LocaleInterface
86+
* @var \Magento\Locale\ResolverInterface
8787
*/
88-
protected $_locale;
88+
protected $_localeResolver;
8989

9090
/**
9191
* @var bool
@@ -114,7 +114,7 @@ public function __construct(Action\Context $context)
114114
$this->_backendUrl = $context->getBackendUrl();
115115
$this->_formKeyValidator = $context->getFormKeyValidator();
116116
$this->_title = $context->getTitle();
117-
$this->_locale = $context->getLocale();
117+
$this->_localeResolver = $context->getLocaleResolver();
118118
$this->_canUseBaseUrl = $context->getCanUseBaseUrl();
119119
$this->_session = $context->getSession();
120120
}
@@ -300,12 +300,12 @@ public function _processUrlKeys()
300300
protected function _processLocaleSettings()
301301
{
302302
$forceLocale = $this->getRequest()->getParam('locale', null);
303-
if ($this->_objectManager->get('Magento\Core\Model\Locale\Validator')->isValid($forceLocale)) {
303+
if ($this->_objectManager->get('Magento\Locale\Validator')->isValid($forceLocale)) {
304304
$this->_getSession()->setSessionLocale($forceLocale);
305305
}
306306

307307
if (is_null($this->_getSession()->getLocale())) {
308-
$this->_getSession()->setLocale($this->_locale->getLocaleCode());
308+
$this->_getSession()->setLocale($this->_localeResolver->getLocaleCode());
309309
}
310310

311311
return $this;

app/code/Magento/Backend/App/Action/Context.php

+11-11
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,6 @@ class Context extends \Magento\App\Action\Context
6161
*/
6262
protected $_title;
6363

64-
/**
65-
* @var \Magento\Core\Model\LocaleInterface
66-
*/
67-
protected $_locale;
68-
6964
/**
7065
* @var bool
7166
*/
@@ -76,6 +71,11 @@ class Context extends \Magento\App\Action\Context
7671
*/
7772
protected $_session;
7873

74+
/**
75+
* @var \Magento\Locale\ResolverInterface
76+
*/
77+
protected $_localeResolver;
78+
7979
/**
8080
* @param \Magento\App\RequestInterface $request
8181
* @param \Magento\App\ResponseInterface $response
@@ -93,7 +93,7 @@ class Context extends \Magento\App\Action\Context
9393
* @param \Magento\Backend\Model\UrlInterface $backendUrl
9494
* @param \Magento\Core\App\Action\FormKeyValidator $formKeyValidator
9595
* @param \Magento\App\Action\Title $title
96-
* @param \Magento\Core\Model\LocaleInterface $locale
96+
* @param \Magento\Locale\ResolverInterface $localeResolver
9797
* @param bool $canUseBaseUrl
9898
*/
9999
public function __construct(
@@ -113,7 +113,7 @@ public function __construct(
113113
\Magento\Backend\Model\UrlInterface $backendUrl,
114114
\Magento\Core\App\Action\FormKeyValidator $formKeyValidator,
115115
\Magento\App\Action\Title $title,
116-
\Magento\Core\Model\LocaleInterface $locale,
116+
\Magento\Locale\ResolverInterface $localeResolver,
117117
$canUseBaseUrl = false
118118
) {
119119
parent::__construct(
@@ -135,7 +135,7 @@ public function __construct(
135135
$this->_backendUrl = $backendUrl;
136136
$this->_formKeyValidator = $formKeyValidator;
137137
$this->_title = $title;
138-
$this->_locale = $locale;
138+
$this->_localeResolver = $localeResolver;
139139
$this->_canUseBaseUrl = $canUseBaseUrl;
140140
}
141141

@@ -188,11 +188,11 @@ public function getHelper()
188188
}
189189

190190
/**
191-
* @return \Magento\Core\Model\LocaleInterface
191+
* @return \Magento\Locale\ResolverInterface
192192
*/
193-
public function getLocale()
193+
public function getLocaleResolver()
194194
{
195-
return $this->_locale;
195+
return $this->_localeResolver;
196196
}
197197

198198
/**

app/code/Magento/Backend/App/Action/Plugin/Authentication.php

+11-6
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,18 @@ public function __construct(
8686
}
8787

8888
/**
89-
* @param array $arguments
90-
* @param \Magento\Code\Plugin\InvocationChain $invocationChain
89+
* @param \Magento\Backend\App\AbstractAction $subject
90+
* @param callable $proceed
91+
* @param \Magento\App\RequestInterface $request
92+
*
9193
* @return mixed
94+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
9295
*/
93-
public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain)
94-
{
95-
$request = $arguments[0];
96+
public function aroundDispatch(
97+
\Magento\Backend\App\AbstractAction $subject,
98+
\Closure $proceed,
99+
\Magento\App\RequestInterface $request
100+
) {
96101
$requestedActionName = $request->getActionName();
97102
if (in_array($requestedActionName, $this->_openActions)) {
98103
$request->setDispatched(true);
@@ -105,7 +110,7 @@ public function aroundDispatch(array $arguments, \Magento\Code\Plugin\Invocation
105110
}
106111
}
107112
$this->_auth->getAuthStorage()->refreshAcl();
108-
return $invocationChain->proceed($arguments);
113+
return $proceed($request);
109114
}
110115

111116
/**

app/code/Magento/Backend/App/Action/Plugin/MassactionKey.php

+12-7
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,24 @@ class MassactionKey
3131
/**
3232
* Process massaction key
3333
*
34-
* @param array $arguments
35-
* @param \Magento\Code\Plugin\InvocationChain $invocationChain
34+
* @param \Magento\Backend\App\AbstractAction $subject
35+
* @param callable $proceed
36+
* @param \Magento\App\RequestInterface $request
37+
*
3638
* @return mixed
39+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
3740
*/
38-
public function aroundDispatch(array $arguments, \Magento\Code\Plugin\InvocationChain $invocationChain)
39-
{
40-
$request = $arguments[0];
41+
public function aroundDispatch(
42+
\Magento\Backend\App\AbstractAction $subject,
43+
\Closure $proceed,
44+
\Magento\App\RequestInterface $request
45+
) {
4146
$key = $request->getPost('massaction_prepare_key');
4247
if ($key) {
4348
$postData = $request->getPost($key);
4449
$value = is_array($postData) ? $postData : explode(',', $postData);
4550
$request->setPost($key, $value ? $value : null);
4651
}
47-
return $invocationChain->proceed($arguments);
52+
return $proceed($request);
4853
}
49-
}
54+
}

app/code/Magento/Backend/Block/Context.php

+3-8
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,13 @@ class Context extends \Magento\View\Element\Context
4949
* @param \Magento\Session\SessionManagerInterface $session
5050
* @param \Magento\Session\SidResolverInterface $sidResolver
5151
* @param \Magento\Core\Model\Store\Config $storeConfig
52-
* @param \Magento\App\FrontController $frontController
5352
* @param \Magento\View\Url $viewUrl
5453
* @param \Magento\View\ConfigInterface $viewConfig
5554
* @param \Magento\App\Cache\StateInterface $cacheState
5655
* @param \Magento\Logger $logger
57-
* @param \Magento\Core\Model\App $app
5856
* @param \Magento\Escaper $escaper
5957
* @param \Magento\Filter\FilterManager $filterManager
60-
* @param \Magento\Core\Model\LocaleInterface $locale
58+
* @param \Magento\Stdlib\DateTime\TimezoneInterface $localeDate
6159
* @param \Magento\AuthorizationInterface $authorization
6260
* @param array $data
6361
*
@@ -74,23 +72,20 @@ public function __construct(
7472
\Magento\Session\SessionManagerInterface $session,
7573
\Magento\Session\SidResolverInterface $sidResolver,
7674
\Magento\Core\Model\Store\Config $storeConfig,
77-
\Magento\App\FrontController $frontController,
7875
\Magento\View\Url $viewUrl,
7976
\Magento\View\ConfigInterface $viewConfig,
8077
\Magento\App\Cache\StateInterface $cacheState,
8178
\Magento\Logger $logger,
82-
\Magento\Core\Model\App $app,
8379
\Magento\Escaper $escaper,
8480
\Magento\Filter\FilterManager $filterManager,
85-
\Magento\Core\Model\LocaleInterface $locale,
81+
\Magento\Stdlib\DateTime\TimezoneInterface $localeDate,
8682
\Magento\AuthorizationInterface $authorization,
8783
array $data = array()
8884
) {
8985
$this->_authorization = $authorization;
9086
parent::__construct(
9187
$request, $layout, $eventManager, $urlBuilder, $translator, $cache, $design, $session, $sidResolver,
92-
$storeConfig, $frontController, $viewUrl, $viewConfig, $cacheState, $logger, $app, $escaper,
93-
$filterManager, $locale, $data
88+
$storeConfig, $viewUrl, $viewConfig, $cacheState, $logger, $escaper, $filterManager, $localeDate, $data
9489
);
9590
}
9691

0 commit comments

Comments
 (0)