Skip to content

Commit a2ea67f

Browse files
committed
0.1.0-alpha93
* Price template refactoring * Refactored order item templates in the Sales, Bundle and Downloadable modules * Eliminated the unused PHTML templates and removed the direct dependencies on the TaxHelper module in the Catalog module * Service layer implementation: * Created service layer for Order creation * Created service layer for Invoice * Created service layer for Credit Memo * Created service layer for Shipment * Introduce the Search library: * Created adapter interfaces for the Search library * Created response structure * Created parsing of XML declaration and creation of library objects (Queries, Filters, Aggregations) * Refactored Framework\Stdlib\Cookie to use CookieManager * Added the ability to prevent the backend cookie from going to the storefront * Fixed bugs: * Fixed an issue where taxes were not added in some orders * Fixed an issue were the Add New Address button did not work if the default address was already set * Fixed a Google Chrome and Internet Explorer specific issue when a JavaScript error made it impossible to register during checkout downloadable product * Fixed an issue when the credit card iframe (PayPal or 3D secure) was absent on the Order Review step during Onepage Checkout * Fixed an issue with the Tax Rate, Customer Tax Class and Product Tax Class multiselects on the Tax Rule Information page * Fixed JavaScript issues which prevented saving a newsletter template. * Modified the Button component behavior * Fixed an issue where it was impossible for a guest customer to register during Onepage checkout when the Require Customer To Be Logged In To Checkout option was set to Yes * Fixed an issue where the Calendar icons were not displayed on the storefront * Fixed an AJAX loader issue in the Admin panel * Fixed an issue where it was impossible to upload images for variations of a configurable product on product form * Fixed an issue where clicking on a row in the Search Terms Report Grid leads to 404 page * Fixed an issue where configurable products fixture creates out of stock products * Fixed an issue where Magento crashed when invalid cookie domain was set * Fixed an issue where the Change checkbox label overlapped the text message for a recurring profile attribute on the attribute mass update page * Fixed an issue where integrity test determined normal dependencies as redundant * Fixed an issue where Catalog\Service\V1\Product\Attribute\ReadService::search returned an error * Fixed an issue where Magento\Catalog\Service\V1\Category\Attribute\ReadService::options returned empty results * GitHub requests: * [magento#160] (https://github.com/magento/bugathon_march_2013/issues/160) -- Wrong default value for memory_limit in .htaccess.sample * [magento#480] (magento#480) -- Provide instructions on adding memcache support for Magento 2 * [magento#612] (magento#612) -- Category Layered Navigation : Selection of disabled entity * [magento#626] (magento#626) -- Unable to install under IIS / FastCGI
1 parent 906c3c7 commit a2ea67f

File tree

829 files changed

+37808
-9866
lines changed

Some content is hidden

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

829 files changed

+37808
-9866
lines changed

.htaccess.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
############################################
3232
## adjust memory limit
3333

34-
php_value memory_limit 128M
34+
php_value memory_limit 256M
3535
php_value max_execution_time 18000
3636

3737
############################################

CHANGELOG.md

+43-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,44 @@
1+
0.1.0-alpha93
2+
=============
3+
* Price template refactoring
4+
* Refactored order item templates in the Sales, Bundle and Downloadable modules
5+
* Eliminated the unused PHTML templates and removed the direct dependencies on the TaxHelper module in the Catalog module
6+
* Service layer implementation:
7+
* Created service layer for Order creation
8+
* Created service layer for Invoice
9+
* Created service layer for Credit Memo
10+
* Created service layer for Shipment
11+
* Introduce the Search library:
12+
* Created adapter interfaces for the Search library
13+
* Created response structure
14+
* Created parsing of XML declaration and creation of library objects (Queries, Filters, Aggregations)
15+
* Refactored Framework\Stdlib\Cookie to use CookieManager
16+
* Added the ability to prevent the backend cookie from going to the storefront
17+
* Fixed bugs:
18+
* Fixed an issue where taxes were not added in some orders
19+
* Fixed an issue were the Add New Address button did not work if the default address was already set
20+
* Fixed a Google Chrome and Internet Explorer specific issue when a JavaScript error made it impossible to register during checkout downloadable product
21+
* Fixed an issue when the credit card iframe (PayPal or 3D secure) was absent on the Order Review step during Onepage Checkout
22+
* Fixed an issue with the Tax Rate, Customer Tax Class and Product Tax Class multiselects on the Tax Rule Information page
23+
* Fixed JavaScript issues which prevented saving a newsletter template.
24+
* Modified the Button component behavior
25+
* Fixed an issue where it was impossible for a guest customer to register during Onepage checkout when the Require Customer To Be Logged In To Checkout option was set to Yes
26+
* Fixed an issue where the Calendar icons were not displayed on the storefront
27+
* Fixed an AJAX loader issue in the Admin panel
28+
* Fixed an issue where it was impossible to upload images for variations of a configurable product on product form
29+
* Fixed an issue where clicking on a row in the Search Terms Report Grid leads to 404 page
30+
* Fixed an issue where configurable products fixture creates out of stock products
31+
* Fixed an issue where Magento crashed when invalid cookie domain was set
32+
* Fixed an issue where the Change checkbox label overlapped the text message for a recurring profile attribute on the attribute mass update page
33+
* Fixed an issue where integrity test determined normal dependencies as redundant
34+
* Fixed an issue where Catalog\Service\V1\Product\Attribute\ReadService::search returned an error
35+
* Fixed an issue where Magento\Catalog\Service\V1\Category\Attribute\ReadService::options returned empty results
36+
* GitHub requests:
37+
* [#160] (https://github.com/magento/bugathon_march_2013/issues/160) -- Wrong default value for memory_limit in .htaccess.sample
38+
* [#480] (https://github.com/magento/magento2/pull/480) -- Provide instructions on adding memcache support for Magento 2
39+
* [#612] (https://github.com/magento/magento2/issues/612) -- Category Layered Navigation : Selection of disabled entity
40+
* [#626] (https://github.com/magento/magento2/issues/626) -- Unable to install under IIS / FastCGI
41+
142
0.1.0-alpha92
243
=============
344
* Implemented API services:
@@ -10,7 +51,7 @@
1051
* Framework Improvements:
1152
* Ability to drop/regenerate access for native mobile apps
1253
* Ability to support extensible service data objects
13-
* No Code Duplication in Root Templates (MAGETWO-26278)
54+
* No Code Duplication in Root Templates
1455
* Fixed bugs:
1556
* Persistance session application. Loggin out the customer
1657
* Placing the order with two terms and conditions
@@ -20,7 +61,7 @@
2061
* Validation for country_id/region_id and percentage_rate during Tax Rate creation
2162
* Declaration of getSortOrders in Magento\Framework\Service\V1\Data\SearchCriteria
2263
* Order cancellation for online payment methods
23-
* Order online processing for Authorize.net Direct Post
64+
* Order online processing for Authorize.net Direct Post
2465
* Backend grids while search
2566
* Adding of downlodable sample block on product page
2667
* Variations on duplicated configurable product

app/code/Magento/AdminNotification/composer.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.4.11|~5.5.0",
6-
"magento/module-store": "0.1.0-alpha92",
7-
"magento/module-core": "0.1.0-alpha92",
8-
"magento/module-backend": "0.1.0-alpha92",
9-
"magento/module-theme": "0.1.0-alpha92",
10-
"magento/framework": "0.1.0-alpha92",
6+
"magento/module-store": "0.1.0-alpha93",
7+
"magento/module-core": "0.1.0-alpha93",
8+
"magento/module-backend": "0.1.0-alpha93",
9+
"magento/module-theme": "0.1.0-alpha93",
10+
"magento/framework": "0.1.0-alpha93",
1111
"lib-libxml": "*",
1212
"magento/magento-composer-installer": "*"
1313
},
1414
"type": "magento2-module",
15-
"version": "0.1.0-alpha92",
15+
"version": "0.1.0-alpha93",
1616
"extra": {
1717
"map": [
1818
[

app/code/Magento/Authorization/composer.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
"description": "Authorization module provides access to Magento ACL functionality.",
44
"require": {
55
"php": "~5.4.11|~5.5.0",
6-
"magento/module-backend": "0.1.0-alpha92",
7-
"magento/framework": "0.1.0-alpha92",
6+
"magento/module-backend": "0.1.0-alpha93",
7+
"magento/framework": "0.1.0-alpha93",
88
"magento/magento-composer-installer": "*"
99
},
1010
"type": "magento2-module",
11-
"version": "0.1.0-alpha92",
11+
"version": "0.1.0-alpha93",
1212
"extra": {
1313
"map": [
1414
[

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

+14-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ class Session extends \Magento\Framework\Session\SessionManager
3535
* @param \Magento\Framework\Session\SaveHandlerInterface $saveHandler
3636
* @param \Magento\Framework\Session\ValidatorInterface $validator
3737
* @param \Magento\Framework\Session\StorageInterface $storage
38+
* @param \Magento\Framework\Stdlib\CookieManager $cookieManager
39+
* @param \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory
3840
* @param string|null $sessionName
3941
* @internal param array $data
4042
*/
@@ -45,9 +47,20 @@ public function __construct(
4547
\Magento\Framework\Session\SaveHandlerInterface $saveHandler,
4648
\Magento\Framework\Session\ValidatorInterface $validator,
4749
\Magento\Framework\Session\StorageInterface $storage,
50+
\Magento\Framework\Stdlib\CookieManager $cookieManager,
51+
\Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory,
4852
$sessionName = null
4953
) {
50-
parent::__construct($request, $sidResolver, $sessionConfig, $saveHandler, $validator, $storage);
54+
parent::__construct(
55+
$request,
56+
$sidResolver,
57+
$sessionConfig,
58+
$saveHandler,
59+
$validator,
60+
$storage,
61+
$cookieManager,
62+
$cookieMetadataFactory
63+
);
5164
$this->start($sessionName);
5265
}
5366

app/code/Magento/Authorizenet/composer.json

+10-10
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@
33
"description": "N/A",
44
"require": {
55
"php": "~5.4.11|~5.5.0",
6-
"magento/module-store": "0.1.0-alpha92",
7-
"magento/module-sales": "0.1.0-alpha92",
8-
"magento/module-checkout": "0.1.0-alpha92",
9-
"magento/module-backend": "0.1.0-alpha92",
10-
"magento/module-core": "0.1.0-alpha92",
11-
"magento/module-payment": "0.1.0-alpha92",
12-
"magento/module-centinel": "0.1.0-alpha92",
13-
"magento/module-catalog": "0.1.0-alpha92",
14-
"magento/framework": "0.1.0-alpha92",
6+
"magento/module-store": "0.1.0-alpha93",
7+
"magento/module-sales": "0.1.0-alpha93",
8+
"magento/module-checkout": "0.1.0-alpha93",
9+
"magento/module-backend": "0.1.0-alpha93",
10+
"magento/module-core": "0.1.0-alpha93",
11+
"magento/module-payment": "0.1.0-alpha93",
12+
"magento/module-centinel": "0.1.0-alpha93",
13+
"magento/module-catalog": "0.1.0-alpha93",
14+
"magento/framework": "0.1.0-alpha93",
1515
"magento/magento-composer-installer": "*"
1616
},
1717
"type": "magento2-module",
18-
"version": "0.1.0-alpha92",
18+
"version": "0.1.0-alpha93",
1919
"extra": {
2020
"map": [
2121
[
+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
<?php
2+
/**
3+
* Backend Session configuration object
4+
*
5+
* Magento
6+
*
7+
* NOTICE OF LICENSE
8+
*
9+
* This source file is subject to the Open Software License (OSL 3.0)
10+
* that is bundled with this package in the file LICENSE.txt.
11+
* It is also available through the world-wide-web at this URL:
12+
* http://opensource.org/licenses/osl-3.0.php
13+
* If you did not receive a copy of the license and are unable to
14+
* obtain it through the world-wide-web, please send an email
15+
* to [email protected] so we can send you a copy immediately.
16+
*
17+
* DISCLAIMER
18+
*
19+
* Do not edit or add to this file if you wish to upgrade Magento to newer
20+
* versions in the future. If you wish to customize Magento for your
21+
* needs please refer to http://www.magentocommerce.com for more information.
22+
*
23+
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
24+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25+
*/
26+
namespace Magento\Backend;
27+
28+
use Magento\Backend\App\Area\FrontNameResolver;
29+
use Magento\Framework\Session\Config;
30+
31+
/**
32+
* Magento Backend session configuration
33+
*
34+
* @method Config setSaveHandler()
35+
*/
36+
class AdminConfig extends Config
37+
{
38+
/**
39+
* @var FrontNameResolver $frontNameResolver
40+
*/
41+
protected $frontNameResolver;
42+
43+
/**
44+
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
45+
* @param \Magento\Framework\Stdlib\String $stringHelper
46+
* @param \Magento\Framework\App\RequestInterface $request
47+
* @param \Magento\Framework\App\State $appState
48+
* @param \Magento\Framework\App\Filesystem $filesystem
49+
* @param string $scopeType
50+
* @param FrontNameResolver $frontNameResolver
51+
* @param string $saveMethod
52+
* @param null|string $savePath
53+
* @param null|string $cacheLimiter
54+
* @param string $lifetimePath
55+
* @SuppressWarnings(PHPMD.ExcessiveParameterList)
56+
*/
57+
public function __construct(
58+
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
59+
\Magento\Framework\Stdlib\String $stringHelper,
60+
\Magento\Framework\App\RequestInterface $request,
61+
\Magento\Framework\App\State $appState,
62+
\Magento\Framework\App\Filesystem $filesystem,
63+
$scopeType,
64+
FrontNameResolver $frontNameResolver,
65+
$saveMethod = \Magento\Framework\Session\SaveHandlerInterface::DEFAULT_HANDLER,
66+
$savePath = null,
67+
$cacheLimiter = null,
68+
$lifetimePath = self::XML_PATH_COOKIE_LIFETIME
69+
) {
70+
parent::__construct(
71+
$scopeConfig,
72+
$stringHelper,
73+
$request,
74+
$appState,
75+
$filesystem,
76+
$scopeType,
77+
$saveMethod,
78+
$savePath,
79+
$cacheLimiter,
80+
$lifetimePath
81+
);
82+
83+
$this->frontNameResolver = $frontNameResolver;
84+
85+
$baseUrl = $this->_httpRequest->getBaseUrl();
86+
$adminPath = $this->extractAdminPath($baseUrl);
87+
$this->setCookiePath($adminPath);
88+
}
89+
90+
/**
91+
* Determine the admin path
92+
*
93+
* @param string $baseUrl
94+
* @return string
95+
* @throws \InvalidArgumentException
96+
*/
97+
private function extractAdminPath($baseUrl)
98+
{
99+
if (!is_string($baseUrl)) {
100+
throw new \InvalidArgumentException('Cookie path is not a string.');
101+
}
102+
103+
$adminPath = $this->frontNameResolver->getFrontName();
104+
105+
if (!substr($baseUrl, -1) || ('/' != substr($baseUrl, -1))) {
106+
$baseUrl = $baseUrl . '/';
107+
}
108+
109+
return $baseUrl . $adminPath;
110+
}
111+
}

app/code/Magento/Backend/Model/Auth/Session.php

+28-22
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,9 @@
2323
*/
2424
namespace Magento\Backend\Model\Auth;
2525

26+
use \Magento\Framework\Stdlib\CookieManager;
27+
use \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory;
28+
2629
/**
2730
* Backend Auth session model
2831
*
@@ -44,7 +47,7 @@ class Session extends \Magento\Framework\Session\SessionManager implements \Mage
4447
const XML_PATH_SESSION_LIFETIME = 'admin/security/session_lifetime';
4548

4649
/**
47-
* Whether it is the first page after successfull login
50+
* Whether it is the first page after successful login
4851
*
4952
* @var boolean
5053
*/
@@ -67,22 +70,18 @@ class Session extends \Magento\Framework\Session\SessionManager implements \Mage
6770
*/
6871
protected $_config;
6972

70-
/**
71-
* @var \Magento\Framework\Stdlib\Cookie
72-
*/
73-
protected $_cookie;
74-
7573
/**
7674
* @param \Magento\Framework\App\Request\Http $request
7775
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
7876
* @param \Magento\Framework\Session\Config\ConfigInterface $sessionConfig
7977
* @param \Magento\Framework\Session\SaveHandlerInterface $saveHandler
8078
* @param \Magento\Framework\Session\ValidatorInterface $validator
8179
* @param \Magento\Framework\Session\StorageInterface $storage
80+
* @param CookieManager $cookieManager
81+
* @param CookieMetadataFactory $cookieMetadataFactory
8282
* @param \Magento\Framework\Acl\Builder $aclBuilder
8383
* @param \Magento\Backend\Model\UrlInterface $backendUrl
8484
* @param \Magento\Backend\App\ConfigInterface $config
85-
* @param \Magento\Framework\Stdlib\Cookie $cookie
8685
*/
8786
public function __construct(
8887
\Magento\Framework\App\Request\Http $request,
@@ -91,16 +90,25 @@ public function __construct(
9190
\Magento\Framework\Session\SaveHandlerInterface $saveHandler,
9291
\Magento\Framework\Session\ValidatorInterface $validator,
9392
\Magento\Framework\Session\StorageInterface $storage,
93+
CookieManager $cookieManager,
94+
CookieMetadataFactory $cookieMetadataFactory,
9495
\Magento\Framework\Acl\Builder $aclBuilder,
9596
\Magento\Backend\Model\UrlInterface $backendUrl,
96-
\Magento\Backend\App\ConfigInterface $config,
97-
\Magento\Framework\Stdlib\Cookie $cookie
97+
\Magento\Backend\App\ConfigInterface $config
9898
) {
9999
$this->_config = $config;
100100
$this->_aclBuilder = $aclBuilder;
101101
$this->_backendUrl = $backendUrl;
102-
$this->_cookie = $cookie;
103-
parent::__construct($request, $sidResolver, $sessionConfig, $saveHandler, $validator, $storage);
102+
parent::__construct(
103+
$request,
104+
$sidResolver,
105+
$sessionConfig,
106+
$saveHandler,
107+
$validator,
108+
$storage,
109+
$cookieManager,
110+
$cookieMetadataFactory
111+
);
104112
$this->start();
105113
}
106114

@@ -187,22 +195,20 @@ public function prolong()
187195
$currentTime = time();
188196

189197
$this->setUpdatedAt($currentTime);
190-
$cookieValue = $this->_cookie->get($this->getName());
198+
$cookieValue = $this->cookieManager->getCookie($this->getName());
191199
if ($cookieValue) {
192-
$this->_cookie->set(
193-
$this->getName(),
194-
$cookieValue,
195-
$lifetime,
196-
$this->sessionConfig->getCookiePath(),
197-
$this->sessionConfig->getCookieDomain(),
198-
$this->sessionConfig->getCookieSecure(),
199-
$this->sessionConfig->getCookieHttpOnly()
200-
);
200+
$cookieMetadata = $this->cookieMetadataFactory->createPublicCookieMetadata()
201+
->setDuration($lifetime)
202+
->setPath($this->sessionConfig->getCookiePath())
203+
->setDomain($this->sessionConfig->getCookieDomain())
204+
->setSecure($this->sessionConfig->getCookieSecure())
205+
->setHttpOnly($this->sessionConfig->getCookieHttpOnly());
206+
$this->cookieManager->setPublicCookie($this->getName(), $cookieValue, $cookieMetadata);
201207
}
202208
}
203209

204210
/**
205-
* Check if it is the first page after successfull login
211+
* Check if it is the first page after successful login
206212
*
207213
* @return bool
208214
*/

0 commit comments

Comments
 (0)