Skip to content

Commit 658b76f

Browse files
committed
2.0.0.0-dev82
* Added support for MTF Reporting Tool * Framework improvements: * Covered the following Magento application components with unit tests: * `ConfigurableProduct/Helper/Data.php` * `ConfigurableProduct/Model/Export/RowCustomizer.php` * `ConfigurableProduct/Model/Product/Type/Configurable.php` * `ConfigurableProduct/Model/Product/Type/Plugin.php` * `ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProduct.php` * `CatalogSearch/Helper/Data.php` * Covered Magento lib with unit tests: * `lib/internal/Magento/Framework/DB/Helper/AbstractHelper.php` * `lib/internal/Magento/Framework/DB/Tree/Node.php` * Created Service API for Magento_Catalog Module: * Implemented the Product API * Implemented the ProductAttributeRead API * Fixed bugs: * Fixed issues with form elements visibility on the backend * Fixed an issue where backend forms contained an excessive container * Fixed an issue where a wrong category structure was displayed on the Category page * Fixed an issue where the pub/index.php entry point was broken because of the obsolete constants * Fixed an issue where it was impossible to pass an empty array as an argument in DI configuration and layout updates * Fixed an issue with status and visibility settings of a related product on the backend * Fixed an issue with unused DB indexes, which used resources, but did not contribute to higher performance * Fixed an issue where it was possible to create a downloadable product without specifying a link or a file * Fixed an issue where a fatal error occured when opening a fixed bundle product with custom options page on the frontend * Fixed an issue where the was a wrong config key for backend cataloginventory * Processed GitHub requests: * [#548] (#548) -- Console installer doesn't checks filesystem permissions * [#552] (#552) -- backend notifications sitebuild bug * [#562] (#562) -- Bugfix Magento\Framework\DB\Adapter\Pdo\Mysql::getCreateTable() * [#565] (#565) -- Magento\CatalogSearch\Model\Query::getResultCollection() not working * [#557] (#557) -- translation anomalies backend login page * Added the following functional tests: * Advanced Search * Existing Customer Creation * Product Attribute Creation * Product Rating Creation * Sales Rule Creation * System Product Attribute Deletion * Tax Rate Creation * Tax Rule Deletion * Update Category * Update Category Url Rewrite * Update Product Url Rewrite
1 parent d895f13 commit 658b76f

File tree

413 files changed

+19087
-8256
lines changed

Some content is hidden

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

413 files changed

+19087
-8256
lines changed

CHANGELOG.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
2.0.0.0-dev82
2+
=============
3+
* Added support for MTF Reporting Tool
4+
* Framework improvements:
5+
* Covered the following Magento application components with unit tests:
6+
* `ConfigurableProduct/Helper/Data.php`
7+
* `ConfigurableProduct/Model/Export/RowCustomizer.php`
8+
* `ConfigurableProduct/Model/Product/Type/Configurable.php`
9+
* `ConfigurableProduct/Model/Product/Type/Plugin.php`
10+
* `ConfigurableProduct/Model/Quote/Item/QuantityValidator/Initializer/Option/Plugin/ConfigurableProduct.php`
11+
* `CatalogSearch/Helper/Data.php`
12+
* Covered Magento lib with unit tests:
13+
* `lib/internal/Magento/Framework/DB/Helper/AbstractHelper.php`
14+
* `lib/internal/Magento/Framework/DB/Tree/Node.php`
15+
* Created Service API for Magento_Catalog Module:
16+
* Implemented the Product API
17+
* Implemented the ProductAttributeRead API
18+
* Fixed bugs:
19+
* Fixed issues with form elements visibility on the backend
20+
* Fixed an issue where backend forms contained an excessive container
21+
* Fixed an issue where a wrong category structure was displayed on the Category page
22+
* Fixed an issue where the pub/index.php entry point was broken because of the obsolete constants
23+
* Fixed an issue where it was impossible to pass an empty array as an argument in DI configuration and layout updates
24+
* Fixed an issue with status and visibility settings of a related product on the backend
25+
* Fixed an issue with unused DB indexes, which used resources, but did not contribute to higher performance
26+
* Fixed an issue where it was possible to create a downloadable product without specifying a link or a file
27+
* Fixed an issue where a fatal error occured when opening a fixed bundle product with custom options page on the frontend
28+
* Fixed an issue where the was a wrong config key for backend cataloginventory
29+
* Processed GitHub requests:
30+
* [#548] (https://github.com/magento/magento2/issues/548) -- Console installer doesn't checks filesystem permissions
31+
* [#552] (https://github.com/magento/magento2/issues/552) -- backend notifications sitebuild bug
32+
* [#562] (https://github.com/magento/magento2/pull/562) -- Bugfix Magento\Framework\DB\Adapter\Pdo\Mysql::getCreateTable()
33+
* [#565] (https://github.com/magento/magento2/pull/565) -- Magento\CatalogSearch\Model\Query::getResultCollection() not working
34+
* [#557] (https://github.com/magento/magento2/issues/557) -- translation anomalies backend login page
35+
* Added the following functional tests:
36+
* Advanced Search
37+
* Existing Customer Creation
38+
* Product Attribute Creation
39+
* Product Rating Creation
40+
* Sales Rule Creation
41+
* System Product Attribute Deletion
42+
* Tax Rate Creation
43+
* Tax Rule Deletion
44+
* Update Category
45+
* Update Category Url Rewrite
46+
* Update Product Url Rewrite
47+
148
2.0.0.0-dev81
249
=============
350
* Framework improvements:

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@
3030
*/
3131
class ToolbarEntry extends \Magento\Backend\Block\Template
3232
{
33+
/**
34+
* Number of notifications showed on expandable window
35+
*/
36+
const NOTIFICATIONS_NUMBER = 4;
37+
3338
/**
3439
* Collection of latest unread notifications
3540
*
@@ -68,7 +73,7 @@ public function getUnreadNotificationCount()
6873
*/
6974
public function getLatestUnreadNotifications()
7075
{
71-
return $this->_notificationList;
76+
return $this->_notificationList->setPageSize(self::NOTIFICATIONS_NUMBER);
7277
}
7378

7479
/**

app/code/Magento/Backend/Block/Widget/Grid/Extended.php

Lines changed: 32 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba
4646
*
4747
* @var \Magento\Framework\Data\Collection
4848
*/
49-
protected $_collection = null;
49+
protected $_collection;
5050

5151
/**
5252
* Export flag
@@ -81,14 +81,14 @@ class Extended extends \Magento\Backend\Block\Widget\Grid implements \Magento\Ba
8181
*
8282
* @var string
8383
*/
84-
protected $_massactionIdField = null;
84+
protected $_massactionIdField;
8585

8686
/**
8787
* Massaction row id filter
8888
*
8989
* @var string
9090
*/
91-
protected $_massactionIdFilter = null;
91+
protected $_massactionIdFilter;
9292

9393
/**
9494
* Massaction block name
@@ -202,9 +202,7 @@ protected function _prepareLayout()
202202
{
203203
$this->setChild(
204204
'export_button',
205-
$this->getLayout()->createBlock(
206-
'Magento\Backend\Block\Widget\Button'
207-
)->setData(
205+
$this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')->setData(
208206
array(
209207
'label' => __('Export'),
210208
'onclick' => $this->getJsObjectName() . '.doExport()',
@@ -214,17 +212,13 @@ protected function _prepareLayout()
214212
);
215213
$this->setChild(
216214
'reset_filter_button',
217-
$this->getLayout()->createBlock(
218-
'Magento\Backend\Block\Widget\Button'
219-
)->setData(
215+
$this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')->setData(
220216
array('label' => __('Reset Filter'), 'onclick' => $this->getJsObjectName() . '.resetFilter()')
221217
)
222218
);
223219
$this->setChild(
224220
'search_button',
225-
$this->getLayout()->createBlock(
226-
'Magento\Backend\Block\Widget\Button'
227-
)->setData(
221+
$this->getLayout()->createBlock('Magento\Backend\Block\Widget\Button')->setData(
228222
array(
229223
'label' => __('Search'),
230224
'onclick' => $this->getJsObjectName() . '.doFilter()',
@@ -289,15 +283,11 @@ public function addColumn($columnId, $column)
289283
if (is_array($column)) {
290284
$this->getColumnSet()->setChild(
291285
$columnId,
292-
$this->getLayout()->createBlock(
293-
'Magento\Backend\Block\Widget\Grid\Column\Extended'
294-
)->setData(
295-
$column
296-
)->setId(
297-
$columnId
298-
)->setGrid(
299-
$this
300-
)
286+
$this->getLayout()
287+
->createBlock('Magento\Backend\Block\Widget\Grid\Column\Extended')
288+
->setData($column)
289+
->setId($columnId)
290+
->setGrid($this)
301291
);
302292
$this->getColumnSet()->getChildBlock($columnId)->setGrid($this);
303293
} else {
@@ -437,19 +427,19 @@ protected function _prepareMassaction()
437427
protected function _prepareMassactionColumn()
438428
{
439429
$columnId = 'massaction';
440-
$massactionColumn = $this->getLayout()->createBlock(
441-
'Magento\Backend\Block\Widget\Grid\Column'
442-
)->setData(
443-
array(
444-
'index' => $this->getMassactionIdField(),
445-
'filter_index' => $this->getMassactionIdFilter(),
446-
'type' => 'massaction',
447-
'name' => $this->getMassactionBlock()->getFormFieldName(),
448-
'is_system' => true,
449-
'header_css_class' => 'col-select',
450-
'column_css_class' => 'col-select'
451-
)
452-
);
430+
$massactionColumn = $this->getLayout()
431+
->createBlock('Magento\Backend\Block\Widget\Grid\Column')
432+
->setData(
433+
array(
434+
'index' => $this->getMassactionIdField(),
435+
'filter_index' => $this->getMassactionIdFilter(),
436+
'type' => 'massaction',
437+
'name' => $this->getMassactionBlock()->getFormFieldName(),
438+
'is_system' => true,
439+
'header_css_class' => 'col-select',
440+
'column_css_class' => 'col-select'
441+
)
442+
);
453443

454444
if ($this->getNoFilterMassactionColumn()) {
455445
$massactionColumn->setData('filter', false);
@@ -980,8 +970,10 @@ public function _exportIterateCollection($callback, array $args)
980970
* @param \Magento\Framework\Filesystem\File\WriteInterface $stream
981971
* @return void
982972
*/
983-
protected function _exportCsvItem(\Magento\Framework\Object $item, \Magento\Framework\Filesystem\File\WriteInterface $stream)
984-
{
973+
protected function _exportCsvItem(
974+
\Magento\Framework\Object $item,
975+
\Magento\Framework\Filesystem\File\WriteInterface $stream
976+
) {
985977
$row = array();
986978
foreach ($this->getColumns() as $column) {
987979
if (!$column->getIsSystem()) {
@@ -1142,7 +1134,10 @@ public function getExcelFile($sheetName = '')
11421134
$this->_isExport = true;
11431135
$this->_prepareGrid();
11441136

1145-
$convert = new \Magento\Framework\Convert\Excel($this->getCollection()->getIterator(), array($this, 'getRowRecord'));
1137+
$convert = new \Magento\Framework\Convert\Excel(
1138+
$this->getCollection()->getIterator(),
1139+
array($this, 'getRowRecord')
1140+
);
11461141

11471142
$name = md5(microtime());
11481143
$file = $this->_path . '/' . $name . '.xml';

app/code/Magento/Backend/view/adminhtml/layout/default.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
</block>
204204
<block class="Magento\Theme\Block\Html\Head\Script" name="jquery-jquery-ui-timepicker-addon-js">
205205
<arguments>
206-
<argument name="file" xsi:type="string">jquery/jquery-ui-timepicker-addon-1.0.1.js</argument>
206+
<argument name="file" xsi:type="string">jquery/jquery-ui-timepicker-addon.js</argument>
207207
</arguments>
208208
</block>
209209
<block class="Magento\Theme\Block\Html\Head\Script" name="magento-calendar-js">

app/code/Magento/Backend/view/adminhtml/templates/admin/login.phtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@
7272
<div class="field field-username">
7373
<label for="username" class="label"><span><?php echo __('User Name:') ?></span></label>
7474
<div class="control">
75-
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text" placeholder="user name" />
75+
<input type="text" id="username" name="login[username]" value="" class="required-entry input-text" placeholder="<?php echo __('user name') ?>" />
7676
</div>
7777
</div>
7878
<div class="field field-password">
7979
<label for="login" class="label"><?php echo __('Password:') ?></label>
8080
<div class="control">
8181
<!-- This is a dummy hidden field to trick firefox from auto filling the password -->
8282
<input type="text" class="input-text no-display" name="dummy" id="dummy" />
83-
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" placeholder="password" />
83+
<input type="password" id="login" name="login[password]" class="required-entry input-text" value="" placeholder="<?php echo __('password') ?>" />
8484
</div>
8585
</div>
8686
<?php echo $this->getChildHtml('form.additional.info'); ?>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<?php
2+
/**
3+
* Magento
4+
*
5+
* NOTICE OF LICENSE
6+
*
7+
* This source file is subject to the Open Software License (OSL 3.0)
8+
* that is bundled with this package in the file LICENSE.txt.
9+
* It is also available through the world-wide-web at this URL:
10+
* http://opensource.org/licenses/osl-3.0.php
11+
* If you did not receive a copy of the license and are unable to
12+
* obtain it through the world-wide-web, please send an email
13+
* to license@magentocommerce.com so we can send you a copy immediately.
14+
*
15+
* DISCLAIMER
16+
*
17+
* Do not edit or add to this file if you wish to upgrade Magento to newer
18+
* versions in the future. If you wish to customize Magento for your
19+
* needs please refer to http://www.magentocommerce.com for more information.
20+
*
21+
* @copyright Copyright (c) 2014 X.commerce, Inc. (http://www.magentocommerce.com)
22+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
23+
*/
24+
namespace Magento\Bundle\Model\Plugin;
25+
26+
/**
27+
* Class PriceBackend
28+
*
29+
* Make price validation optional for bundle dynamic
30+
*/
31+
class PriceBackend
32+
{
33+
/**
34+
* @param \Magento\Catalog\Model\Product\Attribute\Backend\Price $subject
35+
* @param Closure $proceed
36+
* @param \Magento\Catalog\Model\Product $product
37+
* @return bool
38+
* @SuppressWarnings(PHPMD.UnusedFormalParameter)
39+
*/
40+
public function aroundValidate(
41+
\Magento\Catalog\Model\Product\Attribute\Backend\Price $subject,
42+
\Closure $proceed,
43+
\Magento\Catalog\Model\Product $product
44+
) {
45+
if ($product->getPriceType() == \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC) {
46+
return true;
47+
} else {
48+
return $proceed($product);
49+
}
50+
}
51+
}

app/code/Magento/Bundle/etc/adminhtml/di.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,7 @@
3737
</argument>
3838
</arguments>
3939
</type>
40+
<type name="Magento\Catalog\Model\Product\Attribute\Backend\Price">
41+
<plugin name="bundle" type="Magento\Bundle\Model\Plugin\PriceBackend" sortOrder="100" />
42+
</type>
4043
</config>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@
7171
<item name="group_price" xsi:type="string">Magento\Bundle\Pricing\Price\GroupPrice</item>
7272
<item name="special_price" xsi:type="string">Magento\Bundle\Pricing\Price\SpecialPrice</item>
7373
<item name="msrp_price" xsi:type="string">Magento\Catalog\Pricing\Price\MsrpPrice</item>
74+
<item name="custom_option_price" xsi:type="string">Magento\Catalog\Pricing\Price\CustomOptionPrice</item>
7475
<item name="base_price" xsi:type="string">Magento\Catalog\Pricing\Price\BasePrice</item>
7576
<item name="configured_price" xsi:type="string">Magento\Bundle\Pricing\Price\ConfiguredPrice</item>
7677
<item name="bundle_option" xsi:type="string">Magento\Bundle\Pricing\Price\BundleOptionPrice</item>

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Action/Attribute/Tab/Inventory.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
2323
*/
2424

25-
/**
26-
* Products mass update inventory tab
27-
*
28-
* @author Magento Core Team <core@magentocommerce.com>
29-
*/
3025
namespace Magento\Catalog\Block\Adminhtml\Product\Edit\Action\Attribute\Tab;
3126

3227
use Magento\CatalogInventory\Model\Stock\Item;
3328

29+
/**
30+
* Products mass update inventory tab
31+
*/
3432
class Inventory extends \Magento\Backend\Block\Widget implements \Magento\Backend\Block\Widget\Tab\TabInterface
3533
{
3634
/**
@@ -91,7 +89,11 @@ public function getStoreId()
9189
*/
9290
public function getDefaultConfigValue($field)
9391
{
94-
return $this->_scopeConfig->getValue(Item::XML_PATH_ITEM . $field, \Magento\Store\Model\ScopeInterface::SCOPE_STORE, $this->getStoreId());
92+
return $this->_scopeConfig->getValue(
93+
Item::XML_PATH_ITEM . $field,
94+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE,
95+
$this->getStoreId()
96+
);
9597
}
9698

9799
/**

app/code/Magento/Catalog/Block/Adminhtml/Product/Edit/Tab/Inventory.php

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525

2626
/**
2727
* Product inventory data
28-
*
29-
* @author Magento Core Team <core@magentocommerce.com>
3028
*/
3129
class Inventory extends \Magento\Backend\Block\Widget
3230
{
@@ -40,14 +38,14 @@ class Inventory extends \Magento\Backend\Block\Widget
4038
*
4139
* @var \Magento\Catalog\Helper\Data
4240
*/
43-
protected $_catalogData = null;
41+
protected $_catalogData;
4442

4543
/**
4644
* Core registry
4745
*
4846
* @var \Magento\Framework\Registry
4947
*/
50-
protected $_coreRegistry = null;
48+
protected $_coreRegistry;
5149

5250
/**
5351
* @var \Magento\CatalogInventory\Model\Source\Stock
@@ -138,7 +136,10 @@ public function getFieldValue($field)
138136
return $this->getStockItem()->getDataUsingMethod($field);
139137
}
140138

141-
return $this->_scopeConfig->getValue(\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_ITEM . $field, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
139+
return $this->_scopeConfig->getValue(
140+
\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_ITEM . $field,
141+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
142+
);
142143
}
143144

144145
/**
@@ -153,7 +154,10 @@ public function getConfigFieldValue($field)
153154
}
154155
}
155156

156-
return $this->_scopeConfig->getValue(\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_ITEM . $field, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
157+
return $this->_scopeConfig->getValue(
158+
\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_ITEM . $field,
159+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
160+
);
157161
}
158162

159163
/**
@@ -162,7 +166,10 @@ public function getConfigFieldValue($field)
162166
*/
163167
public function getDefaultConfigValue($field)
164168
{
165-
return $this->_scopeConfig->getValue(\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_ITEM . $field, \Magento\Store\Model\ScopeInterface::SCOPE_STORE);
169+
return $this->_scopeConfig->getValue(
170+
\Magento\CatalogInventory\Model\Stock\Item::XML_PATH_ITEM . $field,
171+
\Magento\Store\Model\ScopeInterface::SCOPE_STORE
172+
);
166173
}
167174

168175
/**

0 commit comments

Comments
 (0)