Skip to content

Commit

Permalink
🔃 [EngCom] Public Pull Requests - 2.2-develop
Browse files Browse the repository at this point in the history
Accepted Public Pull Requests:
 - #13173: Performance: remove count() form the condition section of a loop (by @coderimus)
 - #13855: Invoice grid shows wrong subtotal for partial items invoice. It shows order's subtotal instead if invoiced item's subtotal (by @ankurvr)
 - #14030: [FIX] Remove not used and empty template (by @coderimus)
 - #14026: [FIX] Remove not used variable in template (by @coderimus)
 - #14011: Added alias to block 'product.info.description' (by @chedaroo)
 - #14013: Use `^1.4` for `composer/composer` (by @sandermangel)


Fixed GitHub Issues:
 - #13804: Invoice grid shows wrong subtotal for partial items invoice. It shows order's subtotal instead if invoiced item's subtotal (reported by @ankurvr) has been fixed in #13855 by @ankurvr in 2.2-develop branch
   Related commits:
     1. 579b074
  • Loading branch information
magento-engcom-team authored Mar 9, 2018
2 parents 9c538a1 + 36e7a41 commit 3f053dd
Show file tree
Hide file tree
Showing 12 changed files with 20 additions and 19 deletions.
5 changes: 3 additions & 2 deletions app/code/Magento/Backend/Model/Widget/Grid/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ public function parseExpression($expression)
$expression = trim($expression);
foreach ($this->_operations as $operation) {
$splittedExpr = preg_split('/\\' . $operation . '/', $expression, -1, PREG_SPLIT_DELIM_CAPTURE);
if (count($splittedExpr) > 1) {
for ($i = 0; $i < count($splittedExpr); $i++) {
$count = count($splittedExpr);
if ($count > 1) {
for ($i = 0; $i < $count; $i++) {
$stack = array_merge($stack, $this->parseExpression($splittedExpr[$i]));
if ($i > 0) {
$stack[] = $operation;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,8 @@ public function getMaxPrice()
public function getPriorFilters($filterParams)
{
$priorFilters = [];
for ($i = 1; $i < count($filterParams); ++$i) {
$count = count($filterParams);
for ($i = 1; $i < $count; ++$i) {
$priorFilter = $this->validateFilter($filterParams[$i]);
if ($priorFilter) {
$priorFilters[] = $priorFilter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@
</block>
</container>
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.details" template="Magento_Catalog::product/view/details.phtml" after="product.info.media">
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
<block class="Magento\Catalog\Block\Product\View\Description" name="product.info.description" as="description" template="Magento_Catalog::product/view/attribute.phtml" group="detailed_info">
<arguments>
<argument name="at_call" xsi:type="string">getDescription</argument>
<argument name="at_code" xsi:type="string">description</argument>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ public function testGetDependenciesWhenDependentIsInvisible($isValueSatisfy)
{
$expected = [];
$rowData = array_values($this->_testData);
for ($i = 0; $i < count($this->_testData); ++$i) {
$count = count($this->_testData);
for ($i = 0; $i < $count; ++$i) {
$data = $rowData[$i];
$dependentPath = 'some path ' . $i;
$field = $this->_getField(
Expand Down Expand Up @@ -158,7 +159,8 @@ public function testGetDependenciesIsVisible()
{
$expected = [];
$rowData = array_values($this->_testData);
for ($i = 0; $i < count($this->_testData); ++$i) {
$count = count($this->_testData);
for ($i = 0; $i < $count; ++$i) {
$data = $rowData[$i];
$field = $this->_getField(
true,
Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/Paypal/Model/Report/Settlement.php
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,8 @@ public function parseCsv($localCsv, $format = 'new')
// Section columns.
// In case ever the column order is changed, we will have the items recorded properly
// anyway. We have named, not numbered columns.
for ($i = 1; $i < count($line); $i++) {
$count = count($line);
for ($i = 1; $i < $count; $i++) {
$sectionColumns[$line[$i]] = $i;
}
$flippedSectionColumns = array_flip($sectionColumns);
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Sales/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -686,7 +686,7 @@
<item name="billing_address" xsi:type="object">BillingAddressAggregator</item>
<item name="shipping_address" xsi:type="object">ShippingAddressAggregator</item>
<item name="shipping_information" xsi:type="string">sales_order.shipping_description</item>
<item name="subtotal" xsi:type="string">sales_order.base_subtotal</item>
<item name="subtotal" xsi:type="string">sales_invoice.base_subtotal</item>
<item name="shipping_and_handling" xsi:type="string">sales_order.base_shipping_amount</item>
<item name="base_grand_total" xsi:type="string">sales_invoice.base_grand_total</item>
<item name="grand_total" xsi:type="string">sales_invoice.grand_total</item>
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
</tr>

<?php if ($this->helper('Magento\Tax\Helper\Data')->displayFullSummary() && $_value != 0): ?>
<?php $isTop = 1; ?>
<?php foreach ($block->getTotal()->getFullInfo() as $info): ?>
<?php if (isset($info['hidden']) && $info['hidden']) {
continue;
Expand All @@ -64,7 +63,6 @@
<?php endif; ?>
</tr>
<?php $isFirst = 0; ?>
<?php $isTop = 0; ?>
<?php endforeach; ?>
<?php endforeach; ?>
<?php endif;?>
3 changes: 2 additions & 1 deletion app/code/Magento/Usps/Model/Carrier.php
Original file line number Diff line number Diff line change
Expand Up @@ -2054,7 +2054,8 @@ protected function _parseZip($zipString, $returnFull = false)
if (preg_match('/[\\d\\w]{5}\\-[\\d\\w]{4}/', $zipString) != 0) {
$zip = explode('-', $zipString);
}
for ($i = 0; $i < count($zip); ++$i) {
$count = count($zip);
for ($i = 0; $i < $count; ++$i) {
if (strlen($zip[$i]) == 5) {
$zip5 = $zip[$i];
} elseif (strlen($zip[$i]) == 4) {
Expand Down
3 changes: 2 additions & 1 deletion app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,8 @@ private function handlePrimitive($name, $prefix)
private function convertPathParams($uri)
{
$parts = explode('/', $uri);
for ($i=0; $i < count($parts); $i++) {
$count = count($parts);
for ($i=0; $i < $count; $i++) {
if (strpos($parts[$i], ':') === 0) {
$parts[$i] = '{' . substr($parts[$i], 1) . '}';
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ public function addAnnotation(\DOMElement $element, $documentation, $default = n
$this->_processElementType($elementType, $documentation, $appInfoNode);

if (preg_match_all('/{([a-z]+):(.+)}/Ui', $documentation, $matches)) {
for ($i = 0; $i < count($matches[0]); $i++) {
$count = count($matches[0]);
for ($i = 0; $i < $count; $i++) {
$appinfoTag = $matches[0][$i];
$tagName = $matches[1][$i];
$tagValue = $matches[2][$i];
Expand Down
2 changes: 1 addition & 1 deletion lib/internal/Magento/Framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"ext-bcmath": "*",
"symfony/process": "~2.1",
"colinmollenhour/php-redis-session-abstract": "1.3.4",
"composer/composer": "1.4.1",
"composer/composer": "^1.4",
"monolog/monolog": "^1.17",
"oyejorge/less.php": "~1.7.0",
"symfony/console": "~2.3, !=2.7.0",
Expand Down

0 comments on commit 3f053dd

Please sign in to comment.