diff --git a/.github/.htaccess b/.github/.htaccess new file mode 100644 index 0000000000000..707c26b075e16 --- /dev/null +++ b/.github/.htaccess @@ -0,0 +1,8 @@ + + order allow,deny + deny from all + += 2.4> + Require all denied + + diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000000..4e82725a7fb08 --- /dev/null +++ b/.github/CODE_OF_CONDUCT.md @@ -0,0 +1,46 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at engcom@magento.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md similarity index 100% rename from ISSUE_TEMPLATE.md rename to .github/ISSUE_TEMPLATE.md diff --git a/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md similarity index 100% rename from PULL_REQUEST_TEMPLATE.md rename to .github/PULL_REQUEST_TEMPLATE.md diff --git a/.htaccess b/.htaccess index f824f0b7bbc59..4298b10d9ca7a 100644 --- a/.htaccess +++ b/.htaccess @@ -274,15 +274,6 @@ Require all denied - - - order allow,deny - deny from all - - = 2.4> - Require all denied - - order allow,deny @@ -355,6 +346,15 @@ Require all denied + + + order allow,deny + deny from all + + = 2.4> + Require all denied + + order allow,deny diff --git a/.htaccess.sample b/.htaccess.sample index f3a4474aec949..a521a347232f5 100644 --- a/.htaccess.sample +++ b/.htaccess.sample @@ -251,15 +251,6 @@ Require all denied - - - order allow,deny - deny from all - - = 2.4> - Require all denied - - order allow,deny @@ -332,6 +323,15 @@ Require all denied + + + order allow,deny + deny from all + + = 2.4> + Require all denied + + order allow,deny diff --git a/CHANGELOG.md b/CHANGELOG.md index 8270f8908a3c7..a5e94e46f89d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,229 @@ +2.2.2 +============= +* GitHub issues: + * [#9968](https://github.com/magento/magento2/issues/9968) -- Canceled invoice can be canceled again (fixed in [#11261](https://github.com/magento/magento2/pull/11261)) + * [#11310](https://github.com/magento/magento2/issues/11310) -- Method "getChildren" sort ordering (fixed in [#11342](https://github.com/magento/magento2/pull/11342)) + * [#11332](https://github.com/magento/magento2/issues/11332) -- How to Fix the wrong input format of Customer date of birth (fixed in [#11351](https://github.com/magento/magento2/pull/11351)) + * [#11207](https://github.com/magento/magento2/issues/11207) -- Shipment API won't append comment to email (fixed in [#11383](https://github.com/magento/magento2/pull/11383)) + * [#10795](https://github.com/magento/magento2/issues/10795) -- Shipping method radios have duplicate IDs on cart page (fixed in [#11406](https://github.com/magento/magento2/pull/11406)) + * [#10941](https://github.com/magento/magento2/issues/10941) -- Responsive Design Issue on Mobile with Magento 2.1.9 (fixed in [#11430](https://github.com/magento/magento2/pull/11430)) + * [#10007](https://github.com/magento/magento2/issues/10007) -- ProductAlert: Product alerts not showing in admin side product edit page (fixed in [#11445](https://github.com/magento/magento2/pull/11445)) + * [#10231](https://github.com/magento/magento2/issues/10231) -- Custom URL Rewrite Not working (fixed in [#11470](https://github.com/magento/magento2/pull/11470)) + * [#11176](https://github.com/magento/magento2/issues/11176) -- Configured table prefix is not recognized in CLI admin:user:create (fixed in [#11199](https://github.com/magento/magento2/pull/11199)) + * [#11275](https://github.com/magento/magento2/issues/11275) -- Call to a member function addCrumb() (fixed in [#11299](https://github.com/magento/magento2/pull/11299)) + * [#10441](https://github.com/magento/magento2/issues/10441) -- State/Province Not displayed after edit Billing Address on Sales Orders - Backend Admin. (fixed in [#11381](https://github.com/magento/magento2/pull/11381)) + * [#11140](https://github.com/magento/magento2/issues/11140) -- Going to '/admin' while using storecodes in url and a different adminhtml url will throw exception (fixed in [#11460](https://github.com/magento/magento2/pull/11460)) + * [#10765](https://github.com/magento/magento2/issues/10765) -- Export data from grid not adding custom rendered data magento2 (fixed in [#11437](https://github.com/magento/magento2/pull/11437)) + * [#7678](https://github.com/magento/magento2/issues/7678) -- StockItemCriteria::setProductsFilter doesn't work with array of ids (fixed in [#11500](https://github.com/magento/magento2/pull/11500)) + * [#9783](https://github.com/magento/magento2/issues/9783) -- Multiple parameters in widget.xml not allowed (fixed in [#11495](https://github.com/magento/magento2/pull/11495)) + * [#10824](https://github.com/magento/magento2/issues/10824) -- Cannot add new columns to item grid in admin sales_order_view layout (fixed in [#11235](https://github.com/magento/magento2/pull/11235)) + * [#9919](https://github.com/magento/magento2/issues/9919) -- Pattern Validation via UI Component Fails to Interpret String as RegEx Pattern (fixed in [#11565](https://github.com/magento/magento2/pull/11565)) + * [#5439](https://github.com/magento/magento2/issues/5439) -- Newsletter subscription (fixed in [#11317](https://github.com/magento/magento2/pull/11317)) + * [#10856](https://github.com/magento/magento2/issues/10856) -- Sync billing with shipping address on Admin Reorder and Admin Customer Create Order page does not work for Existing address selected (fixed in [#11385](https://github.com/magento/magento2/pull/11385)) + * [#10025](https://github.com/magento/magento2/issues/10025) -- Integration tests don't reset the database (fixed in [#11499](https://github.com/magento/magento2/pull/11499)) + * [#10301](https://github.com/magento/magento2/issues/10301) -- Customer review report search Bug in 2.1.x, 2.2 (fixed in [#11522](https://github.com/magento/magento2/pull/11522)) + * [#11540](https://github.com/magento/magento2/issues/11540) -- Magento sets iso invalid language code in html header (fixed in [#11561](https://github.com/magento/magento2/pull/11561)) + * [#11586](https://github.com/magento/magento2/issues/11586) -- Cron install / remove via command messes up stderr 2>&1 entries (fixed in [#11591](https://github.com/magento/magento2/pull/11591)) + * [#6350](https://github.com/magento/magento2/issues/6350) -- Frontend: Datepicker/calendar control does not use the store locale (fixed in [#11057](https://github.com/magento/magento2/pull/11057)) + * [#11328](https://github.com/magento/magento2/issues/11328) -- app:config:dump adds extra space every time in multiline array value (fixed in [#11439](https://github.com/magento/magento2/pull/11439)) + * [#7591](https://github.com/magento/magento2/issues/7591) -- PayPal module, "didgit" misspelling (fixed in [#11673](https://github.com/magento/magento2/pull/11673)) + * [#7767](https://github.com/magento/magento2/issues/7767) -- in system.xml translate phrase not work (fixed in [#11675](https://github.com/magento/magento2/pull/11675)) + * [#7915](https://github.com/magento/magento2/issues/7915) -- customer objects are equal to eachother after observing event customer_save_after_data_object (fixed in [#11676](https://github.com/magento/magento2/pull/11676)) + * [#10275](https://github.com/magento/magento2/issues/10275) -- Admin global search - submit by enter doesn't work (fixed in [#11250](https://github.com/magento/magento2/pull/11250)) + * [#11022](https://github.com/magento/magento2/issues/11022) -- GET v1/products/attribute-sets/sets/list inconsistent return result (fixed in [#11421](https://github.com/magento/magento2/pull/11421)) + * [#5956](https://github.com/magento/magento2/issues/5956) -- Untranslatable string "Please enter the same value again." (fixed in [#11440](https://github.com/magento/magento2/pull/11440)) + * [#9944](https://github.com/magento/magento2/issues/9944) -- Name attribute shows empty when creating custom fields on product creation form (fixed in [#11637](https://github.com/magento/magento2/pull/11637)) + * [#10168](https://github.com/magento/magento2/issues/10168) -- Coupon codes not showing in invoice (fixed in [#11635](https://github.com/magento/magento2/pull/11635)) + * [#9763](https://github.com/magento/magento2/issues/9763) -- When go checkout,Cart Price Rules 25%test coupon code can go wrong (fixed in [#11710](https://github.com/magento/magento2/pull/11710)) + * [#11157](https://github.com/magento/magento2/issues/11157) -- nginx.sample.conf missing heath_check.php? (fixed in [#11690](https://github.com/magento/magento2/pull/11690)) + * [#11322](https://github.com/magento/magento2/issues/11322) -- User.ini files specify 768M - Docs recommend at least 1G (fixed in [#11734](https://github.com/magento/magento2/pull/11734)) + * [#7927](https://github.com/magento/magento2/issues/7927) -- Dashboard graph has broken y-axis range (fixed in [#11751](https://github.com/magento/magento2/pull/11751)) + * [#7099](https://github.com/magento/magento2/issues/7099) -- Admin: field labels wrapping poorly (fixed in [#11745](https://github.com/magento/magento2/pull/11745)) + * [#9869](https://github.com/magento/magento2/issues/9869) -- datetime type product attribute showing current date (fixed in [#11749](https://github.com/magento/magento2/pull/11749)) + * [#11365](https://github.com/magento/magento2/issues/11365) -- "Ignore this notification" isn't working (fixed in [#11410](https://github.com/magento/magento2/pull/11410)) + * [#6891](https://github.com/magento/magento2/issues/6891) -- Add-to-cart checkbox still visible when $canItemsAddToCart = false (fixed in [#11610](https://github.com/magento/magento2/pull/11610)) + * [#11729](https://github.com/magento/magento2/issues/11729) -- Exported Excel with negative number can't be opened by MS Office (fixed in [#11757](https://github.com/magento/magento2/pull/11757)) + * [#6924](https://github.com/magento/magento2/issues/6924) -- Magento 2.1.0 - "General system exception happened" on Import .csv (fixed in [#11363](https://github.com/magento/magento2/pull/11363)) + * [#7640](https://github.com/magento/magento2/issues/7640) -- X-Magento-Tags header containing whitespaces causes exception (fixed in [#11767](https://github.com/magento/magento2/pull/11767)) + * [#4711](https://github.com/magento/magento2/issues/4711) -- Improve error reporting for products images import (fixed in [#11779](https://github.com/magento/magento2/pull/11779)) + * [#4696](https://github.com/magento/magento2/issues/4696) -- Admin product search - Pressing enter does not submit (fixed in [#11827](https://github.com/magento/magento2/pull/11827)) + * [#11581](https://github.com/magento/magento2/issues/11581) -- Reference to wrong / non-existing class (fixed in [#11830](https://github.com/magento/magento2/pull/11830)) + * [#10908](https://github.com/magento/magento2/issues/10908) -- [2.2.0-rc3.0] Language switcher is broken when using multiple times (fixed in [#11337](https://github.com/magento/magento2/pull/11337)) + * [#11211](https://github.com/magento/magento2/issues/11211) -- Store View switcher not working on front-end and it throws an error (fixed in [#11337](https://github.com/magento/magento2/pull/11337)) + * [#2991](https://github.com/magento/magento2/issues/2991) -- Products added to cart with REST API give total prices equal to zero (fixed in [#11458](https://github.com/magento/magento2/pull/11458)) + * [#10032](https://github.com/magento/magento2/issues/10032) -- Download back-up .tgz always takes the latest that's created (fixed in [#11595](https://github.com/magento/magento2/pull/11595)) + * [#11534](https://github.com/magento/magento2/issues/11534) -- Values of Visual Swatch Attribute drop down is not work correct (fixed in [#11747](https://github.com/magento/magento2/pull/11747)) + * [#10291](https://github.com/magento/magento2/issues/10291) -- Magento 2 Loading custom option dropdown issue (fixed in [#11824](https://github.com/magento/magento2/pull/11824)) + * [#11095](https://github.com/magento/magento2/issues/11095) -- Magento_Tax "postcode is a required field" when upgrading from 2.1.9 to 2.2 (fixed in [#11651](https://github.com/magento/magento2/pull/11651)) + * [#8236](https://github.com/magento/magento2/issues/8236) -- CMS blocks are not validated against having same store and identifier (fixed in [#11802](https://github.com/magento/magento2/pull/11802)) + * [#4808](https://github.com/magento/magento2/issues/4808) -- The price of product custom option can't be set to 0. (fixed in [#11843](https://github.com/magento/magento2/pull/11843)) + * [#9566](https://github.com/magento/magento2/issues/9566) -- Status label is wrong in admin (fixed in [#11397](https://github.com/magento/magento2/pull/11397)) + * [#5015](https://github.com/magento/magento2/issues/5015) -- Report error csv doesn't work when trying to import a csv file with semicolon delimiter (fixed in [#11732](https://github.com/magento/magento2/pull/11732)) + * [#10682](https://github.com/magento/magento2/issues/10682) -- Meta description and keywords transform to html entities for non latin/cyrilic characters in category and product pages (fixed in [#11829](https://github.com/magento/magento2/pull/11829)) + * [#10185](https://github.com/magento/magento2/issues/10185) -- New Orders are not in Order grid after data migration from M 1.7.0.2 to M 2.1.7 (fixed in [#11911](https://github.com/magento/magento2/pull/11911)) + * [#8970](https://github.com/magento/magento2/issues/8970) -- Cannot assign products to categories not under tree root (fixed in [#11817](https://github.com/magento/magento2/pull/11817)) + * [#9028](https://github.com/magento/magento2/issues/9028) -- You cannot set a 303 redirect response using a result factory (fixed in [#11405](https://github.com/magento/magento2/pull/11405)) + * [#11697](https://github.com/magento/magento2/issues/11697) -- Theme: Added html node to page xml root, cause validation error (fixed in [#11858](https://github.com/magento/magento2/pull/11858)) + * [#8954](https://github.com/magento/magento2/issues/8954) -- Error While Trying To Load Quote Item Collection Using Magento\Quote\Model\ResourceModel\QuoteItem\Collection::getItems() (fixed in [#11869](https://github.com/magento/magento2/pull/11869)) + * [#8799](https://github.com/magento/magento2/issues/8799) -- Image brackground (fixed in [#11889](https://github.com/magento/magento2/pull/11889)) + * [#11868](https://github.com/magento/magento2/issues/11868) -- "Add Products" button has been duplicated after the customer group was changed (fixed in [#11949](https://github.com/magento/magento2/pull/11949)) + * [#11898](https://github.com/magento/magento2/issues/11898) -- Zip code Netherlands should allow zipcode without space (fixed in [#11959](https://github.com/magento/magento2/pull/11959)) + * [#11996](https://github.com/magento/magento2/issues/11996) -- Magento 2 Store Code validation regex: doesn't support uppercase letters in store code (fixed in [#12011](https://github.com/magento/magento2/pull/12011)) + * [#7995](https://github.com/magento/magento2/issues/7995) -- If you leave as default, shipping lines disappear (fixed in [#12013](https://github.com/magento/magento2/pull/12013)) + * [#8846](https://github.com/magento/magento2/issues/8846) -- Attribute option value uniqueness is not checked if created via REST Api (fixed in [#11785](https://github.com/magento/magento2/pull/11785)) + * [#11700](https://github.com/magento/magento2/issues/11700) -- "Something Went Wrong" error for limited access admin user (fixed in [#11993](https://github.com/magento/magento2/pull/11993)) + * [#12017](https://github.com/magento/magento2/issues/12017) -- Cross-sell product placeholder image size issue (fixed in [#12018](https://github.com/magento/magento2/pull/12018)) + * [#10583](https://github.com/magento/magento2/issues/10583) -- Checkout place order exception when using a new address (fixed in [#11556](https://github.com/magento/magento2/pull/11556)) + * [#4004](https://github.com/magento/magento2/issues/4004) -- Newsletter Subscriber create-date not set, and change_status_at broken (fixed in [#11879](https://github.com/magento/magento2/pull/11879)) + * [#7225](https://github.com/magento/magento2/issues/7225) -- [BUG] [Magento 2.1.2] Programmatically creating an empty dropdown attribute, "apply_to" is set to NULL (from "simple") after adding options through store admin (fixed in [#11588](https://github.com/magento/magento2/pull/11588)) + * [#11197](https://github.com/magento/magento2/issues/11197) -- Blank page at the checkout 'shipping' step (fixed in [#11958](https://github.com/magento/magento2/pull/11958)) + * [#11880](https://github.com/magento/magento2/issues/11880) -- Magento 2.1.9 Configurable::getUsedProducts returns a different array after product collections is cached (fixed in [#12107](https://github.com/magento/magento2/pull/12107)) + * [#10811](https://github.com/magento/magento2/issues/10811) -- Replace FollowSymLinks with SymLinksIfOwnerMatch (fixed in [#11461](https://github.com/magento/magento2/pull/11461)) + * [#10920](https://github.com/magento/magento2/issues/10920) -- Sku => Entity_id relations are fetched inefficiently when inserting attributes values during product import (fixed in [#11719](https://github.com/magento/magento2/pull/11719)) + * [#6802](https://github.com/magento/magento2/issues/6802) -- Magento\Search\Helper\getSuggestUrl() not used in search template (fixed in [#11722](https://github.com/magento/magento2/pull/11722)) + * [#9151](https://github.com/magento/magento2/issues/9151) -- Sitemap.xml: lastmod timestamp can contain invalid dates (fixed in [#11902](https://github.com/magento/magento2/pull/11902)) + * [#10195](https://github.com/magento/magento2/issues/10195) -- Order relation child is not set during edit operation. (fixed in [#11988](https://github.com/magento/magento2/pull/11988)) + * [#11793](https://github.com/magento/magento2/issues/11793) -- Magento2.1.5 admin shipping report shows wrong currency code (fixed in [#11962](https://github.com/magento/magento2/pull/11962)) + * [#6661](https://github.com/magento/magento2/issues/6661) -- XHTML templates Don't Use Schema URNs (fixed in [#12031](https://github.com/magento/magento2/pull/12031)) + * [#12079](https://github.com/magento/magento2/issues/12079) -- Products in cart report error when we have grouped or bundle product (fixed in [#12082](https://github.com/magento/magento2/pull/12082)) + * [#9768](https://github.com/magento/magento2/issues/9768) -- Admin dashboard Most Viewed Products Tab only gives default attribute set's products (fixed in [#12139](https://github.com/magento/magento2/pull/12139)) + * [#6238](https://github.com/magento/magento2/issues/6238) -- Meta description allows too many characters (fixed in [#11914](https://github.com/magento/magento2/pull/11914)) + * [#11230](https://github.com/magento/magento2/issues/11230) -- Unit test fails after fresh installation (fixed in [#12144](https://github.com/magento/magento2/pull/12144)) + * [#10810](https://github.com/magento/magento2/issues/10810) -- Add support of apache2.4 commands in htaccess (fixed in [#11459](https://github.com/magento/magento2/pull/11459)) + * [#10834](https://github.com/magento/magento2/issues/10834) -- signing in after selecting checkout button, will not end up to checkout page! (fixed in [#11876](https://github.com/magento/magento2/pull/11876)) + * [#10477](https://github.com/magento/magento2/issues/10477) -- Cart price rule has failed if use dropdown attribute (fixed in [#11274](https://github.com/magento/magento2/pull/11274)) + * [#11832](https://github.com/magento/magento2/issues/11832) -- Create order (on Customer edit page) - not working from admin environment (fixed in [#11952](https://github.com/magento/magento2/pull/11952)) + * [#10014](https://github.com/magento/magento2/issues/10014) -- Newsletter subscriptions status not isolated between multi stores (fixed in [#12035](https://github.com/magento/magento2/pull/12035)) + * [#11532](https://github.com/magento/magento2/issues/11532) -- Duplicate Simple Product Throws Error: Undefined offset: 0 in SaveHandler.php on line 122 (fixed in [#12001](https://github.com/magento/magento2/pull/12001)) + * [#10628](https://github.com/magento/magento2/issues/10628) -- Color attribute swatches are not visible if sorting is enabled (fixed in [#12077](https://github.com/magento/magento2/pull/12077)) + * [#8022](https://github.com/magento/magento2/issues/8022) -- Uncaught Error: Call to a member function addItem() on array in app/code/Magento/Sales/Model/Order/Shipment.php (fixed in [#12173](https://github.com/magento/magento2/pull/12173)) +* GitHub pull requests: + * [#11240](https://github.com/magento/magento2/pull/11240) -- Virtual Theme load: Check for null to actually reach the code that handles this case to t… (by @leptoquark1) + * [#11261](https://github.com/magento/magento2/pull/11261) -- Prevent invoice cancelation multiple times 2.2-develop [Backport] (by @osrecio) + * [#11342](https://github.com/magento/magento2/pull/11342) -- ADDED $sortByPostion flag to getChildren() (by @denisristic) + * [#11351](https://github.com/magento/magento2/pull/11351) -- Fix the wrong input format of Customer date of birth (by @manuelson) + * [#11359](https://github.com/magento/magento2/pull/11359) -- [Backport 2.2-develop] Unable to manage (install/uninstall) cron via bin/magento cron:install / cron:remove with multiple installations against same crontab (by @adrian-martinez-interactiv4) + * [#11383](https://github.com/magento/magento2/pull/11383) -- Append shipment comment to shipment if appendComment is true (by @JeroenVanLeusden) + * [#11406](https://github.com/magento/magento2/pull/11406) -- Added carrier code to ID to distinguish shipping methods (by @peterjaap) + * [#11430](https://github.com/magento/magento2/pull/11430) -- Fix toolbar-amount placing in mobile device (by @slackerzz) + * [#11445](https://github.com/magento/magento2/pull/11445) -- Show product alerts in admin product detail [backport 2.2] (by @raumatbel) + * [#11470](https://github.com/magento/magento2/pull/11470) -- FR#10231_22 Custom URL Rewrite Not working [backport 2.2] (by @mrodespin) + * [#11493](https://github.com/magento/magento2/pull/11493) -- Add "optional" translation in checkout password field (by @JeroenVanLeusden) + * [#11199](https://github.com/magento/magento2/pull/11199) -- Add db-prefix from env conf when command admin:user:create is executed (by @osrecio) + * [#11299](https://github.com/magento/magento2/pull/11299) -- Update Guest.php (by @lano-vargas) + * [#11381](https://github.com/magento/magento2/pull/11381) -- Save region correctly to save sales address from admin (by @raumatbel) + * [#11460](https://github.com/magento/magento2/pull/11460) -- [ISSUE-11140][BUGFIX] Skip store code admin from being detected in ca… (by @diglin) + * [#11505](https://github.com/magento/magento2/pull/11505) -- [Backport-2.2] Retain additional cron history by default (by @mpchadwick) + * [#11437](https://github.com/magento/magento2/pull/11437) -- Add `confirmation` and `lock_expires ` to customer export csv - Fix issue 10765 (by @convenient) + * [#11486](https://github.com/magento/magento2/pull/11486) -- [Backport 2.2]Add VAT number to email source variables (by @JeroenVanLeusden) + * [#11495](https://github.com/magento/magento2/pull/11495) -- MAGETWO-75743: Fix for #9783 Multiple parameters in widget.… (by @diazwatson) + * [#11500](https://github.com/magento/magento2/pull/11500) -- MAGETWO-81245: Handling all setProductsFilter items in array as arguments (by @kirmorozov) + * [#11555](https://github.com/magento/magento2/pull/11555) -- Travis CI functional tests maintenance for 2.2-develop (by @ishakhsuvarov) + * [#11235](https://github.com/magento/magento2/pull/11235) -- [2.2-develop] Add static test to detect blocks without name attribute (by @ihor-sviziev) + * [#11569](https://github.com/magento/magento2/pull/11569) -- Fixed double space typo (by @dverkade) + * [#11565](https://github.com/magento/magento2/pull/11565) -- Fix "pattern" UI Component validation (by @bap14) + * [#11317](https://github.com/magento/magento2/pull/11317) -- [Backport 2.2-develop] Send email to subscribers only when are new (by @osrecio) + * [#11385](https://github.com/magento/magento2/pull/11385) -- Fix #10856: Sync billing with shipping address on Admin Order Page (by @joni-jones) + * [#11499](https://github.com/magento/magento2/pull/11499) -- Ensure database is cleared/Magento reinstalled when TESTS_CLEANUP is enabled (by @joshuaswarren) + * [#11510](https://github.com/magento/magento2/pull/11510) -- Add interaction to admin:user:create command (by @cmuench) + * [#11522](https://github.com/magento/magento2/pull/11522) -- [Backport 2.2-develop] Fix Filter Customer Report Review (by @osrecio) + * [#11553](https://github.com/magento/magento2/pull/11553) -- [2.2 Backport] ProductRepository sku cache is corrupted when cacheLimit is reached (by @heldchen) + * [#11561](https://github.com/magento/magento2/pull/11561) -- Magento sets ISO invalid language code (by @crissanclick) + * [#11591](https://github.com/magento/magento2/pull/11591) -- [Backport 2.2-develop] #11586 Fix duplicated crontab 2>&1 expression (by @adrian-martinez-interactiv4) + * [#11439](https://github.com/magento/magento2/pull/11439) -- [Backport 2.2-develop] #11328 : app:config:dump adds extra space every time in multiline array value (by @adrian-martinez-interactiv4) + * [#11675](https://github.com/magento/magento2/pull/11675) -- MAGETWO-77672: in system.xml translate phrase not work, if comment starts from new line. (by @nmalevanec) + * [#11673](https://github.com/magento/magento2/pull/11673) -- [BACKPORT 2.2] [TASK] Removed Typo in Paypal TestCase didgit => digit (by @lewisvoncken) + * [#11704](https://github.com/magento/magento2/pull/11704) -- [Backport 2.2-develop] Travis: surround variable TRAVIS_BRANCH with double-quotes instead of single-quotes (by @adrian-martinez-interactiv4) + * [#11677](https://github.com/magento/magento2/pull/11677) -- [BACKPORT 2.2] [TASK] Moved Customer Groups Menu Item from Other sett… (by @lewisvoncken) + * [#11676](https://github.com/magento/magento2/pull/11676) -- #7915: customer objects are equal to eachother after observing event customer_save_after_data_object (by @RomaKis) + * [#11250](https://github.com/magento/magento2/pull/11250) -- Fixing #10275 keyboard submit of adminhtml suggest form. (by @romainruaud) + * [#11421](https://github.com/magento/magento2/pull/11421) -- FIX #11022 in 2.2-develop: Filter Groups of search criteria parameter have not been included for further processing (by @davidverholen) + * [#11440](https://github.com/magento/magento2/pull/11440) -- Add missing translations in Magento_UI (by @JeroenVanLeusden) + * [#11643](https://github.com/magento/magento2/pull/11643) -- Fixed ability to set field config from layout xml #11302 [backport 2.2] (by @vovayatsyuk) + * [#11637](https://github.com/magento/magento2/pull/11637) -- MAGETWO-81311: Check the length of the array before attempting to sli… (by @briscoda) + * [#11635](https://github.com/magento/magento2/pull/11635) -- Coupon codes not showing in invoice (by @crissanclick) + * [#11690](https://github.com/magento/magento2/pull/11690) -- Add a health check to the NGINX configuration sample (by @andrewhowdencom) + * [#11710](https://github.com/magento/magento2/pull/11710) -- Allow coupon code with special charater to be applied to order in checkout (by @gabrielqs-redstage) + * [#11720](https://github.com/magento/magento2/pull/11720) -- Fix Notice: freePackageValue is undefined (by @amenk) + * [#11734](https://github.com/magento/magento2/pull/11734) -- [TASK] Updated user.ini according to Magento DevDocs (by @lewisvoncken) + * [#11751](https://github.com/magento/magento2/pull/11751) -- [Backport 2.2-develop] Dashboard Fix Y Axis for range (by @osrecio) + * [#11749](https://github.com/magento/magento2/pull/11749) -- [Backport 2.2-develop] Fix datetime type product that show current date when is empty in grids (by @enriquei4) + * [#11745](https://github.com/magento/magento2/pull/11745) -- [Backport 2.2-develop] Fix label to avoid wrapping poorly,now break by word (by @enriquei4) + * [#11765](https://github.com/magento/magento2/pull/11765) -- Allows modules with underscores in name to add blocks to layout via XML (by @bentideswell) + * [#11410](https://github.com/magento/magento2/pull/11410) -- "Ignore this notification" isn't working (by @crissanclick) + * [#11607](https://github.com/magento/magento2/pull/11607) -- [Backport 2.2-develop] Fix AcountManagementTest unit test fail randomly (by @adrian-martinez-interactiv4) + * [#11610](https://github.com/magento/magento2/pull/11610) -- FR#6891_22 Add-to-cart checkbox still visible when = false (by @mrodespin) + * [#11757](https://github.com/magento/magento2/pull/11757) -- Fix #11729 - negative value in excel export [M2.2] (by @hauso) + * [#11363](https://github.com/magento/magento2/pull/11363) -- Issue #6924: Unmask exception message during product import (by @tim-bezhashvyly) + * [#11425](https://github.com/magento/magento2/pull/11425) -- Magento setup:install interactive shell (by @denisristic) + * [#11767](https://github.com/magento/magento2/pull/11767) -- 7640: X-Magento-Tags header containing whitespaces causes exception (by @nmalevanec) + * [#11779](https://github.com/magento/magento2/pull/11779) -- MAGETWO-4711: Improve error reporting for products images import. (by @p-bystritsky) + * [#11830](https://github.com/magento/magento2/pull/11830) -- Fix #11581: Reference to wrong / non-existing class (by @dverkade) + * [#11827](https://github.com/magento/magento2/pull/11827) -- Admin product search - Pressing enter does not submit #4696 (by @bohemiorulo) + * [#11337](https://github.com/magento/magento2/pull/11337) -- #11211 Fix Store View switcher (by @thiagolima-bm) + * [#11458](https://github.com/magento/magento2/pull/11458) -- Products added to cart with REST API give total prices equal to zero (by @peterjaap) + * [#11595](https://github.com/magento/magento2/pull/11595) -- Fix issue #10032 - Download back-up .tgz always takes the latest that's created (2.2-develop) (by @PieterCappelle) + * [#11747](https://github.com/magento/magento2/pull/11747) -- [Backport 2.2-develop] FIX show visual swatches in admin - product attribute (by @enriquei4) + * [#11824](https://github.com/magento/magento2/pull/11824) -- Magetwo 70954: Remove the component.clear from the custom options type. This causes the 'elem' array to become out of sync with the recordData (by @briscoda) + * [#11651](https://github.com/magento/magento2/pull/11651) -- [BUGFIX] Solved error while upgrading from 2.1 to 2.2 (by @lewisvoncken) + * [#11802](https://github.com/magento/magento2/pull/11802) -- #8236 FIX CMS blocks (by @thiagolima-bm) + * [#11843](https://github.com/magento/magento2/pull/11843) -- Save the price 0 as price in custom options [backport 2.2] (by @raumatbel) + * [#11854](https://github.com/magento/magento2/pull/11854) -- FilterBuilder Doc Block Update (by @ByteCreation) + * [#11397](https://github.com/magento/magento2/pull/11397) -- Fix for #9566: Show the correct label in the admin (by @michielgerritsen) + * [#11732](https://github.com/magento/magento2/pull/11732) -- MAGETWO-5015: Report error csv doesn't work when trying to import a csv file with semicolon delimiter. (by @p-bystritsky) + * [#11829](https://github.com/magento/magento2/pull/11829) -- Fix #10682: Meta description and keywords transform to html entities (by @dverkade) + * [#11933](https://github.com/magento/magento2/pull/11933) -- Changed constructor typo in Javascript class (by @dverkade) + * [#11911](https://github.com/magento/magento2/pull/11911) -- Order grid - Sort by Purchase Date Desc by default (by @ihor-sviziev) + * [#11817](https://github.com/magento/magento2/pull/11817) -- GITHUB-8970: Cannot assign products to categories not under tree root. (by @p-bystritsky) + * [#11405](https://github.com/magento/magento2/pull/11405) -- Allow setting of http response status code in a Redirection (by @gabrielqs-redstage) + * [#11858](https://github.com/magento/magento2/pull/11858) -- #11697 Theme: Added html node to page xml root, cause validation error (by @adrian-martinez-interactiv4) + * [#11869](https://github.com/magento/magento2/pull/11869) -- Resolve Error While Trying To Load Quote Item Collection Using Magent… (by @neeta-wagento) + * [#11889](https://github.com/magento/magento2/pull/11889) -- Save background color correctly in images. [backport 2.2] (by @raumatbel) + * [#11917](https://github.com/magento/magento2/pull/11917) -- [BACKPORT 2.2] [TASK] Add resetPassword call to the webapi (by @lewisvoncken) + * [#11949](https://github.com/magento/magento2/pull/11949) -- 11868: "Add Products" button has been duplicated after the customer group was changed. (by @nmalevanec) + * [#11959](https://github.com/magento/magento2/pull/11959) -- #11898 - Change NL PostCode Pattern (by @osrecio) + * [#11620](https://github.com/magento/magento2/pull/11620) -- Check attribute unique between same fields in magento commerce (by @raumatbel) + * [#11770](https://github.com/magento/magento2/pull/11770) -- Product attribute creation page handles Storefront tab visibility wrong (by @euronetzrt) + * [#11863](https://github.com/magento/magento2/pull/11863) -- Update wrong layout update xml handle installed in CMS Home Page by default (by @adrian-martinez-interactiv4) + * [#12011](https://github.com/magento/magento2/pull/12011) -- [backport 2.2] Magento 2 Store Code validation regex: doesn't support uppercase letters in store code (by @manuelson) + * [#12013](https://github.com/magento/magento2/pull/12013) -- Add validation for number of street lines (by @crissanclick) + * [#11785](https://github.com/magento/magento2/pull/11785) -- fix #8846: avoid duplicated attribute option values (by @gomencal) + * [#11993](https://github.com/magento/magento2/pull/11993) -- 11700: "Something Went Wrong" error for limited access admin user (by @RomaKis) + * [#12018](https://github.com/magento/magento2/pull/12018) -- Magento 2.2.0 Solution for Cross-sell product placeholder image size … (by @emiprotech) + * [#11556](https://github.com/magento/magento2/pull/11556) -- Fix #10583: Checkout place order exception when using a new address (by @joni-jones) + * [#11879](https://github.com/magento/magento2/pull/11879) -- #4004: Newsletter Subscriber create-date not set, and change_status_at broken (by @nemesis-back) + * [#11588](https://github.com/magento/magento2/pull/11588) -- Fix Issue #7225 - Remove hardcoding of apply_to when saving attributes (by @MartinPeverelli) + * [#11958](https://github.com/magento/magento2/pull/11958) -- 11197: Blank page at the checkout 'shipping' step[backport]. (by @nmalevanec) + * [#12091](https://github.com/magento/magento2/pull/12091) -- Fix "Undefined variable: responseAjax" notice when trying to save a shipment package (by @lazyguru) + * [#11461](https://github.com/magento/magento2/pull/11461) -- [ISSUE-10811][BUGFIX] Update .htaccess.sample to replace FollowSymLin… (by @diglin) + * [#11719](https://github.com/magento/magento2/pull/11719) -- 10920: Sku => Entity_id relations are fetched inefficiently when inserting attributes values during product import. (by @nmalevanec) + * [#11722](https://github.com/magento/magento2/pull/11722) -- 6802: Magento\Search\Helper\getSuggestUrl() not used in search template. (by @nmalevanec) + * [#11857](https://github.com/magento/magento2/pull/11857) -- CMS Page - CMS Page - Force validate layout update xml in production mode when saving CMS Page - Handle layout update xml validation exceptions (by @adrian-martinez-interactiv4) + * [#11902](https://github.com/magento/magento2/pull/11902) -- #9151: [Github] Sitemap.xml: lastmod timestamp can contain invalid dates (by @serhii-balko) + * [#11947](https://github.com/magento/magento2/pull/11947) -- Fix json encoded attribute backend type when attribute value is null (by @tkotosz) + * [#11962](https://github.com/magento/magento2/pull/11962) -- 11793: Magento2.1.5 admin shipping report shows wrong currency code (by @RomaKis) + * [#11988](https://github.com/magento/magento2/pull/11988) -- 10195: Order relation child is not set during edit operation(backport from 2.3 to 2.2) (by @RomaKis) + * [#12031](https://github.com/magento/magento2/pull/12031) -- Improve urn in xhtml (by @enriquei4) + * [#12082](https://github.com/magento/magento2/pull/12082) -- Products in cart report error when we have grouped or bundle product (by @mihaifaget) + * [#12131](https://github.com/magento/magento2/pull/12131) -- [Backport 2.2] Close PayPal popup window in case of rejected request #10820 (by @vovayatsyuk) + * [#12139](https://github.com/magento/magento2/pull/12139) -- 9768: Admin dashboard Most Viewed Products Tab only gives default attribute set's products(backport for 2.2) (by @RomaKis) + * [#11914](https://github.com/magento/magento2/pull/11914) -- [BACKPORT 2.2] [BUGFIX] All UI input fields should have maxlength of 255 because of V… (by @lewisvoncken) + * [#11944](https://github.com/magento/magento2/pull/11944) -- Report Handled Exceptions To New Relic (by @mpchadwick) + * [#12144](https://github.com/magento/magento2/pull/12144) -- Removed FileClassScannerTest dependency to "Magento_Catalog" (by @wexo-team) + * [#11459](https://github.com/magento/magento2/pull/11459) -- close #10810 Migrates Apache Access Syntax to 2.4 on Apache >= 2.4 (by @jonashrem) + * [#11968](https://github.com/magento/magento2/pull/11968) -- Fix bug: Customer import deletes exiting customer entity Fields (by @jalogut) + * [#12061](https://github.com/magento/magento2/pull/12061) -- Cleanup for object manager references and depricated method (by @atishgoswami) + * [#12136](https://github.com/magento/magento2/pull/12136) -- update button.phtml overcomplicated translation phrase. 2.2 (by @ChuckyK) + * [#11876](https://github.com/magento/magento2/pull/11876) -- After logging in customer is now not redirecting to Customer Dashboard by default (by @p-bystritsky) + * [#11274](https://github.com/magento/magento2/pull/11274) -- Fix #10477 Check cart rule subselect conditions against quote item children too (by @marinagociu) + * [#11952](https://github.com/magento/magento2/pull/11952) -- 11832: Create order (on Customer edit page) - not working from admin environment (by @RomaKis) + * [#12035](https://github.com/magento/magento2/pull/12035) -- Fix newsletter subscriptions between stores (by @sbaixauli) + * [#12001](https://github.com/magento/magento2/pull/12001) -- 11532: Duplicate Simple Product Throws Error: Undefined offset: 0 in SaveHandler.php on line 122 (by @RomaKis) + * [#12077](https://github.com/magento/magento2/pull/12077) -- 10628: Color attribute swatches are not visible if sorting is enabled (by @RomaKis) + * [#12130](https://github.com/magento/magento2/pull/12130) -- [Backport 2.2] MAGETWO-71697: Fix possible bug when saving address with empty street line #10582 (by @vovayatsyuk) + * [#12141](https://github.com/magento/magento2/pull/12141) -- Fix js error when disable/enable wysiwyg editor (by @vovayatsyuk) + * [#12173](https://github.com/magento/magento2/pull/12173) -- 8022: Uncaught Error: Call to a member function addItem() on array in app/code/Magento/Sales/Model/Order/Shipment.php(backport to 2.2) (by @RomaKis) + 2.2.1 ============= * GitHub issues: diff --git a/COPYING.txt b/COPYING.txt index d2cbcd01539dd..040bdd5f3ce72 100644 --- a/COPYING.txt +++ b/COPYING.txt @@ -1,4 +1,4 @@ -Copyright © 2013-2017 Magento, Inc. +Copyright © 2013-present Magento, Inc. Each Magento source file included in this distribution is licensed under OSL 3.0 or the Magento Enterprise Edition (MEE) license diff --git a/README.md b/README.md index 9b1aa1b7b3e28..c72357db26d16 100644 --- a/README.md +++ b/README.md @@ -5,13 +5,13 @@ Welcome to Magento 2 installation! We're glad you chose to install Magento 2, a cutting edge, feature-rich eCommerce solution that gets results. ## Magento system requirements -[Magento system requirements](http://devdocs.magento.com/magento-system-requirements.html) +[Magento system requirements](http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements2.html) ## Install Magento To install Magento, see either: * [Magento DevBox](https://magento.com/tech-resources/download), the easiest way to get started with Magento. -* [Installation guide](http://devdocs.magento.com/guides/v2.0/install-gde/bk-install-guide.html) +* [Installation guide](http://devdocs.magento.com/guides/v2.2/install-gde/bk-install-guide.html)

Contributing to the Magento 2 code base

Contributions can take the form of new components or features, changes to existing features, tests, documentation (such as developer guides, user guides, examples, or specifications), bug fixes, optimizations, or just good suggestions. @@ -22,8 +22,8 @@ To learn about issues, click [here][2]. To open an issue, click [here][3]. To suggest documentation improvements, click [here][4]. -[1]: -[2]: +[1]: +[2]: [3]: [4]: @@ -38,8 +38,10 @@ To suggest documentation improvements, click [here][4]. | ![reject](http://devdocs.magento.com/common/images/github_reject.png) | The pull request has been rejected and will not be merged into mainline code. Possible reasons can include but are not limited to: issue has already been fixed in another code contribution, or there is an issue with the code contribution. | | ![bug report](http://devdocs.magento.com/common/images/github_bug.png) | The Magento Team has confirmed that this issue contains the minimum required information to reproduce. | | ![acknowledged](http://devdocs.magento.com/common/images/gitHub_acknowledged.png) | The Magento Team has validated the issue and an internal ticket has been created. | -| ![acknowledged](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. | -| ![acknowledged](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. | +| ![in progress](http://devdocs.magento.com/common/images/github_inProgress.png) | The internal ticket is currently in progress, fix is scheduled to be delivered. | +| ![needs update](http://devdocs.magento.com/common/images/github_needsUpdate.png) | The Magento Team needs additional information from the reporter to properly prioritize and process the issue or pull request. | + +To learn more about issue gate labels click [here](https://github.com/magento/magento2/wiki/Magento-Issue-Gates)

Reporting security issues

diff --git a/app/bootstrap.php b/app/bootstrap.php index 3d474cea45432..e77c6d432c816 100644 --- a/app/bootstrap.php +++ b/app/bootstrap.php @@ -14,12 +14,12 @@ if (!defined('PHP_VERSION_ID') || !(PHP_VERSION_ID === 70002 || PHP_VERSION_ID === 70004 || PHP_VERSION_ID >= 70006)) { if (PHP_SAPI == 'cli') { echo 'Magento supports 7.0.2, 7.0.4, and 7.0.6 or later. ' . - 'Please read http://devdocs.magento.com/guides/v1.0/install-gde/system-requirements.html'; + 'Please read http://devdocs.magento.com/guides/v2.2/install-gde/system-requirements.html'; } else { echo <<

Magento supports PHP 7.0.2, 7.0.4, and 7.0.6 or later. Please read - + Magento System Requirements. HTML; diff --git a/app/code/Magento/AdminNotification/composer.json b/app/code/Magento/AdminNotification/composer.json index a3371c702c729..59a3845cbd4b7 100644 --- a/app/code/Magento/AdminNotification/composer.json +++ b/app/code/Magento/AdminNotification/composer.json @@ -11,7 +11,7 @@ "lib-libxml": "*" }, "type": "magento2-module", - "version": "100.2.0", + "version": "100.2.1", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php index 23829d3725119..0e8acb37104e6 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php +++ b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php @@ -394,7 +394,7 @@ protected function saveAndReplaceAdvancedPrices() ? $rowData[self::COL_TIER_PRICE] : 0, 'percentage_value' => $rowData[self::COL_TIER_PRICE_TYPE] === self::TIER_PRICE_TYPE_PERCENT ? $rowData[self::COL_TIER_PRICE] : null, - 'website_id' => $this->getWebsiteId($rowData[self::COL_TIER_PRICE_WEBSITE]) + 'website_id' => $this->getWebSiteId($rowData[self::COL_TIER_PRICE_WEBSITE]) ]; } } diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php index 5111b4932d7a8..9a380ff75da24 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricing/Validator/WebsiteTest.php @@ -27,7 +27,7 @@ class WebsiteTest extends \PHPUnit\Framework\TestCase protected function setUp() { - $this->webSiteModel = $this->getMockBuilder(\Magento\Store\Model\WebSite::class) + $this->webSiteModel = $this->getMockBuilder(\Magento\Store\Model\Website::class) ->setMethods(['getBaseCurrency']) ->disableOriginalConstructor() ->getMock(); diff --git a/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php b/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php index c4118792255cd..34f2b7d53d9be 100644 --- a/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php +++ b/app/code/Magento/Analytics/Block/Adminhtml/System/Config/CollectionTimeLabel.php @@ -5,13 +5,35 @@ */ namespace Magento\Analytics\Block\Adminhtml\System\Config; +use Magento\Framework\App\ObjectManager; + /** * Provides label with default Time Zone */ class CollectionTimeLabel extends \Magento\Config\Block\System\Config\Form\Field { /** - * Add default time zone to comment + * @var \Magento\Framework\Locale\ResolverInterface + */ + private $localeResolver; + + /** + * @param \Magento\Backend\Block\Template\Context $context + * @param array $data + * @param \Magento\Framework\Locale\ResolverInterface|null $localeResolver + */ + public function __construct( + \Magento\Backend\Block\Template\Context $context, + array $data = [], + \Magento\Framework\Locale\ResolverInterface $localeResolver = null + ) { + $this->localeResolver = $localeResolver ?: + ObjectManager::getInstance()->get(\Magento\Framework\Locale\ResolverInterface::class); + parent::__construct($context, $data); + } + + /** + * Add current time zone to comment, properly translated according to locale * * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string @@ -19,7 +41,9 @@ class CollectionTimeLabel extends \Magento\Config\Block\System\Config\Form\Field public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) { $timeZoneCode = $this->_localeDate->getConfigTimezone(); - $getLongTimeZoneName = \IntlTimeZone::createTimeZone($timeZoneCode)->getDisplayName(); + $locale = $this->localeResolver->getLocale(); + $getLongTimeZoneName = \IntlTimeZone::createTimeZone($timeZoneCode) + ->getDisplayName(false, \IntlTimeZone::DISPLAY_LONG, $locale); $element->setData( 'comment', sprintf("%s (%s)", $getLongTimeZoneName, $timeZoneCode) diff --git a/app/code/Magento/Analytics/composer.json b/app/code/Magento/Analytics/composer.json index b17bb10cb4112..349e5f3c08c4c 100644 --- a/app/code/Magento/Analytics/composer.json +++ b/app/code/Magento/Analytics/composer.json @@ -4,10 +4,10 @@ "require": { "php": "7.0.2|7.0.4|~7.0.6|~7.1.0", "magento/module-backend": "100.2.*", - "magento/module-config": "100.2.*", + "magento/module-config": "101.0.*", "magento/module-integration": "100.2.*", "magento/module-store": "100.2.*", - "magento/framework": "100.2.*" + "magento/framework": "101.0.*" }, "type": "magento2-module", "version": "100.2.0", diff --git a/app/code/Magento/Analytics/etc/di.xml b/app/code/Magento/Analytics/etc/di.xml index 56657b58475d3..b9bb9cc9ff00c 100644 --- a/app/code/Magento/Analytics/etc/di.xml +++ b/app/code/Magento/Analytics/etc/di.xml @@ -254,4 +254,22 @@ NotifyDataChangedResponseResolver + + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + + + 1 + 1 + 1 + + + diff --git a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php index 9d9409fba093b..50279786c0a5b 100644 --- a/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php +++ b/app/code/Magento/Backend/Block/Dashboard/Orders/Grid.php @@ -92,7 +92,7 @@ protected function _prepareCollection() protected function _afterLoadCollection() { foreach ($this->getCollection() as $item) { - $item->getCustomer() ?: $item->setCustomer('Guest'); + $item->getCustomer() ?: $item->setCustomer($item->getBillingAddress()->getName()); } return $this; } diff --git a/app/code/Magento/Backend/Block/GlobalSearch.php b/app/code/Magento/Backend/Block/GlobalSearch.php index f4a46283808f4..9af4e9faef761 100644 --- a/app/code/Magento/Backend/Block/GlobalSearch.php +++ b/app/code/Magento/Backend/Block/GlobalSearch.php @@ -3,19 +3,61 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + namespace Magento\Backend\Block; +use Magento\Backend\Model\GlobalSearch\SearchEntityFactory; +use Magento\Backend\Model\GlobalSearch\SearchEntity; +use Magento\Framework\App\ObjectManager; + /** * @api * @since 100.0.2 */ class GlobalSearch extends \Magento\Backend\Block\Template { + /** + * @var SearchEntityFactory + */ + private $searchEntityFactory; + /** * @var string */ protected $_template = 'Magento_Backend::system/search.phtml'; + /** + * @var array + */ + private $entityResources; + + /** + * @var array + */ + private $entityPaths; + + /** + * @param Template\Context $context + * @param array $data + * @param array $entityResources + * @param array $entityPaths + * @param SearchEntityFactory|null $searchEntityFactory + */ + public function __construct( + Template\Context $context, + array $data = [], + array $entityResources = [], + array $entityPaths = [], + SearchEntityFactory $searchEntityFactory = null + ) { + $this->entityResources = $entityResources; + $this->entityPaths = $entityPaths; + $this->searchEntityFactory = $searchEntityFactory ?: ObjectManager::getInstance() + ->get(SearchEntityFactory::class); + + parent::__construct($context, $data); + } + /** * Get components configuration * @return array @@ -34,4 +76,48 @@ public function getWidgetInitOptions() ] ]; } + + /** + * Get entities which are allowed to show. + * + * @return SearchEntity[] + */ + public function getEntitiesToShow() + { + $allowedEntityTypes = []; + $entitiesToShow = []; + + foreach ($this->entityResources as $entityType => $resource) { + if ($this->getAuthorization()->isAllowed($resource)) { + $allowedEntityTypes[] = $entityType; + } + } + + foreach ($allowedEntityTypes as $entityType) { + $url = $this->getUrlEntityType($entityType); + + $searchEntity = $this->searchEntityFactory->create(); + $searchEntity->setId('searchPreview' . $entityType); + $searchEntity->setTitle('in ' . $entityType); + $searchEntity->setUrl($url); + + $entitiesToShow[] = $searchEntity; + } + + return $entitiesToShow; + } + + /** + * Get url path by entity type. + * + * @param string $entityType + * + * @return string + */ + private function getUrlEntityType(string $entityType) + { + $urlPath = $this->entityPaths[$entityType] ?? ''; + + return $this->getUrl($urlPath); + } } diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php index f19799d2e4939..034887c67d1ee 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/AbstractForm.php @@ -37,7 +37,7 @@ protected function _prepareForm() ['data' => ['id' => 'edit_form', 'action' => $this->getData('action'), 'method' => 'post']] ); - $this->_prepareStoreFieldSet($form); + $this->_prepareStoreFieldset($form); $form->addField( 'store_type', 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 c9bce1cbf3888..421885a0c32a3 100644 --- a/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php +++ b/app/code/Magento/Backend/Controller/Adminhtml/System/Account/Save.php @@ -54,9 +54,9 @@ public function execute() $user = $this->_objectManager->create(\Magento\User\Model\User::class)->load($userId); $user->setId($userId) - ->setUsername($this->getRequest()->getParam('username', false)) - ->setFirstname($this->getRequest()->getParam('firstname', false)) - ->setLastname($this->getRequest()->getParam('lastname', false)) + ->setUserName($this->getRequest()->getParam('username', false)) + ->setFirstName($this->getRequest()->getParam('firstname', false)) + ->setLastName($this->getRequest()->getParam('lastname', false)) ->setEmail(strtolower($this->getRequest()->getParam('email', false))); if ($this->_objectManager->get(\Magento\Framework\Validator\Locale::class)->isValid($interfaceLocale)) { diff --git a/app/code/Magento/Backend/Model/GlobalSearch/SearchEntity.php b/app/code/Magento/Backend/Model/GlobalSearch/SearchEntity.php new file mode 100644 index 0000000000000..18691802b9218 --- /dev/null +++ b/app/code/Magento/Backend/Model/GlobalSearch/SearchEntity.php @@ -0,0 +1,73 @@ +getData('id'); + } + + /** + * Get url. + * + * @return string + */ + public function getUrl() + { + return $this->getData('url'); + } + + /** + * Get title. + * + * @return string + */ + public function getTitle() + { + return $this->getData('title'); + } + + /** + * Set Id. + * + * @param string $value + */ + public function setId(string $value) + { + $this->setData('id', $value); + } + + /** + * Set url. + * + * @param string $value + */ + public function setUrl(string $value) + { + $this->setData('url', $value); + } + + /** + * Set title. + * + * @param string $value + */ + public function setTitle(string $value) + { + $this->setData('title', $value); + } +} diff --git a/app/code/Magento/Backend/Model/Menu/Item.php b/app/code/Magento/Backend/Model/Menu/Item.php index fe6564d24e891..42febe94d0abf 100644 --- a/app/code/Magento/Backend/Model/Menu/Item.php +++ b/app/code/Magento/Backend/Model/Menu/Item.php @@ -467,15 +467,15 @@ public function toArray() { return [ 'parent_id' => $this->_parentId, - 'module_name' => $this->_moduleName, + 'module' => $this->_moduleName, 'sort_index' => $this->_sortIndex, - 'depends_on_config' => $this->_dependsOnConfig, + 'dependsOnConfig' => $this->_dependsOnConfig, 'id' => $this->_id, 'resource' => $this->_resource, 'path' => $this->_path, 'action' => $this->_action, - 'depends_on_module' => $this->_dependsOnModule, - 'tooltip' => $this->_tooltip, + 'dependsOnModule' => $this->_dependsOnModule, + 'toolTip' => $this->_tooltip, 'title' => $this->_title, 'target' => $this->target, 'sub_menu' => isset($this->_submenu) ? $this->_submenu->toArray() : null @@ -492,15 +492,15 @@ public function toArray() public function populateFromArray(array $data) { $this->_parentId = $this->_getArgument($data, 'parent_id'); - $this->_moduleName = $this->_getArgument($data, 'module_name', 'Magento_Backend'); + $this->_moduleName = $this->_getArgument($data, 'module', 'Magento_Backend'); $this->_sortIndex = $this->_getArgument($data, 'sort_index'); - $this->_dependsOnConfig = $this->_getArgument($data, 'depends_on_config'); + $this->_dependsOnConfig = $this->_getArgument($data, 'dependsOnConfig'); $this->_id = $this->_getArgument($data, 'id'); $this->_resource = $this->_getArgument($data, 'resource'); $this->_path = $this->_getArgument($data, 'path', ''); $this->_action = $this->_getArgument($data, 'action'); - $this->_dependsOnModule = $this->_getArgument($data, 'depends_on_module'); - $this->_tooltip = $this->_getArgument($data, 'tooltip', ''); + $this->_dependsOnModule = $this->_getArgument($data, 'dependsOnModule'); + $this->_tooltip = $this->_getArgument($data, 'toolTip'); $this->_title = $this->_getArgument($data, 'title'); $this->target = $this->_getArgument($data, 'target'); if (isset($data['sub_menu'])) { diff --git a/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php b/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php new file mode 100644 index 0000000000000..0010ffad87524 --- /dev/null +++ b/app/code/Magento/Backend/Test/Unit/Block/GlobalSearchTest.php @@ -0,0 +1,123 @@ + \Magento\Catalog\Controller\Adminhtml\Product::ADMIN_RESOURCE, + 'Orders' => \Magento\Sales\Controller\Adminhtml\Order::ADMIN_RESOURCE, + 'Customers' => \Magento\Customer\Controller\Adminhtml\Index::ADMIN_RESOURCE, + 'Pages' => \Magento\Cms\Controller\Adminhtml\Page\Index::ADMIN_RESOURCE, + ]; + + /** + * @var array + */ + private $entityPaths = [ + 'Products' => 'catalog/product/index/', + 'Orders' => 'sales/order/index/', + 'Customers' => 'customer/index/index', + 'Pages' => 'cms/page/index/', + ]; + + protected function setUp() + { + $objectManager = new ObjectManager($this); + + $this->authorization = $this->createMock(\Magento\Framework\AuthorizationInterface::class); + $this->urlBuilder = $this->createMock(\Magento\Framework\UrlInterface::class); + $context = $this->createMock(\Magento\Backend\Block\Template\Context::class); + + $context->expects($this->atLeastOnce())->method('getAuthorization')->willReturn($this->authorization); + $context->expects($this->atLeastOnce())->method('getUrlBuilder')->willReturn($this->urlBuilder); + + $this->searchEntityFactory = $this->createMock(\Magento\Backend\Model\GlobalSearch\SearchEntityFactory::class); + + $this->globalSearch = $objectManager->getObject( + GlobalSearch::class, + [ + 'context' => $context, + 'searchEntityFactory' => $this->searchEntityFactory, + 'entityResources' => $this->entityResources, + 'entityPaths' => $this->entityPaths, + ] + ); + } + + /** + * @param array $results + * @param int $expectedEntitiesQty + * + * @dataProvider getEntitiesToShowDataProvider + */ + public function testGetEntitiesToShow(array $results, int $expectedEntitiesQty) + { + $searchEntity = $this->createMock(SearchEntity::class); + + $this->authorization->expects($this->exactly(count($results)))->method('isAllowed') + ->willReturnOnConsecutiveCalls($results[0], $results[1], $results[2], $results[3]); + $this->urlBuilder->expects($this->exactly($expectedEntitiesQty)) + ->method('getUrl')->willReturn('some/url/is/here'); + $this->searchEntityFactory->expects($this->exactly($expectedEntitiesQty)) + ->method('create')->willReturn($searchEntity); + + $searchEntity->expects($this->exactly($expectedEntitiesQty))->method('setId'); + $searchEntity->expects($this->exactly($expectedEntitiesQty))->method('setTitle'); + $searchEntity->expects($this->exactly($expectedEntitiesQty))->method('setUrl'); + + $this->assertSame($expectedEntitiesQty, count($this->globalSearch->getEntitiesToShow())); + } + + public function getEntitiesToShowDataProvider() + { + return [ + [ + [true, false, true, false], + 2, + ], + [ + [true, true, true, true], + 4, + ], + [ + [false, false, false, false], + 0, + ], + ]; + } +} diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php index be171a8ed40bf..df242a4cf6129 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnSetTest.php @@ -117,7 +117,7 @@ public function testSetFilterTypePropagatesFilterTypeToColumns() public function testGetRowUrlIfUrlPathNotSet() { - $this->assertEquals('#', $this->_block->getRowUrl(new \StdClass())); + $this->assertEquals('#', $this->_block->getRowUrl(new \stdClass())); } public function testGetRowUrl() diff --git a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php index da13af87b71ea..c5c56fd75fbe7 100644 --- a/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php +++ b/app/code/Magento/Backend/Test/Unit/Block/Widget/Grid/ColumnTest.php @@ -351,7 +351,7 @@ public function testSetGetGrid() $this->_block->setFilter('StdClass'); - $grid = new \StdClass(); + $grid = new \stdClass(); $this->_block->setGrid($grid); $this->assertEquals($grid, $this->_block->getGrid()); } diff --git a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php index 31a13191750a3..2f0102ffd410d 100755 --- a/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Config/SessionLifetime/BackendModelTest.php @@ -20,7 +20,8 @@ public function testBeforeSave($value, $errorMessage = null) \Magento\Backend\Model\Config\SessionLifetime\BackendModel::class ); if ($errorMessage !== null) { - $this->expectException(\Magento\Framework\Exception\LocalizedException::class, $errorMessage); + $this->expectException(\Magento\Framework\Exception\LocalizedException::class); + $this->expectExceptionMessage($errorMessage); } $model->setValue($value); $object = $model->beforeSave(); diff --git a/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php b/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php index 74368537c39c7..ad172cbfbd165 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php +++ b/app/code/Magento/Backend/Test/Unit/Model/Menu/ItemTest.php @@ -56,9 +56,9 @@ class ItemTest extends \PHPUnit\Framework\TestCase 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ]; protected function setUp() diff --git a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php index b0c74461980a2..82f07e264b963 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php +++ b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_constructor_data.php @@ -12,21 +12,21 @@ 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], [ 'parent_id' => null, - 'module_name' => 'Magento_Backend', + 'module' => 'Magento_Backend', 'sort_index' => null, - 'depends_on_config' => 'system/config/isEnabled', + 'dependsOnConfig' => 'system/config/isEnabled', 'id' => 'item', 'resource' => 'Magento_Config::config', 'path' => '', 'action' => '/system/config', - 'depends_on_module' => 'Magento_Backend', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'toolTip' => 'Item tooltip', 'title' => 'Item Title', 'sub_menu' => null, 'target' => null @@ -38,43 +38,43 @@ 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => '5', 'resource' => null, 'path' => null, 'action' => null, - 'depends_on_module' => null, - 'tooltip' => null, + 'dependsOnModule' => null, + 'toolTip' => null, 'title' => null, 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], ], [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => '5', 'resource' => null, 'path' => '', 'action' => null, - 'depends_on_module' => null, - 'tooltip' => '', + 'dependsOnModule' => null, + 'toolTip' => '', 'title' => null, 'sub_menu' => ['submenuArray'], 'target' => null @@ -83,51 +83,51 @@ 'data with submenu to constructor' => [ [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => '5', 'resource' => null, 'path' => null, 'action' => null, - 'depends_on_module' => null, - 'tooltip' => null, + 'dependsOnModule' => null, + 'toolTip' => null, 'title' => null, 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], ], [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], ], [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => null, 'resource' => null, 'path' => '', 'action' => null, - 'depends_on_module' => null, - 'tooltip' => '', + 'dependsOnModule' => null, + 'toolTip' => '', 'title' => null, 'sub_menu' => ['submenuArray'], 'target' => null diff --git a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php index 30a43b0158ae3..b1a310d7d440b 100644 --- a/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php +++ b/app/code/Magento/Backend/Test/Unit/Model/_files/menu_item_data.php @@ -11,22 +11,22 @@ 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', 'sub_menu' => null, ], [ 'parent_id' => null, - 'module_name' => 'Magento_Backend', + 'module' => 'Magento_Backend', 'sort_index' => null, - 'depends_on_config' => 'system/config/isEnabled', + 'dependsOnConfig' => 'system/config/isEnabled', 'id' => 'item', 'resource' => 'Magento_Config::config', 'path' => '', 'action' => '/system/config', - 'depends_on_module' => 'Magento_Backend', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'toolTip' => 'Item tooltip', 'title' => 'Item Title', 'sub_menu' => null, 'target' => null @@ -35,46 +35,46 @@ 'with submenu' => [ [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => '5', 'resource' => null, 'path' => null, 'action' => null, - 'depends_on_module' => null, - 'tooltip' => null, + 'dependsOnModule' => null, + 'toolTip' => null, 'title' => null, 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], ], [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => '5', 'resource' => null, 'path' => null, 'action' => null, - 'depends_on_module' => null, - 'tooltip' => '', + 'dependsOnModule' => null, + 'toolTip' => '', 'title' => null, 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], 'target' => null ] @@ -82,38 +82,38 @@ 'small set of data' => [ [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], ], [ 'parent_id' => '1', - 'module_name' => 'Magento_Module1', + 'module' => 'Magento_Module1', 'sort_index' => '50', - 'depends_on_config' => null, + 'dependsOnConfig' => null, 'id' => null, 'resource' => null, 'path' => '', 'action' => null, - 'depends_on_module' => null, - 'tooltip' => '', + 'dependsOnModule' => null, + 'toolTip' => '', 'title' => null, 'sub_menu' => [ 'id' => 'item', 'title' => 'Item Title', 'action' => '/system/config', 'resource' => 'Magento_Config::config', - 'depends_on_module' => 'Magento_Backend', - 'depends_on_config' => 'system/config/isEnabled', - 'tooltip' => 'Item tooltip', + 'dependsOnModule' => 'Magento_Backend', + 'dependsOnConfig' => 'system/config/isEnabled', + 'toolTip' => 'Item tooltip', ], 'target' => null ] diff --git a/app/code/Magento/Backend/composer.json b/app/code/Magento/Backend/composer.json index 3d8cfa49cd1fa..d2cc8f76393f9 100644 --- a/app/code/Magento/Backend/composer.json +++ b/app/code/Magento/Backend/composer.json @@ -24,7 +24,7 @@ "magento/module-theme": "100.2.*" }, "type": "magento2-module", - "version": "100.2.1", + "version": "100.2.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Backend/etc/adminhtml/di.xml b/app/code/Magento/Backend/etc/adminhtml/di.xml index 97a39139411c0..de8286e7f3ecc 100644 --- a/app/code/Magento/Backend/etc/adminhtml/di.xml +++ b/app/code/Magento/Backend/etc/adminhtml/di.xml @@ -145,6 +145,9 @@ Magento\Config\Model\Config\Structure\ElementVisibilityInterface::HIDDEN Magento\Config\Model\Config\Structure\ElementVisibilityInterface::DISABLED + + + @@ -152,4 +155,20 @@ Magento\Backend\Block\Template + + + + Magento_Catalog::products + Magento_Sales::sales_order + Magento_Customer::manage + Magento_Cms::page + + + catalog/product/index/ + sales/order/index/ + customer/index/index + cms/page/index/ + + + diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index 27fd16cc920dc..b6324416d26d5 100644 --- a/app/code/Magento/Backend/etc/adminhtml/system.xml +++ b/app/code/Magento/Backend/etc/adminhtml/system.xml @@ -215,7 +215,7 @@ Magento\Directory\Model\Config\Source\Country - + Magento\Directory\Model\Config\Source\Country diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv index f9f44f547e25b..aa28a670b9205 100644 --- a/app/code/Magento/Backend/i18n/en_US.csv +++ b/app/code/Magento/Backend/i18n/en_US.csv @@ -461,3 +461,7 @@ Pagination,Pagination "Alternative text for the next pages link in the pagination menu. If empty, default arrow image is used.","Alternative text for the next pages link in the pagination menu. If empty, default arrow image is used." "Anchor Text for Next","Anchor Text for Next" "Theme Name","Theme Name" +"In Products","In Products" +"In Orders","In Orders" +"In Customers","In Customers" +"In Pages","In Pages" diff --git a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml index 40b7173f47417..8feccc9cf1b8f 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/page/header.phtml @@ -29,7 +29,7 @@ data-mage-init='{"dropdown":{}}' data-toggle="dropdown"> - +

    @@ -39,7 +39,7 @@ href="getUrl('adminhtml/system_account/index') ?>" getUiId('user', 'account', 'settings') ?> title="escapeHtml(__('Account Setting')) ?>"> - (escapeHtml($block->getUser()->getUsername()) ?>) + (escapeHtml($block->getUser()->getUserName()) ?>) diff --git a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml index a528133b2bc3a..3c65c0358eb57 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/system/search.phtml @@ -27,18 +27,15 @@ diff --git a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml index fcf4ccad7060b..a73740c249b67 100644 --- a/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml +++ b/app/code/Magento/Sales/view/adminhtml/templates/order/creditmemo/create/items.phtml @@ -4,6 +4,9 @@ * See COPYING.txt for license details. */ +/** + * @var Magento\Sales\Block\Adminhtml\Order\Creditmemo\Create\Items $block + */ // @codingStandardsIgnoreFile ?> @@ -101,6 +104,7 @@ getChildHtml('creditmemo_totals') ?> +
    getUpdateTotalsButtonHtml() ?>
    getSource() ?> @@ -24,7 +27,7 @@ @@ -34,7 +37,7 @@ '; } } diff --git a/app/code/Magento/Ui/Test/Unit/Component/FiltersTest.php b/app/code/Magento/Ui/Test/Unit/Component/FiltersTest.php new file mode 100644 index 0000000000000..3935842aa642b --- /dev/null +++ b/app/code/Magento/Ui/Test/Unit/Component/FiltersTest.php @@ -0,0 +1,79 @@ +uiComponentInterface = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponentInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $this->uiComponentFactory = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponentFactory::class) + ->disableOriginalConstructor() + ->getMock(); + $this->context = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponent\ContextInterface::class) + ->disableOriginalConstructor() + ->getMock(); + $this->filters = $objectManager->getObject( + Filters::class, + [ + 'columnFilters' => ['select' => $this->uiComponentInterface], + 'uiComponentFactory' => $this->uiComponentFactory, + 'context' => $this->context + ] + ); + } + + public function testUpdate() + { + $componentName = 'component_name'; + $componentConfig = [0, 1, 2]; + $columnInterface = $this->getMockBuilder(\Magento\Ui\Component\Listing\Columns\ColumnInterface::class) + ->disableOriginalConstructor() + ->setMethods(['getData', 'getName', 'getConfiguration']) + ->getMockForAbstractClass(); + $columnInterface->expects($this->atLeastOnce())->method('getData')->with('config/filter')->willReturn('text'); + $columnInterface->expects($this->atLeastOnce())->method('getName')->willReturn($componentName); + $columnInterface->expects($this->once())->method('getConfiguration')->willReturn($componentConfig); + $filterComponent = $this->getMockBuilder(\Magento\Framework\View\Element\UiComponentInterface::class) + ->disableOriginalConstructor() + ->setMethods(['setData', 'prepare']) + ->getMockForAbstractClass(); + $filterComponent->expects($this->once())->method('setData')->with('config', $componentConfig) + ->willReturnSelf(); + $filterComponent->expects($this->once())->method('prepare')->willReturnSelf(); + $this->uiComponentFactory->expects($this->once())->method('create') + ->with($componentName, 'filterInput', ['context' => $this->context]) + ->willReturn($filterComponent); + + $this->filters->update($columnInterface); + /** Verify that filter is already set and it wouldn't be set again */ + $this->filters->update($columnInterface); + } +} diff --git a/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php b/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php index 00a88437c8cb1..a0cec2258d658 100644 --- a/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php +++ b/app/code/Magento/Ui/Test/Unit/Model/ResourceModel/BookmarkRepositoryTest.php @@ -94,7 +94,8 @@ public function testSaveWithException() ->method('save') ->with($this->bookmarkMock) ->willThrowException(new \Exception($exceptionMessage)); - $this->expectException(\Magento\Framework\Exception\CouldNotSaveException::class, __($exceptionMessage)); + $this->expectException(\Magento\Framework\Exception\CouldNotSaveException::class); + $this->expectExceptionMessage($exceptionMessage); $this->bookmarkRepository->save($this->bookmarkMock); } @@ -143,7 +144,8 @@ public function testDeleteWithException() ->method('delete') ->with($this->bookmarkMock) ->willThrowException(new \Exception($exceptionMessage)); - $this->expectException(\Magento\Framework\Exception\CouldNotDeleteException::class, __($exceptionMessage)); + $this->expectException(\Magento\Framework\Exception\CouldNotDeleteException::class); + $this->expectExceptionMessage($exceptionMessage); $this->assertTrue($this->bookmarkRepository->delete($this->bookmarkMock)); } diff --git a/app/code/Magento/Ui/Test/Unit/TemplateEngine/Xhtml/ResultTest.php b/app/code/Magento/Ui/Test/Unit/TemplateEngine/Xhtml/ResultTest.php new file mode 100644 index 0000000000000..e51062e1cb36b --- /dev/null +++ b/app/code/Magento/Ui/Test/Unit/TemplateEngine/Xhtml/ResultTest.php @@ -0,0 +1,97 @@ +template = $this->createPartialMock(Template::class, ['append']); + $this->compiler = $this->createMock(CompilerInterface::class); + $this->component = $this->createMock(UiComponentInterface::class); + $this->structure = $this->createPartialMock(Structure::class, ['generate']); + $this->logger = $this->createMock(LoggerInterface::class); + + $this->objectManager = new ObjectManager($this); + $this->testModel = $this->objectManager->getObject(Result::class, [ + 'template' => $this->template, + 'compiler' => $this->compiler, + 'component' => $this->component, + 'structure' => $this->structure, + 'logger' => $this->logger, + ]); + } + + /** + * Test Append layout configuration method + */ + public function testAppendLayoutConfiguration() + { + $configWithCdata = 'text before '; + $this->structure->expects($this->once()) + ->method('generate') + ->with($this->component) + ->willReturn([$configWithCdata]); + $this->template->expects($this->once()) + ->method('append') + ->with(''); + + $this->testModel->appendLayoutConfiguration(); + } +} diff --git a/app/code/Magento/Ui/composer.json b/app/code/Magento/Ui/composer.json index 1f58c55ce61b6..224213886dcd4 100644 --- a/app/code/Magento/Ui/composer.json +++ b/app/code/Magento/Ui/composer.json @@ -13,7 +13,7 @@ "magento/module-config": "101.0.*" }, "type": "magento2-module", - "version": "101.0.1", + "version": "101.0.2", "license": [ "OSL-3.0", "AFL-3.0" diff --git a/app/code/Magento/Ui/i18n/en_US.csv b/app/code/Magento/Ui/i18n/en_US.csv index 225d83387563b..cff52a3fd6fed 100644 --- a/app/code/Magento/Ui/i18n/en_US.csv +++ b/app/code/Magento/Ui/i18n/en_US.csv @@ -192,7 +192,7 @@ CSV,CSV "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." +"Admin is a required field in each row.","Admin is a required field in 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." diff --git a/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js b/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js index d4eea859b4d35..94a05e5fcde33 100644 --- a/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js +++ b/app/code/Magento/Ui/view/base/web/js/dynamic-rows/dynamic-rows.js @@ -224,6 +224,14 @@ define([ return this; }, + /** @inheritdoc */ + destroy: function () { + if (this.dnd()) { + this.dnd().destroy(); + } + this._super(); + }, + /** * Calls 'initObservable' of parent * @@ -533,7 +541,8 @@ define([ * Init header elements */ initHeader: function () { - var data; + var labels = [], + data; if (!this.labels().length) { _.each(this.childTemplate.children, function (cell) { @@ -547,8 +556,9 @@ define([ sortOrder: cell.config.sortOrder }); - this.labels.push(data); + labels.push(data); }, this); + this.labels(_.sortBy(labels, 'sortOrder')); } }, diff --git a/app/code/Magento/Ui/view/base/web/js/form/components/html.js b/app/code/Magento/Ui/view/base/web/js/form/components/html.js index 82e51aff40287..466b6840e9b19 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/components/html.js +++ b/app/code/Magento/Ui/view/base/web/js/form/components/html.js @@ -19,6 +19,7 @@ define([ showSpinner: false, loading: false, visible: true, + error: false, template: 'ui/content/content', additionalClasses: {} }, diff --git a/app/code/Magento/Ui/view/base/web/js/form/element/region.js b/app/code/Magento/Ui/view/base/web/js/form/element/region.js index 1b2ce8889af10..0edb4c1966b54 100644 --- a/app/code/Magento/Ui/view/base/web/js/form/element/region.js +++ b/app/code/Magento/Ui/view/base/web/js/form/element/region.js @@ -35,6 +35,11 @@ define([ return; } option = options[value]; + + if (typeof option === 'undefined') { + return; + } + defaultPostCodeResolver.setUseDefaultPostCode(!option['is_zipcode_optional']); if (this.skipValidation) { diff --git a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js index 01a1575541408..0ffd65c47d4cf 100644 --- a/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js +++ b/app/code/Magento/Ui/view/base/web/js/lib/validation/rules.js @@ -84,8 +84,10 @@ define([ ], 'range-words': [ function (value, params) { - return utils.stripHtml(value).match(/\b\w+\b/g).length >= params[0] && - value.match(/bw+b/g).length < params[1]; + var match = utils.stripHtml(value).match(/\b\w+\b/g) || []; + + return match.length >= params[0] && + match.length <= params[1]; }, $.mage.__('Please enter between {0} and {1} words.') ], diff --git a/app/code/Magento/Ui/view/base/web/templates/content/content.html b/app/code/Magento/Ui/view/base/web/templates/content/content.html index 8cf47120865dc..62e5959a02559 100644 --- a/app/code/Magento/Ui/view/base/web/templates/content/content.html +++ b/app/code/Magento/Ui/view/base/web/templates/content/content.html @@ -17,3 +17,5 @@
    + +