diff --git a/README.md b/README.md index bc6bb678b23cb..aa83b880ca38d 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Open Source Helpers](https://www.codetriage.com/magento/magento2/badges/users.svg)](https://www.codetriage.com/magento/magento2) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/magento/magento2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Welcome

-Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results. +Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting-edge, feature-rich eCommerce solution that gets results. The installation instructions that used to be here are now published on our GitHub site. Use the information on this page to get started or go directly to the guide. diff --git a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php index 68de06c1c22bd..f74a2907b318f 100644 --- a/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php +++ b/app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php @@ -61,8 +61,10 @@ public function execute() if (empty($result)) { $result[] = [ 'severity' => (string)\Magento\Framework\Notification\MessageInterface::SEVERITY_NOTICE, - 'text' => 'You have viewed and resolved all recent system notices. ' - . 'Please refresh the web page to clear the notice alert.', + 'text' => __( + 'You have viewed and resolved all recent system notices. ' + . 'Please refresh the web page to clear the notice alert.' + ) ]; } $this->getResponse()->representJson($this->jsonHelper->jsonEncode($result)); diff --git a/app/code/Magento/AdminNotification/i18n/en_US.csv b/app/code/Magento/AdminNotification/i18n/en_US.csv index 7b55e96976cad..8f780efa6c184 100644 --- a/app/code/Magento/AdminNotification/i18n/en_US.csv +++ b/app/code/Magento/AdminNotification/i18n/en_US.csv @@ -49,3 +49,4 @@ Severity,Severity "Date Added","Date Added" Message,Message Actions,Actions +"You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert.","You have viewed and resolved all recent system notices. Please refresh the web page to clear the notice alert." diff --git a/app/code/Magento/Backend/App/AbstractAction.php b/app/code/Magento/Backend/App/AbstractAction.php index ba90bc0c3e210..ffcbf3028b060 100644 --- a/app/code/Magento/Backend/App/AbstractAction.php +++ b/app/code/Magento/Backend/App/AbstractAction.php @@ -214,6 +214,7 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) $this->_view->loadLayout(['default', 'adminhtml_denied'], true, true, false); $this->_view->renderLayout(); $this->_request->setDispatched(true); + return $this->_response; } @@ -223,6 +224,11 @@ public function dispatch(\Magento\Framework\App\RequestInterface $request) $this->_processLocaleSettings(); + // Need to preload isFirstPageAfterLogin (see https://github.com/magento/magento2/issues/15510) + if ($this->_auth->isLoggedIn()) { + $this->_auth->getAuthStorage()->isFirstPageAfterLogin(); + } + return parent::dispatch($request); } diff --git a/app/code/Magento/Backend/Block/Dashboard.php b/app/code/Magento/Backend/Block/Dashboard.php index c8bfb9fdf3110..86dcbe2a625fe 100644 --- a/app/code/Magento/Backend/Block/Dashboard.php +++ b/app/code/Magento/Backend/Block/Dashboard.php @@ -18,7 +18,7 @@ class Dashboard extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'dashboard/index.phtml'; + protected $_template = 'Magento_Backend::dashboard/index.phtml'; /** * @return void diff --git a/app/code/Magento/Backend/Block/Dashboard/Graph.php b/app/code/Magento/Backend/Block/Dashboard/Graph.php index 301dffbdc4987..8e238ccab44cb 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Graph.php +++ b/app/code/Magento/Backend/Block/Dashboard/Graph.php @@ -90,7 +90,7 @@ class Graph extends \Magento\Backend\Block\Dashboard\AbstractDashboard /** * @var string */ - protected $_template = 'dashboard/graph.phtml'; + protected $_template = 'Magento_Backend::dashboard/graph.phtml'; /** * Adminhtml dashboard data diff --git a/app/code/Magento/Backend/Block/Dashboard/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Grid.php index ac28dcd390ee6..ef812382c4b03 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Grid.php @@ -15,7 +15,7 @@ class Grid extends \Magento\Backend\Block\Widget\Grid\Extended /** * @var string */ - protected $_template = 'dashboard/grid.phtml'; + protected $_template = 'Magento_Backend::dashboard/grid.phtml'; /** * Setting default for every grid on dashboard diff --git a/app/code/Magento/Backend/Block/Dashboard/Sales.php b/app/code/Magento/Backend/Block/Dashboard/Sales.php index c82d402d12ec6..891247a385cdf 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Sales.php +++ b/app/code/Magento/Backend/Block/Dashboard/Sales.php @@ -16,7 +16,7 @@ class Sales extends \Magento\Backend\Block\Dashboard\Bar /** * @var string */ - protected $_template = 'dashboard/salebar.phtml'; + protected $_template = 'Magento_Backend::dashboard/salebar.phtml'; /** * @var \Magento\Framework\Module\Manager diff --git a/app/code/Magento/Backend/Block/Dashboard/Totals.php b/app/code/Magento/Backend/Block/Dashboard/Totals.php index 2f07a88dcccbe..cf383c1e82d03 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Totals.php +++ b/app/code/Magento/Backend/Block/Dashboard/Totals.php @@ -17,7 +17,7 @@ class Totals extends \Magento\Backend\Block\Dashboard\Bar /** * @var string */ - protected $_template = 'dashboard/totalbar.phtml'; + protected $_template = 'Magento_Backend::dashboard/totalbar.phtml'; /** * @var \Magento\Framework\Module\Manager diff --git a/app/code/Magento/Backend/Block/Page/Copyright.php b/app/code/Magento/Backend/Block/Page/Copyright.php index afb3859de450d..613d00e95dc29 100644 --- a/app/code/Magento/Backend/Block/Page/Copyright.php +++ b/app/code/Magento/Backend/Block/Page/Copyright.php @@ -15,5 +15,5 @@ class Copyright extends \Magento\Backend\Block\Template * * @var string */ - protected $_template = 'page/copyright.phtml'; + protected $_template = 'Magento_Backend::page/copyright.phtml'; } diff --git a/app/code/Magento/Backend/Block/Page/Footer.php b/app/code/Magento/Backend/Block/Page/Footer.php index 6f6c9750ca15e..3448113ac2060 100644 --- a/app/code/Magento/Backend/Block/Page/Footer.php +++ b/app/code/Magento/Backend/Block/Page/Footer.php @@ -15,7 +15,7 @@ class Footer extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'page/footer.phtml'; + protected $_template = 'Magento_Backend::page/footer.phtml'; /** * @var \Magento\Framework\App\ProductMetadataInterface diff --git a/app/code/Magento/Backend/Block/Page/Header.php b/app/code/Magento/Backend/Block/Page/Header.php index 3dc781dab581d..4e1918f4465d9 100644 --- a/app/code/Magento/Backend/Block/Page/Header.php +++ b/app/code/Magento/Backend/Block/Page/Header.php @@ -18,7 +18,7 @@ class Header extends \Magento\Backend\Block\Template /** * @var string */ - protected $_template = 'page/header.phtml'; + protected $_template = 'Magento_Backend::page/header.phtml'; /** * Backend data diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php index 6c5d160ee7652..46ce129f5018a 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php +++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset.php @@ -23,7 +23,7 @@ class Fieldset extends \Magento\Backend\Block\Template implements \Magento\Frame /** * @var string */ - protected $_template = 'store/switcher/form/renderer/fieldset.phtml'; + protected $_template = 'Magento_Backend::store/switcher/form/renderer/fieldset.phtml'; /** * Retrieve an element diff --git a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php index d3c0195fe98b4..a3f896b6ce70c 100644 --- a/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php +++ b/app/code/Magento/Backend/Block/Store/Switcher/Form/Renderer/Fieldset/Element.php @@ -21,7 +21,7 @@ class Element extends \Magento\Backend\Block\Widget\Form\Renderer\Fieldset\Eleme /** * @var string */ - protected $_template = 'store/switcher/form/renderer/fieldset/element.phtml'; + protected $_template = 'Magento_Backend::store/switcher/form/renderer/fieldset/element.phtml'; /** * Retrieve an element diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php index 2cbe264c5f396..479a2b6b20293 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Column/Filter/Radio.php @@ -31,8 +31,7 @@ public function getCondition() { if ($this->getValue()) { return $this->getColumn()->getValue(); - } else { - return [['neq' => $this->getColumn()->getValue()], ['is' => new \Zend_Db_Expr('NULL')]]; } + return [['neq' => $this->getColumn()->getValue()], ['is' => new \Zend_Db_Expr('NULL')]]; } } diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php index 9ff5b4cab1953..d40e77f7f0580 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/AbstractMassaction.php @@ -205,9 +205,8 @@ public function getSelectedJson() if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) { $selected = explode(',', $selected); return join(',', $selected); - } else { - return ''; } + return ''; } /** @@ -220,9 +219,8 @@ public function getSelected() if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) { $selected = explode(',', $selected); return $selected; - } else { - return []; } + return []; } /** diff --git a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php index e4590410fc1e5..378368d9b92df 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -215,9 +215,8 @@ public function getSelectedJson() if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) { $selected = explode(',', $selected); return join(',', $selected); - } else { - return ''; } + return ''; } /** @@ -230,9 +229,8 @@ public function getSelected() if ($selected = $this->getRequest()->getParam($this->getFormFieldNameInternal())) { $selected = explode(',', $selected); return $selected; - } else { - return []; } + return []; } /** diff --git a/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php b/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php index 8b934e6760f63..588f3d1a8b827 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/Auth/Login.php @@ -46,9 +46,8 @@ public function execute() // redirect according to rewrite rule if ($requestUrl != $backendUrl) { return $this->getRedirect($backendUrl); - } else { - return $this->resultPageFactory->create(); } + return $this->resultPageFactory->create(); } /** diff --git a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php index 3ff6ab635e2bc..ac73d3629083a 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php @@ -29,9 +29,8 @@ private function getSecurityCookie() { if (!($this->securityCookie instanceof SecurityCookie)) { return \Magento\Framework\App\ObjectManager::getInstance()->get(SecurityCookie::class); - } else { - return $this->securityCookie; } + return $this->securityCookie; } /** diff --git a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml index 02e5145e569ff..585ae4b1ed4d6 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/widget/button/split.phtml @@ -41,11 +41,11 @@ - + diff --git a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html index 40a275ed6a98e..0b785aa9984aa 100644 --- a/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html +++ b/app/code/Magento/Backend/view/adminhtml/web/template/dynamic-rows/grid.html @@ -85,7 +85,7 @@
+ translate="'Search strings are either normal strings or regular expressions (PCRE). They are matched in the same order as entered.'">
: diff --git a/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php b/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php index 5c28b94ac9811..372415d3530c0 100644 --- a/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php +++ b/app/code/Magento/Braintree/Test/Unit/Model/Report/BraintreeTransactionStub.php @@ -34,10 +34,9 @@ public function __get($name) { if (array_key_exists($name, $this->_attributes)) { return $this->_attributes[$name]; - } else { - trigger_error('Undefined property on ' . get_class($this) . ': ' . $name, E_USER_NOTICE); - return null; } + trigger_error('Undefined property on ' . get_class($this) . ': ' . $name, E_USER_NOTICE); + return null; } /** diff --git a/app/code/Magento/Braintree/i18n/en_US.csv b/app/code/Magento/Braintree/i18n/en_US.csv index f5e2d36e1e9bb..bce38100b9e33 100644 --- a/app/code/Magento/Braintree/i18n/en_US.csv +++ b/app/code/Magento/Braintree/i18n/en_US.csv @@ -165,4 +165,5 @@ Debug,Debug "credit_card","Credit card" "apple_pay_card","Apple pay card" "android_pay_card","Android pay card" -"Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase." \ No newline at end of file +"Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase.","Accept credit/debit cards and PayPal in your Magento store.
No setup or monthly fees and your customers never leave your store to complete the purchase." +"Save for later use.","Save for later use." diff --git a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml index b039d4287a2e8..76a4a28307e26 100644 --- a/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml +++ b/app/code/Magento/Braintree/view/adminhtml/templates/form/cc.phtml @@ -84,7 +84,7 @@ $ccType = $block->getInfoData('cc_type'); name="payment[is_active_payment_token_enabler]" class="admin__control-checkbox"/>
diff --git a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php index e8efb593c441b..218814de99078 100644 --- a/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Adminhtml/Sales/Order/Items/Renderer.php @@ -62,9 +62,8 @@ public function getChildren($item) if (isset($itemsArray[$item->getOrderItem()->getId()])) { return $itemsArray[$item->getOrderItem()->getId()]; - } else { - return null; } + return null; } /** @@ -186,9 +185,8 @@ public function getOrderItem() { if ($this->getItem() instanceof \Magento\Sales\Model\Order\Item) { return $this->getItem(); - } else { - return $this->getItem()->getOrderItem(); } + return $this->getItem()->getOrderItem(); } /** diff --git a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php index d7f6f34b79b2f..b2ec246427afe 100644 --- a/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php +++ b/app/code/Magento/Bundle/Block/Catalog/Product/View/Type/Bundle/Option.php @@ -174,9 +174,8 @@ public function isSelected($selection) return in_array($selection->getSelectionId(), $selectedOptions); } elseif ($selectedOptions == 'None') { return false; - } else { - return $selection->getIsDefault() && $selection->isSaleable(); } + return $selection->getIsDefault() && $selection->isSaleable(); } /** diff --git a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php index 144115bee48d7..7932e41ef8d7e 100644 --- a/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php +++ b/app/code/Magento/Bundle/Block/Sales/Order/Items/Renderer.php @@ -114,9 +114,8 @@ public function getValueHtml($item) if ($attributes = $this->getSelectionAttributes($item)) { return sprintf('%d', $attributes['qty']) . ' x ' . $this->escapeHtml($item->getName()) . " " . $this->getOrder()->formatPrice($attributes['price']); - } else { - return $this->escapeHtml($item->getName()); } + return $this->escapeHtml($item->getName()); } /** @@ -151,9 +150,8 @@ public function getChildren($item) if (isset($itemsArray[$item->getOrderItem()->getId()])) { return $itemsArray[$item->getOrderItem()->getId()]; - } else { - return null; } + return null; } /** diff --git a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php index f3c0548f76e5d..1914d5b5146c3 100644 --- a/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php +++ b/app/code/Magento/Bundle/Model/Plugin/PriceBackend.php @@ -29,8 +29,7 @@ public function aroundValidate( && $object->getPriceType() == \Magento\Bundle\Model\Product\Price::PRICE_TYPE_DYNAMIC ) { return true; - } else { - return $proceed($object); } + return $proceed($object); } } diff --git a/app/code/Magento/Bundle/Model/Product/Type.php b/app/code/Magento/Bundle/Model/Product/Type.php index 58a0418ec3ebd..affabcb7be4f3 100644 --- a/app/code/Magento/Bundle/Model/Product/Type.php +++ b/app/code/Magento/Bundle/Model/Product/Type.php @@ -948,9 +948,8 @@ public function shakeSelections($firstItem, $secondItem) ]; if ($aPosition == $bPosition) { return 0; - } else { - return $aPosition < $bPosition ? -1 : 1; } + return $aPosition < $bPosition ? -1 : 1; } /** diff --git a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php index dd126b874745d..6741f62fad884 100644 --- a/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php +++ b/app/code/Magento/Bundle/Model/Sales/Order/Pdf/Items/AbstractItems.php @@ -44,9 +44,8 @@ public function getChildren($item) if (isset($itemsArray[$item->getOrderItem()->getId()])) { return $itemsArray[$item->getOrderItem()->getId()]; - } else { - return null; } + return null; } /** @@ -196,9 +195,8 @@ public function getOrderItem() { if ($this->getItem() instanceof \Magento\Sales\Model\Order\Item) { return $this->getItem(); - } else { - return $this->getItem()->getOrderItem(); } + return $this->getItem()->getOrderItem(); } /** diff --git a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php index 52d7f3a652f82..6d8b2105e9cf0 100644 --- a/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php +++ b/app/code/Magento/Bundle/Pricing/Adjustment/Calculator.php @@ -267,9 +267,8 @@ public function calculateBundleAmount($basePriceValue, $bundleProduct, $selectio { if ($bundleProduct->getPriceType() == Price::PRICE_TYPE_FIXED) { return $this->calculateFixedBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude); - } else { - return $this->calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude); } + return $this->calculateDynamicBundleAmount($basePriceValue, $bundleProduct, $selectionPriceList, $exclude); } /** diff --git a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php index cdfe31358cc15..60245bef722c6 100644 --- a/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php +++ b/app/code/Magento/Bundle/Pricing/Price/BundleSelectionPrice.php @@ -163,8 +163,7 @@ public function getProduct() { if ($this->bundleProduct->getPriceType() == Price::PRICE_TYPE_DYNAMIC) { return parent::getProduct(); - } else { - return $this->bundleProduct; } + return $this->bundleProduct; } } diff --git a/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php b/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php index df63c9c03cbf6..4f2f35b076d82 100644 --- a/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php +++ b/app/code/Magento/Bundle/Pricing/Price/ConfiguredPrice.php @@ -124,9 +124,8 @@ public function getValue() $this->priceInfo ->getPrice(BundleDiscountPrice::PRICE_CODE) ->calculateDiscount($configuredOptionsAmount); - } else { - return parent::getValue(); } + return parent::getValue(); } /** diff --git a/app/code/Magento/Captcha/i18n/en_US.csv b/app/code/Magento/Captcha/i18n/en_US.csv index 2de4ab5345c88..e9ab30df6a0ca 100644 --- a/app/code/Magento/Captcha/i18n/en_US.csv +++ b/app/code/Magento/Captcha/i18n/en_US.csv @@ -20,11 +20,7 @@ Forms,Forms "Number of Symbols","Number of Symbols" "Please specify 8 symbols at the most. Range allowed (e.g. 3-5)","Please specify 8 symbols at the most. Range allowed (e.g. 3-5)" "Symbols Used in CAPTCHA","Symbols Used in CAPTCHA" -" - Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.
Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer. - "," - Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.
Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer. - " +"Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.
Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer.","Please use only letters (a-z or A-Z) or numbers (0-9) in this field. No spaces or other characters are allowed.
Similar looking characters (e.g. ""i"", ""l"", ""1"") decrease chance of correct recognition by customer." "Case Sensitive","Case Sensitive" "Enable CAPTCHA on Storefront","Enable CAPTCHA on Storefront" "CAPTCHA for ""Create user"" and ""Forgot password"" forms is always enabled if chosen.","CAPTCHA for ""Create user"" and ""Forgot password"" forms is always enabled if chosen." diff --git a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php index eb5203626e6e1..4f8840b31b577 100644 --- a/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php +++ b/app/code/Magento/Catalog/Model/Product/Type/AbstractType.php @@ -238,7 +238,7 @@ public function getChildrenIds($parentId, $required = true) } /** - * Retrieve parent ids array by requered child + * Retrieve parent ids array by required child * * @param int|array $childId * @return array diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php index 325d8ceee0d39..38831ed9138f1 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php @@ -311,7 +311,7 @@ public function joinUrlRewrite() ['request_path'], sprintf( '{{table}}.is_autogenerated = 1 AND {{table}}.store_id = %d AND {{table}}.entity_type = \'%s\'', - $this->_storeManager->getStore()->getId(), + $this->getStoreId(), CategoryUrlRewriteGenerator::ENTITY_TYPE ), 'left' diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php index d329ca6f51572..188167b7c609f 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Collection/AbstractCollection.php @@ -137,7 +137,7 @@ public function getDefaultStoreId() * * @param string $table * @param array|int $attributeIds - * @return \Magento\Eav\Model\Entity\Collection\AbstractCollection + * @return \Magento\Framework\DB\Select */ protected function _getLoadAttributesSelect($table, $attributeIds = []) { diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php index 406bd595401ca..886466c3ffd09 100644 --- a/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php +++ b/app/code/Magento/Catalog/Model/ResourceModel/Product/Collection.php @@ -1535,7 +1535,7 @@ protected function getEntityPkName(\Magento\Eav\Model\Entity\AbstractEntity $ent } /** - * Add requere tax percent flag for product collection + * Add require tax percent flag for product collection * * @return $this */ diff --git a/app/code/Magento/Catalog/Setup/InstallSchema.php b/app/code/Magento/Catalog/Setup/InstallSchema.php index d82f595600ce2..2307e848f00b4 100644 --- a/app/code/Magento/Catalog/Setup/InstallSchema.php +++ b/app/code/Magento/Catalog/Setup/InstallSchema.php @@ -674,7 +674,7 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con \Magento\Framework\DB\Ddl\Table::TYPE_SMALLINT, null, ['unsigned' => true, 'nullable' => false, 'default' => '0'], - 'Attriute Set ID' + 'Attribute Set ID' ) ->addColumn( 'parent_id', diff --git a/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/Collection/UrlRewriteTest.php b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/Collection/UrlRewriteTest.php new file mode 100644 index 0000000000000..d3b3ce05ee4b8 --- /dev/null +++ b/app/code/Magento/Catalog/Test/Unit/Model/ResourceModel/Category/Collection/UrlRewriteTest.php @@ -0,0 +1,39 @@ +_model = $this->getMockBuilder(\Magento\Catalog\Model\ResourceModel\Category\Collection::class) + ->disableOriginalConstructor() + ->setMethods(['joinTable']) + ->getMock(); + } + + public function testStoreIdUsedByUrlRewrite() + { + $cond = '{{table}}.is_autogenerated = 1 AND {{table}}.store_id = 100 AND {{table}}.entity_type = \'category\''; + $this->_model->expects($this->once()) + ->method('joinTable') + ->with( + $this->anything(), + $this->anything(), + $this->anything(), + $this->equalTo($cond), + $this->anything() + ); + $this->_model->setStoreId(100); + $this->_model->joinUrlRewrite(); + } +} diff --git a/app/code/Magento/Catalog/view/base/web/js/price-utils.js b/app/code/Magento/Catalog/view/base/web/js/price-utils.js index 36269ab1d241b..4d3747a108068 100644 --- a/app/code/Magento/Catalog/view/base/web/js/price-utils.js +++ b/app/code/Magento/Catalog/view/base/web/js/price-utils.js @@ -70,7 +70,7 @@ define([ am = Number(Math.round(Math.abs(amount - i) + 'e+' + precision) + ('e-' + precision)); r = (j ? i.substr(0, j) + groupSymbol : '') + i.substr(j).replace(re, '$1' + groupSymbol) + - (precision ? decimalSymbol + am.toFixed(2).replace(/-/, 0).slice(2) : ''); + (precision ? decimalSymbol + am.toFixed(precision).replace(/-/, 0).slice(2) : ''); return pattern.replace('%s', r).replace(/^\s\s*/, '').replace(/\s\s*$/, ''); } diff --git a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml index 5c8ca18fc5bc3..f79a2430fcab1 100644 --- a/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml +++ b/app/code/Magento/Catalog/view/frontend/templates/product/list.phtml @@ -47,7 +47,7 @@ $_helper = $this->helper('Magento\Catalog\Helper\Output'); ' : '
  • ' ?> -
    +
    getImage($_product, $image); if ($pos != null) { diff --git a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js index a819e4248fea7..3c969fc784bd5 100644 --- a/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js +++ b/app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js @@ -33,6 +33,10 @@ define([ _bindSubmit: function() { var self = this; + if (this.element.data('catalog-addtocart-initialized')) { + return; + } + this.element.data('catalog-addtocart-initialized', 1); this.element.on('submit', function(e) { e.preventDefault(); self.submitForm($(this)); diff --git a/app/code/Magento/Checkout/etc/webapi.xml b/app/code/Magento/Checkout/etc/webapi.xml index 7b435db200f19..26c601a4e9f38 100644 --- a/app/code/Magento/Checkout/etc/webapi.xml +++ b/app/code/Magento/Checkout/etc/webapi.xml @@ -104,7 +104,7 @@ - + diff --git a/app/code/Magento/Config/Block/System/Config/Form.php b/app/code/Magento/Config/Block/System/Config/Form.php index 7498ae8fbc267..668744d147917 100644 --- a/app/code/Magento/Config/Block/System/Config/Form.php +++ b/app/code/Magento/Config/Block/System/Config/Form.php @@ -366,15 +366,6 @@ protected function _initElement( $data = $this->getConfigValue($path); } } - $fieldRendererClass = $field->getFrontendModel(); - if ($fieldRendererClass) { - $fieldRenderer = $this->_layout->getBlockSingleton($fieldRendererClass); - } else { - $fieldRenderer = $this->_fieldRenderer; - } - - $fieldRenderer->setForm($this); - $fieldRenderer->setConfigData($this->_configData); $elementName = $this->_generateElementName($field->getPath(), $fieldPrefix); $elementId = $this->_generateElementId($field->getPath($fieldPrefix)); @@ -420,7 +411,7 @@ protected function _initElement( if ($field->hasOptions()) { $formField->setValues($field->getOptions()); } - $formField->setRenderer($fieldRenderer); + $formField->setRenderer($this->resolveFieldRenderer($field)); } /** @@ -684,7 +675,7 @@ protected function _getAdditionalElementTypes() } /** - * Temporary moved those $this->getRequest()->getParam('blabla') from the code accross this block + * Temporary moved those $this->getRequest()->getParam('blabla') from the code across this block * to getBlala() methods to be later set from controller with setters */ @@ -791,4 +782,23 @@ private function getAppConfigDataValue($path) } return $data->getData($path); } + + /** + * @param \Magento\Config\Model\Config\Structure\Element\Field $field + * @return Form\Field|\Magento\Framework\View\Element\BlockInterface + * @throws \Magento\Framework\Exception\LocalizedException + */ + private function resolveFieldRenderer(\Magento\Config\Model\Config\Structure\Element\Field $field) + { + $fieldRendererClass = $field->getFrontendModel(); + if ($fieldRendererClass) { + $fieldRenderer = $this->_layout->getBlockSingleton($fieldRendererClass); + } else { + $fieldRenderer = $this->_fieldRenderer; + } + + $fieldRenderer->setForm($this); + $fieldRenderer->setConfigData($this->_configData); + return $fieldRenderer; + } } diff --git a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php index 38cca1bee6a6a..2aac25ef1be63 100644 --- a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php +++ b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php @@ -246,9 +246,8 @@ protected function _getSuperAttributeId($productId, $attributeId) { if (isset($this->_productSuperAttrs["{$productId}_{$attributeId}"])) { return $this->_productSuperAttrs["{$productId}_{$attributeId}"]; - } else { - return null; } + return null; } /** @@ -605,7 +604,7 @@ protected function _insertData() } /** - * Get new supper attribute id. + * Get new super attribute id. * * @return int */ diff --git a/app/code/Magento/Customer/Controller/Section/Load.php b/app/code/Magento/Customer/Controller/Section/Load.php index e99dcdb2cf96a..dbe640ef2a365 100644 --- a/app/code/Magento/Customer/Controller/Section/Load.php +++ b/app/code/Magento/Customer/Controller/Section/Load.php @@ -61,6 +61,8 @@ public function execute() { /** @var \Magento\Framework\Controller\Result\Json $resultJson */ $resultJson = $this->resultJsonFactory->create(); + $resultJson->setHeader('Cache-Control', 'max-age=0, must-revalidate, no-cache, no-store', true); + $resultJson->setHeader('Pragma', 'no-cache', true); try { $sectionNames = $this->getRequest()->getParam('sections'); $sectionNames = $sectionNames ? array_unique(\explode(',', $sectionNames)) : null; diff --git a/app/code/Magento/Customer/Model/Session.php b/app/code/Magento/Customer/Model/Session.php index adff23cea698e..d951cad90558d 100644 --- a/app/code/Magento/Customer/Model/Session.php +++ b/app/code/Magento/Customer/Model/Session.php @@ -552,7 +552,7 @@ public function setAfterAuthUrl($url) } /** - * Reset core session hosts after reseting session ID + * Reset core session hosts after resetting session ID * * @return $this */ diff --git a/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml b/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml index 6c011330b9798..e020b9a95b55c 100644 --- a/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml +++ b/app/code/Magento/Marketplace/view/adminhtml/templates/partners.phtml @@ -11,7 +11,7 @@ $partners = $block->getPartners(); ?> - getPartners() as $partner) : ?> +
    */ diff --git a/app/code/Magento/Multishipping/Block/Checkout/Shipping.php b/app/code/Magento/Multishipping/Block/Checkout/Shipping.php index c254c9c8e9981..4041e7da7bdd8 100644 --- a/app/code/Magento/Multishipping/Block/Checkout/Shipping.php +++ b/app/code/Magento/Multishipping/Block/Checkout/Shipping.php @@ -9,7 +9,7 @@ use Magento\Quote\Model\Quote\Address; /** - * Mustishipping checkout shipping + * Multishipping checkout shipping * * @author Magento Core Team */ diff --git a/app/code/Magento/Paypal/Model/Api/Nvp.php b/app/code/Magento/Paypal/Model/Api/Nvp.php index b4417a33ffc46..dcc450a29fd47 100644 --- a/app/code/Magento/Paypal/Model/Api/Nvp.php +++ b/app/code/Magento/Paypal/Model/Api/Nvp.php @@ -1027,7 +1027,7 @@ public function callGetPalDetails() } /** - * Set Customer BillingA greement call + * Set Customer BillingAgreement call * * @return void * @link https://cms.paypal.com/us/cgi-bin/?&cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_SetCustomerBillingAgreement @@ -1418,7 +1418,7 @@ protected function _deformatNVP($nvpstr) $nvpstr = strpos($nvpstr, "\r\n\r\n") !== false ? substr($nvpstr, strpos($nvpstr, "\r\n\r\n") + 4) : $nvpstr; while (strlen($nvpstr)) { - //postion of Key + //position of Key $keypos = strpos($nvpstr, '='); //position of value $valuepos = strpos($nvpstr, '&') ? strpos($nvpstr, '&') : strlen($nvpstr); @@ -1426,7 +1426,7 @@ protected function _deformatNVP($nvpstr) /*getting the Key and Value values and storing in a Associative Array*/ $keyval = substr($nvpstr, $intial, $keypos); $valval = substr($nvpstr, $keypos + 1, $valuepos - $keypos - 1); - //decoding the respose + //decoding the response $nvpArray[urldecode($keyval)] = urldecode($valval); $nvpstr = substr($nvpstr, $valuepos + 1, strlen($nvpstr)); } diff --git a/app/code/Magento/Paypal/i18n/en_US.csv b/app/code/Magento/Paypal/i18n/en_US.csv index 56ec49f4eb0d4..02eb325a808d0 100644 --- a/app/code/Magento/Paypal/i18n/en_US.csv +++ b/app/code/Magento/Paypal/i18n/en_US.csv @@ -348,7 +348,7 @@ expires,expires here,here " to learn more."," to learn more." "Important: ","Important: " -"To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.","To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website." +"To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.","To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website." "Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below","Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below" "To use PayPal Payflow Link, you must configure your PayPal Payflow Link account on the PayPal website.","To use PayPal Payflow Link, you must configure your PayPal Payflow Link account on the PayPal website." "Once you log into your PayPal Payflow Link account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below","Once you log into your PayPal Payflow Link account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below" @@ -680,3 +680,4 @@ User,User "payflowpro","Payflow Pro" "Payments Pro","Payments Pro" "Website Payments Pro","Website Payments Pro" +"Save for later use.","Save for later use." diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml index 6442ce7c81921..00f9b5e969634 100644 --- a/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml +++ b/app/code/Magento/Paypal/view/adminhtml/templates/system/config/payflowlink/advanced.phtml @@ -12,7 +12,7 @@

    escapeHtml(__('Important: ')); ?> - escapeHtml(__('To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.')); ?> + escapeHtml(__('To use PayPal Payments Advanced, you must configure your PayPal Payments Advanced account on the PayPal website.')); ?> escapeHtml(__('Once you log into your PayPal Advanced account, navigate to the Service Settings - Hosted Checkout Pages - Set Up menu and set the options described below')); ?>

      diff --git a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml index 8b050405cdaf2..8fdee5264bf62 100644 --- a/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml +++ b/app/code/Magento/Paypal/view/adminhtml/templates/transparent/form.phtml @@ -135,7 +135,7 @@ $ccExpMonth = $block->getInfoData('cc_exp_month'); name="payment[is_active_payment_token_enabler]" class="admin__control-checkbox"/>
    diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index 9b2ac61ef0989..5e5c356583b16 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -2363,13 +2363,17 @@ public function merge(Quote $quote) * Trigger collect totals after loading, if required * * @return $this + * @throws \Exception */ protected function _afterLoad() { // collect totals and save me, if required if (1 == $this->getData('trigger_recollect')) { - $this->collectTotals()->save(); + $this->collectTotals() + ->setTriggerRecollect(0) + ->save(); } + return parent::_afterLoad(); } diff --git a/app/code/Magento/Review/etc/adminhtml/menu.xml b/app/code/Magento/Review/etc/adminhtml/menu.xml index 2ed92a48ad421..e3532483f88af 100644 --- a/app/code/Magento/Review/etc/adminhtml/menu.xml +++ b/app/code/Magento/Review/etc/adminhtml/menu.xml @@ -9,7 +9,7 @@ - + diff --git a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php index 941af6a602439..9be077b39d122 100644 --- a/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php +++ b/app/code/Magento/Sales/Block/Adminhtml/Order/Create/Sidebar/AbstractSidebar.php @@ -69,7 +69,7 @@ public function canDisplay() } /** - * Retrieve disply item qty availablity + * Retrieve display item qty availability * * @return false */ diff --git a/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php b/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php index 0d78947cd523e..df674a93794c1 100644 --- a/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php +++ b/app/code/Magento/Sales/Model/Order/Email/Sender/OrderSender.php @@ -13,6 +13,7 @@ use Magento\Sales\Model\ResourceModel\Order as OrderResource; use Magento\Sales\Model\Order\Address\Renderer; use Magento\Framework\Event\ManagerInterface; +use Magento\Framework\DataObject; /** * Class OrderSender @@ -127,14 +128,17 @@ protected function prepareTemplate(Order $order) 'formattedShippingAddress' => $this->getFormattedShippingAddress($order), 'formattedBillingAddress' => $this->getFormattedBillingAddress($order), ]; - $transport = new \Magento\Framework\DataObject($transport); + $transportObject = new DataObject($transport); + /** + * Event argument `transport` is @deprecated. Use `transportObject` instead. + */ $this->eventManager->dispatch( 'email_order_set_template_vars_before', - ['sender' => $this, 'transport' => $transport] + ['sender' => $this, 'transport' => $transportObject->getData(), 'transportObject' => $transportObject] ); - $this->templateContainer->setTemplateVars($transport->getData()); + $this->templateContainer->setTemplateVars($transportObject->getData()); parent::prepareTemplate($order); } diff --git a/app/code/Magento/Sales/Model/Order/Shipment/Item.php b/app/code/Magento/Sales/Model/Order/Shipment/Item.php index e2ba72a870c33..64a1562da8739 100644 --- a/app/code/Magento/Sales/Model/Order/Shipment/Item.php +++ b/app/code/Magento/Sales/Model/Order/Shipment/Item.php @@ -146,8 +146,7 @@ public function getOrderItem() * Declare qty * * @param float $qty - * @return \Magento\Sales\Model\Order\Invoice\Item - * @throws \Magento\Framework\Exception\LocalizedException + * @return $this */ public function setQty($qty) { @@ -159,7 +158,6 @@ public function setQty($qty) * Applying qty to order item * * @return $this - * @throws \Magento\Framework\Exception\LocalizedException */ public function register() { diff --git a/app/code/Magento/Sales/etc/adminhtml/system.xml b/app/code/Magento/Sales/etc/adminhtml/system.xml index 8f004d9ad5968..9d6d11d56c81f 100644 --- a/app/code/Magento/Sales/etc/adminhtml/system.xml +++ b/app/code/Magento/Sales/etc/adminhtml/system.xml @@ -106,15 +106,15 @@ We'll use the default error above if you leave this empty. - + - + Magento\Config\Model\Config\Source\Yesno Improves dashboard performance but provides non-realtime data. - + diff --git a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php index 2b788d36acb0c..d58c8220813ef 100644 --- a/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php +++ b/app/code/Magento/SalesRule/Controller/Adminhtml/Promo/Quote.php @@ -74,7 +74,7 @@ protected function _initRule() /** * Initiate action * - * @return this + * @return $this */ protected function _initAction() { diff --git a/app/code/Magento/Search/view/frontend/web/form-mini.js b/app/code/Magento/Search/view/frontend/web/form-mini.js index 3cbedf6d876ca..51398168c6e19 100644 --- a/app/code/Magento/Search/view/frontend/web/form-mini.js +++ b/app/code/Magento/Search/view/frontend/web/form-mini.js @@ -51,7 +51,7 @@ define([ this.autoComplete = $(this.options.destinationSelector); this.searchForm = $(this.options.formSelector); this.submitBtn = this.searchForm.find(this.options.submitBtn)[0]; - this.searchLabel = $(this.options.searchLabel); + this.searchLabel = this.searchForm.find(this.options.searchLabel); this.isExpandable = this.options.isExpandable; _.bindAll(this, '_onKeyDown', '_onPropertyChange', '_onSubmit'); diff --git a/app/code/Magento/Security/Model/AdminSessionInfo.php b/app/code/Magento/Security/Model/AdminSessionInfo.php index 2da74ce7689b2..2a66aaad80cf7 100644 --- a/app/code/Magento/Security/Model/AdminSessionInfo.php +++ b/app/code/Magento/Security/Model/AdminSessionInfo.php @@ -154,7 +154,7 @@ public function isOtherSessionsTerminated() * Setter for isOtherSessionsTerminated * * @param bool $isOtherSessionsTerminated - * @return this + * @return $this */ public function setIsOtherSessionsTerminated($isOtherSessionsTerminated) { diff --git a/app/code/Magento/Security/etc/adminhtml/di.xml b/app/code/Magento/Security/etc/adminhtml/di.xml index c1188c2d405cf..79477e9443097 100644 --- a/app/code/Magento/Security/etc/adminhtml/di.xml +++ b/app/code/Magento/Security/etc/adminhtml/di.xml @@ -24,7 +24,7 @@ Magento\Security\Model\SecurityChecker\Frequency - Magento\Security\Model\SecurityChecker\Quantity + Magento\Security\Model\SecurityChecker\Quantity diff --git a/app/code/Magento/Store/Setup/InstallSchema.php b/app/code/Magento/Store/Setup/InstallSchema.php index 5f04bc07ce66c..d1048c95919f6 100644 --- a/app/code/Magento/Store/Setup/InstallSchema.php +++ b/app/code/Magento/Store/Setup/InstallSchema.php @@ -270,7 +270,13 @@ public function install(SchemaSetupInterface $setup, ModuleContextInterface $con */ $connection->insertForce( $installer->getTable('store_group'), - ['group_id' => 0, 'website_id' => 0, 'name' => 'Default', 'root_category_id' => 0, 'default_store_id' => 0] + [ + 'group_id' => 0, + 'website_id' => 0, + 'name' => 'Default', + 'root_category_id' => 0, + 'default_store_id' => 0 + ] ); $connection->insertForce( $installer->getTable('store_group'), diff --git a/app/code/Magento/Tax/Model/Config.php b/app/code/Magento/Tax/Model/Config.php index 713b34c16d1f2..64f5b44803848 100644 --- a/app/code/Magento/Tax/Model/Config.php +++ b/app/code/Magento/Tax/Model/Config.php @@ -831,12 +831,12 @@ public function getInfoUrl($store = null) * If it necessary will be returned conversion type (minus or plus) * * @param null|int|string|Store $store - * @return bool + * @return bool|int * @SuppressWarnings(PHPMD.CyclomaticComplexity) */ public function needPriceConversion($store = null) { - $res = false; + $res = 0; $priceIncludesTax = $this->priceIncludesTax($store) || $this->getNeedUseShippingExcludeTax(); if ($priceIncludesTax) { switch ($this->getPriceDisplayType($store)) { @@ -844,7 +844,7 @@ public function needPriceConversion($store = null) case self::DISPLAY_TYPE_BOTH: return self::PRICE_CONVERSION_MINUS; case self::DISPLAY_TYPE_INCLUDING_TAX: - $res = true; + $res = false; break; default: break; diff --git a/app/code/Magento/Translation/Block/Html/Head/Config.php b/app/code/Magento/Translation/Block/Html/Head/Config.php index 4001929191072..1a1f2d6942cdf 100644 --- a/app/code/Magento/Translation/Block/Html/Head/Config.php +++ b/app/code/Magento/Translation/Block/Html/Head/Config.php @@ -31,7 +31,6 @@ class Config extends \Magento\Framework\View\Element\AbstractBlock /** * @param \Magento\Framework\View\Element\Context $context - * @param RequireJsConfig $config * @param \Magento\Framework\View\Page\Config $pageConfig * @param \Magento\Translation\Model\FileManager $fileManager * @param Inline $inline diff --git a/app/code/Magento/Ui/Model/Export/ConvertToCsv.php b/app/code/Magento/Ui/Model/Export/ConvertToCsv.php index e8136c7520054..40b10749db21e 100644 --- a/app/code/Magento/Ui/Model/Export/ConvertToCsv.php +++ b/app/code/Magento/Ui/Model/Export/ConvertToCsv.php @@ -6,8 +6,10 @@ namespace Magento\Ui\Model\Export; use Magento\Framework\App\Filesystem\DirectoryList; +use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Directory\WriteInterface; use Magento\Ui\Component\MassAction\Filter; /** @@ -16,7 +18,7 @@ class ConvertToCsv { /** - * @var DirectoryList + * @var WriteInterface */ protected $directory; @@ -30,11 +32,17 @@ class ConvertToCsv */ protected $pageSize = null; + /** + * @var Filter + */ + protected $filter; + /** * @param Filesystem $filesystem * @param Filter $filter * @param MetadataProvider $metadataProvider * @param int $pageSize + * @throws FileSystemException */ public function __construct( Filesystem $filesystem, diff --git a/app/code/Magento/Ui/Model/Export/ConvertToXml.php b/app/code/Magento/Ui/Model/Export/ConvertToXml.php index 8f06193740cfc..2132256729a0f 100644 --- a/app/code/Magento/Ui/Model/Export/ConvertToXml.php +++ b/app/code/Magento/Ui/Model/Export/ConvertToXml.php @@ -10,8 +10,10 @@ use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\Convert\Excel; use Magento\Framework\Convert\ExcelFactory; +use Magento\Framework\Exception\FileSystemException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Filesystem; +use Magento\Framework\Filesystem\Directory\WriteInterface; use Magento\Ui\Component\MassAction\Filter; /** @@ -20,7 +22,7 @@ class ConvertToXml { /** - * @var DirectoryList + * @var WriteInterface */ protected $directory; @@ -49,12 +51,18 @@ class ConvertToXml */ protected $fields; + /** + * @var Filter + */ + protected $filter; + /** * @param Filesystem $filesystem * @param Filter $filter * @param MetadataProvider $metadataProvider * @param ExcelFactory $excelFactory * @param SearchResultIteratorFactory $iteratorFactory + * @throws FileSystemException */ public function __construct( Filesystem $filesystem, @@ -87,6 +95,7 @@ protected function getOptions() * Returns DB fields list * * @return array + * @throws LocalizedException */ protected function getFields() { @@ -102,6 +111,7 @@ protected function getFields() * * @param DocumentInterface $document * @return array + * @throws LocalizedException */ public function getRowData(DocumentInterface $document) { diff --git a/app/code/Magento/Ui/etc/di.xml b/app/code/Magento/Ui/etc/di.xml index bb29515777576..3b9803b72e26d 100644 --- a/app/code/Magento/Ui/etc/di.xml +++ b/app/code/Magento/Ui/etc/di.xml @@ -197,6 +197,7 @@ + Magento\Framework\Data\Argument\Interpreter\Constant configurableObjectArgumentInterpreterProxy configurableObjectArgumentInterpreterProxy arrayArgumentInterpreterProxy diff --git a/app/code/Magento/Ui/i18n/en_US.csv b/app/code/Magento/Ui/i18n/en_US.csv index f7f5b845ef8b6..109bebf1c836a 100644 --- a/app/code/Magento/Ui/i18n/en_US.csv +++ b/app/code/Magento/Ui/i18n/en_US.csv @@ -109,3 +109,25 @@ Ok,Ok Action,Action CSV,CSV "Excel XML","Excel XML" +"Please select one of the options above.","Please select one of the options above." +"Please select a file.","Please select a file." +"Please select one of the options.","Please select one of the options." +"Please enter a value less than or equal to %s.","Please enter a value less than or equal to %s." +"Please enter a value greater than or equal to %s.","Please enter a value greater than or equal to %s." +"Card type does not match credit card number.","Card type does not match credit card number." +"Credit card number does not match credit card type.","Credit card number does not match credit card type." +"Incorrect credit card expiration date.","Incorrect credit card expiration date." +"Please enter less or equal than %1 symbols.","Please enter less or equal than %1 symbols." +"Please enter more or equal than %1 symbols.","Please enter more or equal than %1 symbols." +"Please enter a valid value from list","Please enter a valid value from list" +"Please enter valid SKU key.","Please enter valid SKU key." +"Please enter a valid number.","Please enter a valid number." +"Admin is a required field in the each row.","Admin is a required field in the each row." +"Please fix this field.","Please fix this field." +"Please enter a valid date (ISO).","Please enter a valid date (ISO)." +"Please enter only digits.","Please enter only digits." +"Please enter the same value again.","Please enter the same value again." +"Please enter no more than {0} characters.","Please enter no more than {0} characters." +"Please enter at least {0} characters.","Please enter at least {0} characters." +"Please enter a value between {0} and {1} characters long.","Please enter a value between {0} and {1} characters long." +"Please enter a value between {0} and {1}.","Please enter a value between {0} and {1}." diff --git a/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows-grid.js b/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows-grid.js index f9586981b4419..4cbb971073d79 100644 --- a/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows-grid.js +++ b/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows-grid.js @@ -104,9 +104,8 @@ define([ * @param {String|Number} recordId */ deleteRecord: function (index, recordId) { - this._super(); - this.updateInsertData(recordId); + this._super(); }, /** diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js b/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js index 73b98230c3879..f7b86b4e7925d 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js +++ b/app/code/Magento/Ui/view/base/web/js/form/components/fieldset.js @@ -109,14 +109,14 @@ define([ * @returns {Group} Chainable. */ _setClasses: function () { - var addtional = this.additionalClasses, + var additional = this.additionalClasses, classes; - if (_.isString(addtional)) { - addtional = this.additionalClasses.split(' '); + if (_.isString(additional)) { + additional = this.additionalClasses.split(' '); classes = this.additionalClasses = {}; - addtional.forEach(function (name) { + additional.forEach(function (name) { classes[name] = true; }, this); } diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/group.js b/app/code/Magento/Ui/view/base/web/js/form/components/group.js index d785178220835..d9187a8f3c4e3 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/components/group.js +++ b/app/code/Magento/Ui/view/base/web/js/form/components/group.js @@ -54,14 +54,14 @@ define([ * @returns {Group} Chainable. */ _setClasses: function () { - var addtional = this.additionalClasses, + var additional = this.additionalClasses, classes; - if (_.isString(addtional)) { - addtional = this.additionalClasses.split(' '); + if (_.isString(additional)) { + additional = this.additionalClasses.split(' '); classes = this.additionalClasses = {}; - addtional.forEach(function (name) { + additional.forEach(function (name) { classes[name] = true; }, this); } diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/abstract.js b/app/code/Magento/Ui/view/base/web/js/form/element/abstract.js index c07135b1f246a..a7f2fdbd7d090 100755 --- a/app/code/Magento/Ui/view/base/web/js/form/element/abstract.js +++ b/app/code/Magento/Ui/view/base/web/js/form/element/abstract.js @@ -205,7 +205,7 @@ define([ }, /** - * Sets 'value' as 'hidden' propertie's value, triggers 'toggle' event, + * Sets 'value' as 'hidden' property's value, triggers 'toggle' event, * sets instance's hidden identifier in params storage based on * 'value'. * diff --git a/app/code/Magento/Ui/view/base/web/js/lib/core/class.js b/app/code/Magento/Ui/view/base/web/js/lib/core/class.js index aae3ca31bf803..5bfa87e650271 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/core/class.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/core/class.js @@ -27,12 +27,12 @@ define([ * Creates constructor function which allows * initialization without usage of a 'new' operator. * - * @param {Object} protoProps - Prototypal propeties of a new consturctor. - * @param {Function} consturctor - * @returns {Function} Created consturctor. + * @param {Object} protoProps - Prototypal properties of a new constructor. + * @param {Function} constructor + * @returns {Function} Created constructor. */ - function createConstructor(protoProps, consturctor) { - var UiClass = consturctor; + function createConstructor(protoProps, constructor) { + var UiClass = constructor; if (!UiClass) { @@ -61,7 +61,7 @@ define([ Class = createConstructor({ /** - * Entry point to the initialization of consturctors' instance. + * Entry point to the initialization of constructors' instance. * * @param {Object} [options={}] * @returns {Class} Chainable. diff --git a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php index d18060abe2245..1fcabe71bd5d8 100644 --- a/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php +++ b/app/code/Magento/UrlRewrite/Block/Catalog/Product/Edit.php @@ -55,7 +55,7 @@ protected function _prepareLayoutFeatures() } if ($this->_getProduct()->getId()) { - $this->_addProductLinkBlock($this->_getProduct()); + $this->_addProductLinkBlock(); } if ($this->_getCategory()->getId()) { diff --git a/app/code/Magento/User/Model/Backend/Config/ObserverConfig.php b/app/code/Magento/User/Model/Backend/Config/ObserverConfig.php index 29c4cc14ed674..e807749b11c32 100644 --- a/app/code/Magento/User/Model/Backend/Config/ObserverConfig.php +++ b/app/code/Magento/User/Model/Backend/Config/ObserverConfig.php @@ -72,7 +72,7 @@ public function getAdminPasswordLifetime() } /** - * Get admin maxiumum security failures from config + * Get admin maximum security failures from config * * @return int */ diff --git a/app/code/Magento/Webapi/Model/Soap/Fault.php b/app/code/Magento/Webapi/Model/Soap/Fault.php index 0c2b7680568d9..9761613763f7c 100644 --- a/app/code/Magento/Webapi/Model/Soap/Fault.php +++ b/app/code/Magento/Webapi/Model/Soap/Fault.php @@ -39,7 +39,9 @@ class Fault const NODE_DETAIL_WRAPPER = 'GenericFault'; /**#@-*/ - /** @var string */ + /** + * @var string + */ protected $_soapFaultCode; /** @@ -114,7 +116,7 @@ public function __construct( \Magento\Framework\Locale\ResolverInterface $localeResolver, State $appState ) { - $this->_soapCode = $exception->getOriginator(); + $this->_soapFaultCode = $exception->getOriginator(); $this->_parameters = $exception->getDetails(); $this->_wrappedErrors = $exception->getErrors(); $this->stackTrace = $exception->getStackTrace() ?: $exception->getTraceAsString(); @@ -194,7 +196,7 @@ public function getDetails() */ public function getSoapCode() { - return $this->_soapCode; + return $this->_soapFaultCode; } /** diff --git a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php index fe0d3ba0f8c79..23b6a334e435f 100644 --- a/app/code/Magento/Wishlist/Block/Rss/EmailLink.php +++ b/app/code/Magento/Wishlist/Block/Rss/EmailLink.php @@ -22,7 +22,7 @@ class EmailLink extends Link protected $_template = 'rss/email.phtml'; /** - * @return string + * @return array */ protected function getLinkParams() { diff --git a/app/code/Magento/Wishlist/Block/Rss/Link.php b/app/code/Magento/Wishlist/Block/Rss/Link.php index f671cbd3cd6d6..2c9093669db7d 100644 --- a/app/code/Magento/Wishlist/Block/Rss/Link.php +++ b/app/code/Magento/Wishlist/Block/Rss/Link.php @@ -69,7 +69,7 @@ public function isRssAllowed() } /** - * @return string + * @return array */ protected function getLinkParams() { diff --git a/app/code/Magento/Wishlist/CustomerData/Wishlist.php b/app/code/Magento/Wishlist/CustomerData/Wishlist.php index ec5ed1fedda95..ce04887732f6d 100644 --- a/app/code/Magento/Wishlist/CustomerData/Wishlist.php +++ b/app/code/Magento/Wishlist/CustomerData/Wishlist.php @@ -1,6 +1,6 @@ atttribute_default_value

    + * Checked tag structure attribute_default_value

    * * @param InjectableFixture $product * @param CatalogProductAttribute $attribute diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TierPrice.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TierPrice.php index 6ed4bbf4f5edb..1678e7a8dde02 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TierPrice.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/TierPrice.php @@ -41,7 +41,7 @@ class TierPrice extends DataSource private $fixtureFactory; /** - * Rought fixture field data. + * Rough fixture field data. * * @var array */ diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php index 2bd71dbf4f8a6..57fe2bb59154f 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/Fixture/Product/WebsiteIds.php @@ -37,7 +37,7 @@ class WebsiteIds extends DataSource private $fixtureFactory; /** - * Rought fixture field data. + * Rough fixture field data. * * @var array */ diff --git a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php index 3e889c058ee84..9a042ab13f048 100644 --- a/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php +++ b/dev/tests/functional/tests/app/Magento/Checkout/Test/Constraint/AssertBillingAddressSameAsShippingCheckbox.php @@ -37,7 +37,7 @@ public function processAssert(CheckoutOnepage $checkoutOnepage, $billingCheckbox } /** - * Returns a string representation of successfull assertion. + * Returns a string representation of successful assertion. * * @return string */ diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php index e7fd0d73878e3..1b9a1f305f778 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/Constraint/AssertProductTierPriceOnProductPage.php @@ -10,7 +10,7 @@ use Magento\ConfigurableProduct\Test\Block\Product\View\ConfigurableOptions; /** - * Open created configurble product on frontend and choose variation with tier price. + * Open created configurable product on frontend and choose variation with tier price. */ class AssertProductTierPriceOnProductPage extends AssertProductPage { diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php index ac90ef43c915c..6ea4545594716 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/TestCase/AbstractApplyVatIdTest.php @@ -76,7 +76,7 @@ public function __prepare(FixtureFactory $fixtureFactory) } /** - * Prepare VAT ID confguration. + * Prepare VAT ID configuration. * * @param ConfigData $vatConfig * @param string $customerGroup diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php index d94f5810c9865..e8417ba400ec5 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/TestCase/ReAuthorizeTokensIntegrationEntityTest.php @@ -52,7 +52,7 @@ class ReAuthorizeTokensIntegrationEntityTest extends Injectable * * @param FixtureFactory $fixtureFactory * @param IntegrationIndex $integrationIndex - * @retun void + * @return void */ public function __inject(IntegrationIndex $integrationIndex, FixtureFactory $fixtureFactory) { diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php index 3cc8d07da393e..8e31f21ca3b89 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/Block/Adminhtml/Order/Create/CustomerActivities/Sidebar.php @@ -29,7 +29,7 @@ abstract class Sidebar extends Block protected $addToOrderProductName = './/tr/td[.="%s"]'; /** - * Add productz to order. + * Add products to order. * * @param array $products * @return void diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php index 2dc482b368424..da99481f43c70 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CancelCreatedOrderTest.php @@ -22,7 +22,7 @@ * 2. Sales > Orders. * 3. Open the created order. * 4. Do cancel Order. - * 5. Perform all assetions. + * 5. Perform all assertions. * * @group Order_Management_(CS) * @ZephyrId MAGETWO-28191 diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php index 18a3206db86e4..017597eeab94f 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/TestCase/CreateCustomOrderStatusEntityTest.php @@ -31,7 +31,7 @@ class CreateCustomOrderStatusEntityTest extends Injectable /* end tags */ /** - * Order staus page. + * Order status page. * * @var OrderStatusIndex */ diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php index 472218205cb4f..381de91030a61 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/Constraint/AssertCartPriceRuleSuccessDeleteMessage.php @@ -10,7 +10,7 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** - * Assert sales rule delte message. + * Assert sales rule delete message. */ class AssertCartPriceRuleSuccessDeleteMessage extends AbstractConstraint { diff --git a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php index 0bcf20b38801e..30842af0b020d 100644 --- a/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php +++ b/dev/tests/functional/tests/app/Magento/Theme/Test/Block/Html/Footer.php @@ -120,7 +120,7 @@ public function selectStoreGroup(Store $store) } /** - * Check if correspondent "Store" is present in "Store" swither or not. + * Check if correspondent "Store" is present in "Store" switcher or not. * * @param Store $store * @return bool diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php index 78b1c40c3b0a0..e4d5dd8618ade 100644 --- a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php +++ b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/DataGrid.php @@ -339,7 +339,7 @@ public function selectMassAction($massActionSelection) } /** - * Peform action using the dropdown above the grid. + * Perform action using the dropdown above the grid. * * @param array|string $action [array -> key = value from first select; value => value from subselect] * @return void diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php index 605a5a114083e..01e2011fc750e 100644 --- a/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php +++ b/dev/tests/functional/tests/app/Magento/Ui/Test/Block/Adminhtml/Modal.php @@ -131,7 +131,7 @@ public function setAlertText($text) } /** - * Wait until modal window will disapper. + * Wait until modal window will disappear. * * @return void */ diff --git a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php index 21b258ea05732..b9321c54585ff 100644 --- a/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php +++ b/dev/tests/functional/tests/app/Magento/Ui/Test/TestCase/GridFullTextSearchTest.php @@ -19,8 +19,8 @@ * Steps: * 1. Navigate to backend. * 2. Go to grid page - * 3. Perfrom full text search - * 5. Perform Asserts + * 3. Perform full text search + * 4. Perform Asserts * * @group Ui_(CS) * @ZephyrId MAGETWO-41330 diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php index 114709becde6f..988229d308250 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/Block/Adminhtml/Catalog/Edit/UrlRewriteForm.php @@ -39,7 +39,7 @@ protected function prepareData(FixtureInterface $fixture) * * @param array $data * @param SimpleElement $context - * @retun void + * @return void */ protected function fillFields(array $data, SimpleElement $context) { diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php index 7c4b05526fe66..52dfc910e1292 100644 --- a/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php +++ b/dev/tests/functional/tests/app/Magento/Widget/Test/Constraint/AssertWidgetCmsPageLink.php @@ -12,7 +12,7 @@ use Magento\Mtf\Constraint\AbstractConstraint; /** - * Check that created widget displayed on frontent on Home page and on Advanced Search and + * Check that created widget displayed on frontend on Home page and on Advanced Search and * after click on widget link on frontend system redirects you to cms page. */ class AssertWidgetCmsPageLink extends AbstractConstraint diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php b/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php index 949d17ffb5f66..a15bdec6157a3 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/AbstractDb.php @@ -84,7 +84,7 @@ abstract public function cleanup(); abstract protected function getSetupDbDumpFilename(); /** - * Is dump esxists + * Is dump exists * * @return bool */ diff --git a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php index d84511db358c7..a986d6a5a4abf 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php +++ b/dev/tests/integration/framework/Magento/TestFramework/Db/Mysql.php @@ -70,7 +70,7 @@ protected function getSetupDbDumpFilename() } /** - * Is dump esxists + * Is dump exists * * @return bool */ diff --git a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php index 77dbe90c4573a..d4ab07aa94677 100644 --- a/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php +++ b/dev/tests/integration/framework/Magento/TestFramework/TestCase/AbstractConfigFiles.php @@ -47,7 +47,7 @@ public function setUp() 'Magento\Framework\App\Arguments\FileResolver\Primary' )->disableOriginalConstructor()->getMock(); - /* Enable Validation regardles of MAGE_MODE */ + /* Enable Validation regardless of MAGE_MODE */ $validateStateMock = $this->getMockBuilder( 'Magento\Framework\Config\ValidationStateInterface' )->disableOriginalConstructor()->getMock(); diff --git a/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php b/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php index 8aaca8b0c8536..9a1819ad62218 100644 --- a/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php +++ b/dev/tests/integration/testsuite/Magento/AdminNotification/_files/notifications.php @@ -4,34 +4,34 @@ * See COPYING.txt for license details. */ $om = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity( +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity( \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL )->setTitle( 'Unread Critical 1' )->save(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR) +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR) ->setTitle('Unread Major 1') ->save(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity( +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity( \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL )->setTitle( 'Unread Critical 2' )->save(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity( +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity( \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL )->setTitle( 'Unread Critical 3' )->save(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity( +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity( \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL )->setTitle( 'Read Critical 1' @@ -39,13 +39,13 @@ 1 )->save(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR) +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity(\Magento\Framework\Notification\MessageInterface::SEVERITY_MAJOR) ->setTitle('Unread Major 2') ->save(); -$mesasge = $om->create('Magento\AdminNotification\Model\Inbox'); -$mesasge->setSeverity( +$message = $om->create('Magento\AdminNotification\Model\Inbox'); +$message->setSeverity( \Magento\Framework\Notification\MessageInterface::SEVERITY_CRITICAL )->setTitle( 'Removed Critical 1' diff --git a/dev/tests/integration/testsuite/Magento/AdvancedPricingImportExport/_files/create_products.php b/dev/tests/integration/testsuite/Magento/AdvancedPricingImportExport/_files/create_products.php index 492a957542338..15bc1176e81e7 100644 --- a/dev/tests/integration/testsuite/Magento/AdvancedPricingImportExport/_files/create_products.php +++ b/dev/tests/integration/testsuite/Magento/AdvancedPricingImportExport/_files/create_products.php @@ -15,7 +15,7 @@ ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) ->setWebsiteIds([1]) - ->setCateroryIds([]) + ->setCategoryIds([]) ->setStockData(['qty' => 100, 'is_in_stock' => 1]) ->setIsObjectNew(true) ->save(); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php index 516f67b234d4b..4b0d60ca3d8c6 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/Product/TypeTest.php @@ -20,7 +20,7 @@ protected function setUp() } /** - * @param sring|null $typeId + * @param string|null $typeId * @param string $expectedClass * @dataProvider factoryDataProvider */ @@ -52,7 +52,7 @@ public function factoryDataProvider() } /** - * @param sring|null $typeId + * @param string|null $typeId * @dataProvider factoryReturnsSingletonDataProvider */ public function testFactoryReturnsSingleton($typeId) @@ -82,7 +82,7 @@ public function factoryReturnsSingletonDataProvider() } /** - * @param sring|null $typeId + * @param string|null $typeId * @param string $expectedClass * @dataProvider priceFactoryDataProvider */ diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Category/CollectionTest.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Category/CollectionTest.php new file mode 100644 index 0000000000000..a81a2e2684b5a --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/Category/CollectionTest.php @@ -0,0 +1,65 @@ +collection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + \Magento\Catalog\Model\ResourceModel\Category\Collection::class + ); + } + + protected function setDown() + { + /* Refresh stores memory cache after store deletion */ + \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Store\Model\StoreManagerInterface::class + )->reinitStores(); + } + + /** + * @magentoAppIsolation enabled + * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/category_multiple_stores.php + */ + public function testJoinUrlRewriteOnDefault() + { + $categories = $this->collection->joinUrlRewrite()->addPathFilter('1/2/3'); + $this->assertCount(1, $categories); + /** @var $category \Magento\Catalog\Model\Category */ + $category = $categories->getFirstItem(); + $this->assertStringEndsWith('category.html', $category->getUrl()); + } + + /** + * @magentoAppIsolation enabled + * @magentoDbIsolation enabled + * @magentoDataFixture Magento/Catalog/Model/ResourceModel/_files/category_multiple_stores.php + */ + public function testJoinUrlRewriteNotOnDefaultStore() + { + $store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager() + ->create(\Magento\Store\Model\Store::class); + $storeId = $store->load('second_category_store', 'code')->getId(); + $categories = $this->collection->setStoreId($storeId)->joinUrlRewrite()->addPathFilter('1/2/3'); + $this->assertCount(1, $categories); + /** @var $category \Magento\Catalog\Model\Category */ + $category = $categories->getFirstItem(); + $this->assertContains('category-3-on-2', $category->getUrl()); + } +} diff --git a/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/category_multiple_stores.php b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/category_multiple_stores.php new file mode 100644 index 0000000000000..90bf630000e72 --- /dev/null +++ b/dev/tests/integration/testsuite/Magento/Catalog/Model/ResourceModel/_files/category_multiple_stores.php @@ -0,0 +1,66 @@ +create( + \Magento\Catalog\Model\CategoryFactory::class +); +/** @var \Magento\Catalog\Model\CategoryRepository $repository */ +$repository = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + \Magento\Catalog\Model\CategoryRepository::class +); +/** @var \Magento\Store\Model\StoreManagerInterface $storeManager */ +$storeManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create( + \Magento\Store\Model\StoreManagerInterface::class +); +/** @var \Magento\Store\Model\Store $store */ +$store = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create(\Magento\Store\Model\Store::class); +if (!$store->load('second_category_store', 'code')->getId()) { + $websiteId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Store\Model\StoreManagerInterface::class + )->getWebsite()->getId(); + $groupId = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Store\Model\StoreManagerInterface::class + )->getWebsite()->getDefaultGroupId(); + + $store->setCode( + 'second_category_store' + )->setWebsiteId( + $websiteId + )->setGroupId( + $groupId + )->setName( + 'Fixture Store' + )->setSortOrder( + 10 + )->setIsActive( + 1 + ); + $store->save(); +} + +/* Refresh stores memory cache */ +\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get( + \Magento\Store\Model\StoreManagerInterface::class +)->reinitStores(); + +/** @var \Magento\Catalog\Model\Category $newCategory */ +$newCategory = $factory->create(); +$newCategory + ->setName('Category') + ->setParentId(2) + ->setLevel(2) + ->setPath('1/2/3') + ->setAvailableSortBy('name') + ->setDefaultSortBy('name') + ->setIsActive(true) + ->setPosition(1); +$repository->save($newCategory); +$currentStoreId = $storeManager->getStore()->getId(); +$storeManager->setCurrentStore($storeManager->getStore($store->getId())); +$newCategory->setUrlKey('category-3-on-2'); +$repository->save($newCategory); +$storeManager->setCurrentStore($storeManager->getStore($currentStoreId)); diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/category_duplicates.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/category_duplicates.php index 49cd1a6dbdc76..35824f714971c 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/category_duplicates.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/category_duplicates.php @@ -46,7 +46,7 @@ \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED )->setWebsiteIds( [1] -)->setCateroryIds( +)->setCategoryIds( [] )->setStockData( ['qty' => 100, 'is_in_stock' => 1] diff --git a/dev/tests/integration/testsuite/Magento/Catalog/_files/multiple_products.php b/dev/tests/integration/testsuite/Magento/Catalog/_files/multiple_products.php index bbcb649942450..322110dbb3040 100644 --- a/dev/tests/integration/testsuite/Magento/Catalog/_files/multiple_products.php +++ b/dev/tests/integration/testsuite/Magento/Catalog/_files/multiple_products.php @@ -25,7 +25,7 @@ ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) ->setWebsiteIds([1]) - ->setCateroryIds([]) + ->setCategoryIds([]) ->setStockData(['use_config_manage_stock' => 1, 'qty' => 100, 'is_qty_decimal' => 0, 'is_in_stock' => 1]) ->save(); @@ -49,7 +49,7 @@ ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_CATALOG) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) ->setWebsiteIds([1]) - ->setCateroryIds([]) + ->setCategoryIds([]) ->setStockData(['use_config_manage_stock' => 1, 'qty' => 50, 'is_qty_decimal' => 0, 'is_in_stock' => 1]) ->save(); @@ -68,6 +68,6 @@ ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_IN_CATALOG) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_DISABLED) ->setWebsiteIds([1]) - ->setCateroryIds([]) + ->setCategoryIds([]) ->setStockData(['use_config_manage_stock' => 1, 'qty' => 140, 'is_qty_decimal' => 0, 'is_in_stock' => 1]) ->save(); diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php index e72bee30afaaa..628bcca77175a 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data.php @@ -75,7 +75,7 @@ )->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) ->setWebsiteIds([1]) - ->setCateroryIds([]) + ->setCategoryIds([]) ->setStockData(['qty' => 100, 'is_in_stock' => 1]) ->setCanSaveCustomOptions(true) ->setCategoryIds([333]) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_special_chars.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_special_chars.php index dd0138bc29d5c..af2b622ba1f16 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_special_chars.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_data_special_chars.php @@ -29,7 +29,7 @@ ->setVisibility(\Magento\Catalog\Model\Product\Visibility::VISIBILITY_BOTH) ->setStatus(\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED) ->setWebsiteIds([1]) - ->setCateroryIds([]) + ->setCategoryIds([]) ->setStockData(['qty' => 100, 'is_in_stock' => 1]) ->setCanSaveCustomOptions(true) ->setCategoryIds([333]) diff --git a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php index 040acf3b431a0..1ba3c0998fe97 100644 --- a/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php +++ b/dev/tests/integration/testsuite/Magento/CatalogImportExport/_files/product_export_with_product_links_data.php @@ -7,7 +7,7 @@ require dirname(dirname(__DIR__)) . '/Catalog/_files/category.php'; /** Create fixture store */ require dirname(dirname(__DIR__)) . '/Store/_files/second_store.php'; -/** Create product with mulselect attribute */ +/** Create product with multiselect attribute */ require dirname(dirname(__DIR__)) . '/Catalog/_files/products_with_multiselect_attribute.php'; $productModel = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\Catalog\Model\Product'); @@ -32,7 +32,7 @@ \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED )->setWebsiteIds( [1] -)->setCateroryIds( +)->setCategoryIds( [] )->setStockData( ['qty' => 100, 'is_in_stock' => 1] diff --git a/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php b/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php index fc26b7b520abf..2f93cabbdd501 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Data/Form/Element/FieldsetTest.php @@ -246,7 +246,7 @@ public function getSubFieldsetDataProvider() $fieldsetField = $textField; $fieldsetField[1] = 'fieldset'; $advancedFieldsetFld = $fieldsetField; - // set isAdvenced flag + // set isAdvanced flag $advancedFieldsetFld[4] = true; $result = [[[$fieldsetField, $textField, $advancedFieldsetFld], 1]]; return $result; diff --git a/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php b/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php index 8af3c8cfe1b7a..73b4d6a637ce5 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php +++ b/dev/tests/integration/testsuite/Magento/Framework/Mview/View/ChangelogTest.php @@ -126,14 +126,14 @@ public function testGetList() $this->assertEquals(0, $this->model->getVersion()); //the same that a table is empty $changelogName = $this->resource->getTableName($this->model->getName()); - $testChengelogData = [ + $testChangelogData = [ ['version_id' => 1, 'entity_id' => 1], ['version_id' => 2, 'entity_id' => 1], ['version_id' => 3, 'entity_id' => 2], ['version_id' => 4, 'entity_id' => 3], ['version_id' => 5, 'entity_id' => 1], ]; - foreach ($testChengelogData as $data) { + foreach ($testChangelogData as $data) { $this->connection->insert($changelogName, $data); } $this->assertEquals(5, $this->model->getVersion()); diff --git a/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleA/view/adminhtml/product/product.css b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleA/view/adminhtml/product/product.css index b29e2c0fd9b88..e079dd3715e4f 100644 --- a/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleA/view/adminhtml/product/product.css +++ b/dev/tests/integration/testsuite/Magento/Framework/View/_files/Magento/ModuleA/view/adminhtml/product/product.css @@ -13,7 +13,7 @@ overflow: hidden; padding: 5px 6px 3px; margin-left: 12px; - color: #7a7976;; + color: #7a7976; } [class^=" catalog-product-"] .page-actions .action-back:hover, diff --git a/dev/tests/integration/testsuite/Magento/ImportExport/_files/product.php b/dev/tests/integration/testsuite/Magento/ImportExport/_files/product.php index 31331d5b9e4a2..d89f7a2dc5093 100644 --- a/dev/tests/integration/testsuite/Magento/ImportExport/_files/product.php +++ b/dev/tests/integration/testsuite/Magento/ImportExport/_files/product.php @@ -23,7 +23,7 @@ \Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED )->setWebsiteIds( [1] -)->setCateroryIds( +)->setCategoryIds( [] )->setStockData( ['qty' => 100, 'is_in_stock' => 1] diff --git a/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php b/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php index a1561bac90a22..2036a02766321 100644 --- a/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php +++ b/dev/tests/integration/testsuite/Magento/Search/Model/SearchEngine/ConfigTest.php @@ -17,7 +17,7 @@ protected function setUp() $xmlPath = __DIR__ . '/../../_files/search_engine.xml'; $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager(); - // Clear out the clache + // Clear out the cache $cacheManager = $objectManager->create('Magento\Framework\App\Cache\Manager'); /** @var \Magento\Framework\App\Cache\Manager $cacheManager */ $cacheManager->clean($cacheManager->getAvailableTypes()); diff --git a/dev/tests/static/framework/Magento/Sniffs/Less/PropertiesSortingSniff.php b/dev/tests/static/framework/Magento/Sniffs/Less/PropertiesSortingSniff.php index d601fb0896ad6..963bb689a7921 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Less/PropertiesSortingSniff.php +++ b/dev/tests/static/framework/Magento/Sniffs/Less/PropertiesSortingSniff.php @@ -100,6 +100,14 @@ public function process(PHP_CodeSniffer_File $phpcsFile, $stackPtr) */ private function validatePropertiesSorting(PHP_CodeSniffer_File $phpcsFile, $stackPtr, array $properties) { + // Fix needed for cases when incorrect properties passed for validation due to bug in PHP tokens. + $symbolsForSkip = ['(', 'block', 'field']; + $properties = array_filter( + $properties, + function ($var) use ($symbolsForSkip) { + return !in_array($var, $symbolsForSkip); + } + ); $originalProperties = $properties; sort($properties); diff --git a/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php b/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php index ec47f338e4731..d838af96f656f 100644 --- a/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php +++ b/dev/tests/static/framework/Magento/Sniffs/Less/ZeroUnitsSniff.php @@ -25,7 +25,7 @@ class ZeroUnitsSniff implements PHP_CodeSniffer_Sniff const CSS_PROPERTY_UNIT_REM = 'rem'; /** - * List of available CSS Propery units + * List of available CSS Property units * * @var array */ diff --git a/dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt b/dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt index 4e4fbefd7871d..b956b972bc5a3 100644 --- a/dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt +++ b/dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt @@ -1,2 +1,2 @@ -theme * / -library * / \ No newline at end of file +# Format: or simply +* * / \ No newline at end of file diff --git a/lib/internal/Magento/Framework/App/DeploymentConfig.php b/lib/internal/Magento/Framework/App/DeploymentConfig.php index 0eebc1ca40a34..66c7ad00df1a7 100644 --- a/lib/internal/Magento/Framework/App/DeploymentConfig.php +++ b/lib/internal/Magento/Framework/App/DeploymentConfig.php @@ -115,7 +115,7 @@ public function resetData() } /** - * Check if data from deploy files is avaiable + * Check if data from deploy files is available * * @return bool */ diff --git a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php index 7b21cde1d5cb1..792252938ab49 100644 --- a/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php +++ b/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php @@ -627,7 +627,7 @@ public function fetchItem() /** * Overridden to use _idFieldName by default. * - * @param null $valueField + * @param string|null $valueField * @param string $labelField * @param array $additional * @return array diff --git a/lib/internal/Magento/Framework/Data/Form/Element/Date.php b/lib/internal/Magento/Framework/Data/Form/Element/Date.php index ef85876521d23..c4661c92e8c49 100644 --- a/lib/internal/Magento/Framework/Data/Form/Element/Date.php +++ b/lib/internal/Magento/Framework/Data/Form/Element/Date.php @@ -167,6 +167,8 @@ public function getElementHtml() 'buttonImage' => $this->getImage(), 'buttonText' => 'Select Date', 'disabled' => $this->getDisabled(), + 'minDate' => $this->getMinDate(), + 'maxDate' => $this->getMaxDate(), ], ] ) diff --git a/lib/internal/Magento/Framework/Image.php b/lib/internal/Magento/Framework/Image.php index fa5a8268e3756..40c0767293ace 100644 --- a/lib/internal/Magento/Framework/Image.php +++ b/lib/internal/Magento/Framework/Image.php @@ -49,7 +49,7 @@ public function open() $this->_adapter->checkDependencies(); if (!file_exists($this->_fileName)) { - throw new \Exception("File '{$this->_fileName}' does not exists."); + throw new \Exception("File '{$this->_fileName}' does not exist."); } $this->_adapter->open($this->_fileName); diff --git a/lib/internal/Magento/Framework/Locale/Config.php b/lib/internal/Magento/Framework/Locale/Config.php index 2f4b0fcee01a5..84424b558bab8 100644 --- a/lib/internal/Magento/Framework/Locale/Config.php +++ b/lib/internal/Magento/Framework/Locale/Config.php @@ -72,6 +72,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface 'mk_MK', /*Macedonian (Macedonia)*/ 'mn_Cyrl_MN', /*Mongolian (Mongolia)*/ 'ms_Latn_MY', /*Malaysian (Malaysia)*/ + 'ms_MY', /*Malaysian (Malaysia)*/ 'nl_BE', /*Dutch (Belgium)*/ 'nl_NL', /*Dutch (Netherlands)*/ 'nb_NO', /*Norwegian BokmГ_l (Norway)*/ @@ -98,6 +99,7 @@ class Config implements \Magento\Framework\Locale\ConfigInterface 'lo_LA', /*Laotian*/ 'es_VE', /*Spanish (Venezuela)*/ 'en_IE', /*English (Ireland)*/ + 'es_BO', /*Spanish (Bolivia)*/ ]; /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php b/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php index b26a4339a9f52..a2dbae8c57e5c 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php +++ b/lib/internal/Magento/Framework/ObjectManager/Factory/AbstractFactory.php @@ -1,6 +1,6 @@ + + + + + + diff --git a/lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd b/lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd index 397b71fe70825..09ad246b3a64d 100644 --- a/lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd +++ b/lib/internal/Magento/Framework/View/Layout/etc/page_configuration.xsd @@ -32,4 +32,10 @@ + + + + + + diff --git a/lib/web/css/docs/source/docs.less b/lib/web/css/docs/source/docs.less index 4039d0562da53..952beb5c0f970 100644 --- a/lib/web/css/docs/source/docs.less +++ b/lib/web/css/docs/source/docs.less @@ -21,7 +21,6 @@ @import '_icons.less'; @import '_loaders.less'; @import '_messages.less'; -//@import 'navigation.less'; @import '_layout.less'; @import '_pages.less'; @import '_popups.less'; diff --git a/lib/web/css/source/lib/_navigation.less b/lib/web/css/source/lib/_navigation.less index 6ed3a9671ab13..56aa2e7ef86b9 100644 --- a/lib/web/css/source/lib/_navigation.less +++ b/lib/web/css/source/lib/_navigation.less @@ -305,6 +305,10 @@ .lib-css(border-top, none); } + li.level1 { + position: relative; + } + .level0 { .lib-css(margin, @_nav-level0-item-margin); display: inline-block; diff --git a/lib/web/css/source/lib/variables/_forms.less b/lib/web/css/source/lib/variables/_forms.less index 69d0146fb3555..fff6141c67fd5 100644 --- a/lib/web/css/source/lib/variables/_forms.less +++ b/lib/web/css/source/lib/variables/_forms.less @@ -121,7 +121,7 @@ @select__disabled__font-style: @form-element-input__disabled__font-style; // Focus state -@select__focus__background: @form-element-input__focus__background; +@select__focus__background: false; @select__focus__border: @form-element-input__focus__border; @select__focus__color: @form-element-input__focus__color; @select__focus__font-style: @form-element-input__focus__font-style; diff --git a/lib/web/css/source/lib/variables/_typography.less b/lib/web/css/source/lib/variables/_typography.less index aae7997478545..bf88990fe05c8 100644 --- a/lib/web/css/source/lib/variables/_typography.less +++ b/lib/web/css/source/lib/variables/_typography.less @@ -12,7 +12,6 @@ // --------------------------------------------- // Path -@font-path: "../../fonts/"; @icons__font-path: "@{baseDir}fonts/Blank-Theme-Icons/Blank-Theme-Icons"; // Names diff --git a/lib/web/extjs/resources/css/ytheme-magento.css b/lib/web/extjs/resources/css/ytheme-magento.css index 7be66ddd5efe5..fa54395806264 100644 --- a/lib/web/extjs/resources/css/ytheme-magento.css +++ b/lib/web/extjs/resources/css/ytheme-magento.css @@ -15,7 +15,7 @@ background:url(../images/magento/loading_bg.gif) no-repeat #eae2ca; padding:85px 15px 15px 15px; font-size:14px; - font-weight:bold;; + font-weight:bold; color:#611B06; width:206px; text-align:center; diff --git a/lib/web/mage/validation/validation.js b/lib/web/mage/validation/validation.js index 448df0c71aed6..349a01269e4fa 100644 --- a/lib/web/mage/validation/validation.js +++ b/lib/web/mage/validation/validation.js @@ -25,7 +25,7 @@ var val = $(e).val(); if (val && val.length > 0) { result = true; - var valInt = parseInt(val, 10) || 0; + var valInt = parseFloat(val) || 0; if (valInt >= 0) { total += valInt; } else { diff --git a/pub/errors/default/report.phtml b/pub/errors/default/report.phtml index 8a567b69ebce2..0988054fea035 100644 --- a/pub/errors/default/report.phtml +++ b/pub/errors/default/report.phtml @@ -35,25 +35,25 @@
    -
    +