diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000000000..00763eb56e0c6 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,206 @@ +/app/code/Magento/AdminNotification/ @paliarush +/app/code/Magento/Backend/ @paliarush +/app/code/Magento/User/ @paliarush +/lib/internal/Magento/Framework/App/ @buskamuza +/lib/internal/Magento/Framework/Controller/ @buskamuza +/lib/internal/Magento/Framework/Flag/ @buskamuza +/lib/internal/Magento/Framework/HTTP/ @buskamuza +/lib/internal/Magento/Framework/Logger/ @buskamuza +/lib/internal/Magento/Framework/Message/ @buskamuza +/lib/internal/Magento/Framework/Notification/ @buskamuza +/lib/internal/Magento/Framework/Session/ @buskamuza +/lib/internal/Magento/Framework/Url/ @buskamuza +/app/code/Magento/Cms/ @melnikovi +/app/code/Magento/CmsUrlRewrite/ @melnikovi +/app/code/Magento/Contact/ @melnikovi +/app/code/Magento/Email/ @melnikovi +/app/code/Magento/Variable/ @melnikovi +/app/code/Magento/Widget/ @melnikovi +/lib/internal/Magento/Framework/Cache/ @kokoc +/app/code/Magento/CacheInvalidate/ @kokoc +/app/code/Magento/CatalogInventory/ @tariqjawed83 @maghamed +/app/code/Magento/Bundle/ @akaplya +/app/code/Magento/BundleImportExport/ @akaplya +/app/code/Magento/Catalog/ @akaplya +/app/code/Magento/CatalogAnalytics/ @akaplya +/app/code/Magento/CatalogImportExport/ @akaplya +/app/code/Magento/CatalogSearch/ @kokoc +/app/code/Magento/CatalogUrlRewrite/ @akaplya +/app/code/Magento/ConfigurableImportExport/ @akaplya +/app/code/Magento/ConfigurableProduct/ @akaplya +/app/code/Magento/Downloadable/ @akaplya +/app/code/Magento/DownloadableImportExport/ @akaplya +/app/code/Magento/GroupedImportExport/ @akaplya +/app/code/Magento/GroupedProduct/ @akaplya +/app/code/Magento/LayeredNavigation/ @kokoc +/app/code/Magento/ProductVideo/ @akaplya +/app/code/Magento/Review/ @akaplya +/app/code/Magento/Swatches/ @akaplya +/app/code/Magento/SwatchesLayeredNavigation/ @kokoc +/app/code/Magento/Checkout/ @paliarush +/app/code/Magento/CheckoutAgreements/ @paliarush +/app/code/Magento/GiftMessage/ @paliarush +/app/code/Magento/InstantPurchase/ @paliarush +/app/code/Magento/Multishipping/ @joni-jones +/app/code/Magento/Quote/ @paliarush +/app/code/Magento/QuoteAnalytics/ @paliarush +/lib/internal/Magento/Framework/Code/ @joni-jones +/lib/internal/Magento/Framework/Reflection/ @joni-jones +/lib/internal/Magento/Framework/Component/ @buskamuza +/app/code/Magento/Version/ @buskamuza +/lib/internal/Magento/Framework/Config/ @paliarush +/app/code/Magento/Config/ @paliarush +/lib/internal/Magento/Framework/Console/ @joni-jones +/lib/internal/Magento/Framework/Process/ @joni-jones +/lib/internal/Magento/Framework/Shell/ @joni-jones +/app/code/Magento/Cookie/ @kokoc +/lib/internal/Magento/Framework/Crontab/ @tariqjawed83 @buskamuza +/app/code/Magento/Cron/ @tariqjawed83 @buskamuza +/app/code/Magento/Customer/ @paliarush +/app/code/Magento/CustomerAnalytics/ @paliarush +/app/code/Magento/CustomerImportExport/ @paliarush +/app/code/Magento/Persistent/ @paliarush +/app/code/Magento/Wishlist/ @paliarush +/lib/internal/Magento/Framework/DB/ @akaplya +/lib/internal/Magento/Framework/EntityManager/ @akaplya +/lib/internal/Magento/Framework/Indexer/ @akaplya +/lib/internal/Magento/Framework/Model/ @akaplya +/lib/internal/Magento/Framework/Mview/ @akaplya +/app/code/Magento/Eav/ @akaplya +/app/code/Magento/Indexer/ @akaplya +/lib/internal/Magento/Framework/Archive/ @joni-jones +/lib/internal/Magento/Framework/Convert/ @joni-jones +/lib/internal/Magento/Framework/Data/ @joni-jones +/lib/internal/Magento/Framework/DomDocument/ @joni-jones +/lib/internal/Magento/Framework/Json/ @joni-jones +/lib/internal/Magento/Framework/Math/ @joni-jones +/lib/internal/Magento/Framework/Parse/ @joni-jones +/lib/internal/Magento/Framework/Serialize/ @joni-jones +/lib/internal/Magento/Framework/Simplexml/ @joni-jones +/lib/internal/Magento/Framework/Stdlib/ @joni-jones +/lib/internal/Magento/Framework/Unserialize/ @joni-jones +/lib/internal/Magento/Framework/Xml/ @joni-jones +/lib/internal/Magento/Framework/XsltProcessor/ @joni-jones +/app/code/Magento/Deploy/ @kandy @buskamuza +/lib/internal/Magento/Framework/Profiler/ @kandy +/app/code/Magento/Developer/ @buskamuza +/app/code/Magento/Directory/ @buskamuza +/lib/internal/Magento/Framework/Exception/ @paliarush +/lib/internal/Magento/Framework/File/ @buskamuza +/lib/internal/Magento/Framework/Filesystem/ @buskamuza +/lib/internal/Magento/Framework/System/ @buskamuza +/lib/internal/Magento/Framework/Css/ @DrewML +/lib/internal/Magento/Framework/Option/ @DrewML +/lib/internal/Magento/Framework/RequireJs/ @DrewML +/lib/internal/Magento/Framework/View/ @melnikovi +/dev/tests/js/ @DrewML +/app/code/Magento/RequireJs/ @DrewML +/app/code/Magento/Theme/ @melnikovi +/app/code/Magento/Ui/ @melnikovi +/lib/internal/Magento/Framework/Intl/ @melnikovi +/lib/internal/Magento/Framework/Locale/ @melnikovi +/lib/internal/Magento/Framework/Phrase/ @melnikovi +/lib/internal/Magento/Framework/Translate/ @melnikovi +/app/code/Magento/Translation/ @melnikovi +/app/code/Magento/ImportExport/ @akaplya +/app/code/Magento/GoogleAdwords/ @buskamuza @melnikovi +/app/code/Magento/Newsletter/ @buskamuza @melnikovi +/app/code/Magento/ProductAlert/ @buskamuza @melnikovi +/app/code/Magento/Rss/ @buskamuza @melnikovi +/app/code/Magento/SendFriend/ @buskamuza @melnikovi +/app/code/Magento/Marketplace/ @buskamuza +/app/code/Magento/MediaStorage/ @buskamuza +/lib/internal/Magento/Framework/Amqp/ @tariqjawed83 @paliarush +/lib/internal/Magento/Framework/Bulk/ @tariqjawed83 @paliarush +/lib/internal/Magento/Framework/Communication/ @tariqjawed83 @paliarush +/app/code/Magento/Amqp/ @tariqjawed83 @paliarush +/app/code/Magento/AsynchronousOperations/ @tariqjawed83 @paliarush +/app/code/Magento/MessageQueue/ @tariqjawed83 @paliarush +/app/code/Magento/MysqlMq/ @tariqjawed83 @paliarush +/app/code/Magento/Sales/ @joni-jones +/app/code/Magento/SalesInventory/ @joni-jones +/app/code/Magento/SalesSequence/ @joni-jones +/lib/internal/Magento/Framework/Event/ @buskamuza @kandy +/lib/internal/Magento/Framework/Interception/ @buskamuza @kandy +/lib/internal/Magento/Framework/ObjectManager/ @buskamuza @kandy +/app/code/Magento/PageCache/ @Andrey @kokoc @paliarush +/app/code/Magento/Authorizenet/ @joni-jones +/app/code/Magento/Braintree/ @joni-jones +/app/code/Magento/OfflinePayments/ @joni-jones +/app/code/Magento/Payment/ @joni-jones +/app/code/Magento/Paypal/ @joni-jones +/app/code/Magento/Signifyd/ @joni-jones +/app/code/Magento/Vault/ @joni-jones +/lib/internal/Magento/Framework/Pricing/ @akaplya +/app/code/Magento/AdvancedPricingImportExport/ @akaplya +/app/code/Magento/CurrencySymbol/ @akaplya +/app/code/Magento/Msrp/ @akaplya +/app/code/Magento/Tax/ @akaplya +/app/code/Magento/TaxImportExport/ @akaplya +/app/code/Magento/Weee/ @akaplya +/app/code/Magento/CatalogRule/ @kokoc +/app/code/Magento/CatalogRuleConfigurable/ @kokoc +/app/code/Magento/CatalogWidget/ @kokoc +/app/code/Magento/Rule/ @kokoc +/app/code/Magento/SalesRule/ @akaplya +/app/code/Magento/ReleaseNotification/ @paliarush +/app/code/Magento/Analytics/ @tariqjawed83 @buskamuza +/app/code/Magento/GoogleAnalytics/ @tariqjawed83 @buskamuza +/app/code/Magento/NewRelicReporting/ @tariqjawed83 @buskamuza +/app/code/Magento/Reports/ @tariqjawed83 @buskamuza +/app/code/Magento/ReviewAnalytics/ @tariqjawed83 @buskamuza +/app/code/Magento/SalesAnalytics/ @tariqjawed83 @buskamuza +/app/code/Magento/WishlistAnalytics/ @tariqjawed83 @buskamuza +/app/code/Magento/GoogleOptimizer/ @paliarush +/app/code/Magento/Robots/ @paliarush +/app/code/Magento/Sitemap/ @paliarush +/lib/internal/Magento/Framework/Search/ @kokoc +/app/code/Magento/AdvancedSearch/ @kokoc +/app/code/Magento/Elasticsearch/ @kokoc +/app/code/Magento/Search/ @kokoc +/lib/internal/Magento/Framework/Acl/ @kokoc +/lib/internal/Magento/Framework/Authorization/ @kokoc +/lib/internal/Magento/Framework/Encryption/ @kokoc +/app/code/Magento/Authorization/ @kokoc +/app/code/Magento/Captcha/ @kokoc +/app/code/Magento/EncryptionKey/ @kokoc +/app/code/Magento/Security/ @kokoc +/lib/internal/Magento/Framework/Autoload/ @buskamuza +/lib/internal/Magento/Framework/Backup/ @buskamuza +/lib/internal/Magento/Framework/Composer/ @buskamuza +/lib/internal/Magento/Framework/Setup/ @buskamuza +/app/code/Magento/Backup/ @buskamuza +/setup/ @buskamuza +/app/code/Magento/Dhl/ @joni-jones +/app/code/Magento/Fedex/ @joni-jones +/app/code/Magento/OfflineShipping/ @joni-jones +/app/code/Magento/Shipping/ @joni-jones +/app/code/Magento/Ups/ @joni-jones +/app/code/Magento/Usps/ @joni-jones +/app/code/Magento/Store/ @akaplya +/lib/internal/Magento/Framework/TestFramework/ @paliarush +/dev/tests/integration/framework/ @buskamuza +/dev/tests/setup-integration/framework/ @paliarush +/dev/tests/static/framework/ @paliarush +/dev/tests/unit/ @paliarush +/dev/tests/api-functional/ @paliarush +/app/code/Magento/UrlRewrite/ @kokoc +/lib/internal/Magento/Framework/Image/ @buskamuza +/lib/internal/Magento/Framework/Mail/ @melnikovi +/lib/internal/Magento/Framework/Filter/ @melnikovi +/lib/internal/Magento/Framework/Validation/ @melnikovi +/lib/internal/Magento/Framework/Validator/ @melnikovi +/lib/internal/Magento/Framework/Api/ @paliarush +/lib/internal/Magento/Framework/GraphQL/ @paliarush +/lib/internal/Magento/Framework/Oauth/ @paliarush +/lib/internal/Magento/Framework/Webapi/ @paliarush +/app/code/Magento/GraphQL/ @paliarush +/app/code/Magento/Integration/ @paliarush +/app/code/Magento/Swagger/ @paliarush +/app/code/Magento/Webapi/ @paliarush +/app/code/Magento/WebapiSecurity/ @paliarush + +composer.json @buskamuza +*.js @DrewML +.htaccess* @akaplya +nginx.conf* @akaplya diff --git a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php index 591e648547d61..974397226c56c 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php +++ b/app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php @@ -50,7 +50,13 @@ class AdvancedPricing extends \Magento\ImportExport\Model\Import\Entity\Abstract const VALIDATOR_WEBSITE = 'validator_website'; - const VALIDATOR_TEAR_PRICE = 'validator_tear_price'; + /** + * @deprecated + * @see VALIDATOR_TIER_PRICE + */ + private const VALIDATOR_TEAR_PRICE = 'validator_tier_price'; + + private const VALIDATOR_TIER_PRICE = 'validator_tier_price'; /** * Validation failure message template definitions. @@ -221,7 +227,7 @@ public function __construct( $this->_catalogProductEntity = $this->_resourceFactory->create()->getTable('catalog_product_entity'); $this->_oldSkus = $this->retrieveOldSkus(); $this->_validators[self::VALIDATOR_WEBSITE] = $websiteValidator; - $this->_validators[self::VALIDATOR_TEAR_PRICE] = $tierPriceValidator; + $this->_validators[self::VALIDATOR_TIER_PRICE] = $tierPriceValidator; $this->errorAggregator = $errorAggregator; foreach (array_merge($this->errorMessageTemplates, $this->_messageTemplates) as $errorCode => $message) { @@ -536,7 +542,7 @@ protected function getWebSiteId($websiteCode) */ protected function getCustomerGroupId($customerGroup) { - $customerGroups = $this->_getValidator(self::VALIDATOR_TEAR_PRICE)->getCustomerGroups(); + $customerGroups = $this->_getValidator(self::VALIDATOR_TIER_PRICE)->getCustomerGroups(); return $customerGroup == self::VALUE_ALL_GROUPS ? 0 : $customerGroups[$customerGroup]; } diff --git a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php index 2aa59c1cfb758..fd968a2682d58 100644 --- a/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php +++ b/app/code/Magento/AdvancedPricingImportExport/Test/Unit/Model/Import/AdvancedPricingTest.php @@ -15,6 +15,9 @@ */ class AdvancedPricingTest extends \Magento\ImportExport\Test\Unit\Model\Import\AbstractImportTestCase { + /** + * DB Table data + */ const TABLE_NAME = 'tableName'; const LINK_FIELD = 'linkField'; @@ -54,7 +57,7 @@ class AdvancedPricingTest extends \Magento\ImportExport\Test\Unit\Model\Import\A protected $websiteValidator; /** - * @var AdvancedPricing\Validator\TearPrice |\PHPUnit_Framework_MockObject_MockObject + * @var AdvancedPricing\Validator\TierPrice |\PHPUnit_Framework_MockObject_MockObject */ protected $tierPriceValidator; diff --git a/app/code/Magento/AdvancedSearch/README.md b/app/code/Magento/AdvancedSearch/README.md index 763d1917a8546..999721fca1c8f 100644 --- a/app/code/Magento/AdvancedSearch/README.md +++ b/app/code/Magento/AdvancedSearch/README.md @@ -1 +1,38 @@ -AdvancedSearch module introduces advanced search functionality and provides interfaces that allow to implement this functionality by 3rd party search engines +# Magento_AdvancedSearch module +The Magento_AdvancedSearch module introduces advanced search functionality and provides interfaces that allow third-party search engines to implement this functionality. + +## Installation details + +Before disabling or uninstalling this module, note that the following modules depends on this module: +- Magento_Elasticsearch +- Magento_Elasticsearch6 + +For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html). + +## Extensibility + +Extension developers can interact with the Magento_AdvancedSearch module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AdvancedSearch module. + +### Events + +This module observes the following event: + + - `catalogsearch_query_save_after` in the `Magento\AdvancedSearch\Model\Recommendations\SaveSearchQueryRelationsObserver` file. + +For information about an event in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). + +### Layouts + +The module interacts with the following layout handles in the `view/adminhtml/layout` directory: + +- `catalog_search_block` +- `catalog_search_edit` +- `catalog_search_relatedgrid` + +The module interacts with the following layout handles in the `view/frontend/layout` directory: + +- `catalogsearch_result_index` + +For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). \ No newline at end of file diff --git a/app/code/Magento/AmqpStore/Plugin/Framework/Amqp/Bulk/Exchange.php b/app/code/Magento/AmqpStore/Plugin/Framework/Amqp/Bulk/Exchange.php index c5db1f5300c29..37960a64d3861 100644 --- a/app/code/Magento/AmqpStore/Plugin/Framework/Amqp/Bulk/Exchange.php +++ b/app/code/Magento/AmqpStore/Plugin/Framework/Amqp/Bulk/Exchange.php @@ -91,7 +91,6 @@ public function beforeEnqueue(SubjectExchange $subject, $topic, array $envelopes if ($headers instanceof AMQPTable) { try { $headers->set('store_id', $storeId); - // phpcs:ignore Magento2.Exceptions.ThrowCatch } catch (AMQPInvalidArgumentException $ea) { $errorMessage = sprintf("Can't set storeId to amqp message. Error %s.", $ea->getMessage()); $this->logger->error($errorMessage); diff --git a/app/code/Magento/AmqpStore/README.md b/app/code/Magento/AmqpStore/README.md index 0f84c8ff3276e..88459a495401f 100644 --- a/app/code/Magento/AmqpStore/README.md +++ b/app/code/Magento/AmqpStore/README.md @@ -1,3 +1,9 @@ -# Amqp Store +# Magento_AmqpStore module -**AmqpStore** provides ability to specify store before publish messages with Amqp. +The Magento_AmqpStore module provides the ability to specify a store before publishing messages with the Advanced Message Queuing Protocol (AMQP). + +## Extensibility + +Extension developers can interact with the Magento_AmqpStore module using plugins. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AmqpStore module. diff --git a/app/code/Magento/Analytics/README.md b/app/code/Magento/Analytics/README.md index aa424182e2ebd..7ec30c6dd484b 100644 --- a/app/code/Magento/Analytics/README.md +++ b/app/code/Magento/Analytics/README.md @@ -1,18 +1,27 @@ -# Magento_Analytics Module +# Magento_Analytics module The Magento_Analytics module integrates your Magento instance with the [Magento Business Intelligence (MBI)](https://magento.com/products/business-intelligence) to use [Advanced Reporting](https://devdocs.magento.com/guides/v2.3/advanced-reporting/modules.html) functionality. The module implements the following functionality: -* enabling subscription to the MBI and automatic re-subscription -* changing the base URL with the same MBI account remained -* declaring the configuration schemas for report data collection -* collecting the Magento instance data as reports for the MBI -* introducing API that provides the collected data -* extending Magento configuration with the module parameters: - * subscription status (enabled/disabled) - * industry (a business area in which the instance website works) - * time of data collection (time of the day when the module collects data) +- Enabling subscription to Magento Business Intelligence (MBI) and automatic re-subscription +- Declaring the configuration schemas for report data collection +- Collecting the Magento instance data as reports for MBI +- Introducing API that provides the collected data +- Extending Magento configuration with the module parameters: + - Subscription status (enabled/disabled) + - Industry (a business area in which the instance website works) + - Time of data collection (time of the day when the module collects data) + +## Installation details + +Before disabling or uninstalling this module, note that the following modules depends on this module: +- Magento_CatalogAnalytics +- Magento_CustomerAnalytics +- Magento_QuoteAnalytics +- Magento_ReviewAnalytics +- Magento_SalesAnalytics +- Magento_WishlistAnalytics ## Structure @@ -29,12 +38,12 @@ The subscription to the MBI service is enabled during the installation process o Configuration settings for the Analytics module can be modified in the Admin Panel on the Stores > Configuration page under the General > Advanced Reporting tab. The following options can be adjusted: -* Advanced Reporting Service (Enabled/Disabled) - * Alters the status of the Advanced Reporting subscription -* Time of day to send data (Hour/Minute/Second in the store's time zone) - * Defines when the data collection process for the Advanced Reporting service occurs -* Industry - * Defines the industry of the store in order to create a personalized Advanced Reporting experience +- Advanced Reporting Service (Enabled/Disabled) + - Alters the status of the Advanced Reporting subscription +- Time of day to send data (Hour/Minute/Second in the store's time zone) + - Defines when the data collection process for the Advanced Reporting service occurs +- Industry + - Defines the industry of the store in order to create a personalized Advanced Reporting experience ## Extensibility diff --git a/app/code/Magento/AsynchronousOperations/README.md b/app/code/Magento/AsynchronousOperations/README.md index fb7d53df1b81c..896fddedab5fa 100644 --- a/app/code/Magento/AsynchronousOperations/README.md +++ b/app/code/Magento/AsynchronousOperations/README.md @@ -1 +1,48 @@ - This component is designed to provide response for client who launched the bulk operation as soon as possible and postpone handling of operations moving them to background handler. \ No newline at end of file +# Magento_AsynchronousOperations module + +This component is designed to provide a response for a client that launched the bulk operation as soon as possible and postpone handling of operations moving them to the background handler. + +## Installation details + +The Magento_AsynchronousOperations module creates the following tables in the database: + +- `magento_bulk` +- `magento_operation` +- `magento_acknowledged_bulk` + +Before disabling or uninstalling this module, note that the following modules depends on this module: + +- Magento_WebapiAsync + +For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html). + +## Extensibility + +Extension developers can interact with the Magento_AsynchronousOperations module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AsynchronousOperations module. + +### Layouts + +This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory: + +- `bulk_bulk_details` +- `bulk_bulk_details_modal` +- `bulk_index_index` + +For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). + +### UI components + +You can extend Magento_AsynchronousOperations module using the following configuration files in the `view/adminhtml/ui_component/` directory: + +- `bulk_details_form` +- `bulk_details_form_modal` +- `bulk_listing` +- `failed_operation_listing` +- `failed_operation_modal_listing` +- `notification_area` +- `retriable_operation_listing` +- `retriable_operation_modal_listing` + +For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). diff --git a/app/code/Magento/AsynchronousOperations/etc/adminhtml/system.xml b/app/code/Magento/AsynchronousOperations/etc/adminhtml/system.xml index 7190b80750357..e373a4fc78b13 100644 --- a/app/code/Magento/AsynchronousOperations/etc/adminhtml/system.xml +++ b/app/code/Magento/AsynchronousOperations/etc/adminhtml/system.xml @@ -13,6 +13,7 @@ + validate-zero-or-greater validate-digits diff --git a/app/code/Magento/Authorization/README.md b/app/code/Magento/Authorization/README.md index f74f5b6c70340..4b8afb4fef0d3 100644 --- a/app/code/Magento/Authorization/README.md +++ b/app/code/Magento/Authorization/README.md @@ -1,4 +1,20 @@ -# Authorization +# Magento_Authorization module -**Authorization** enables management of access control list roles and -rules in the application. +The Magento_Authorization module enables management of access control list roles and rules in the application. + +## Installation details + +The Magento_AdminNotification module creates the following tables in the database: + +- `authorization_role` +- `authorization_rule` + +Before disabling or uninstalling this module, note that the Magento_GraphQl module depends on this module. + +For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html). + +## Extensibility + +Extension developers can interact with the Magento_Authorization module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Authorization module. diff --git a/app/code/Magento/Authorizenet/README.md b/app/code/Magento/Authorizenet/README.md index 380161d8b264e..62598837bee6d 100644 --- a/app/code/Magento/Authorizenet/README.md +++ b/app/code/Magento/Authorizenet/README.md @@ -1 +1,42 @@ +# Magento_Authorizenet module + The Magento_Authorizenet module implements the integration with the Authorize.Net payment gateway and makes the latter available as a payment method in Magento. + +## Extensibility + +Extension developers can interact with the Magento_Authorizenet module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Authorizenet module. + +### Events + +This module dispatches the following events: + + - `checkout_directpost_placeOrder` event in the `\Magento\Authorizenet\Controller\Directpost\Payment\Place::placeCheckoutOrder()` method. Parameters: + - `result` is a data object (`\Magento\Framework\DataObject` class). + - `action` is a controller object (`\Magento\Authorizenet\Controller\Directpost\Payment\Place`). + + - `order_cancel_after` event in the `\Magento\Authorizenet\Model\Directpost::declineOrder()` method. Parameters: + - `order` is an order object (`\Magento\Sales\Model\Order` class). + + +This module observes the following events: + + - `checkout_submit_all_after` event in the `Magento\Authorizenet\Observer\SaveOrderAfterSubmitObserver` file. + - `checkout_directpost_placeOrder` event in the `Magento\Authorizenet\Observer\AddFieldsToResponseObserver` file. + +For information about events in Magento 2, see [Events and observers](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). + +### Layouts + +This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory: + +- `adminhtml_authorizenet_directpost_payment_redirect` + +This module introduces the following layouts and layout handles in the `view/frontend/layout` directory: + +- `authorizenet_directpost_payment_backendresponse` +- `authorizenet_directpost_payment_redirect` +- `authorizenet_directpost_payment_response` + +For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). diff --git a/app/code/Magento/AuthorizenetAcceptjs/Gateway/Command/RefundTransactionStrategyCommand.php b/app/code/Magento/AuthorizenetAcceptjs/Gateway/Command/RefundTransactionStrategyCommand.php index 53a1f13fa8786..3cdfcf23ba607 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/Gateway/Command/RefundTransactionStrategyCommand.php +++ b/app/code/Magento/AuthorizenetAcceptjs/Gateway/Command/RefundTransactionStrategyCommand.php @@ -59,6 +59,7 @@ public function execute(array $commandSubject): void * @param array $commandSubject * @return string * @throws CommandException + * @throws \Magento\Framework\Exception\NotFoundException */ private function getCommand(array $commandSubject): string { @@ -66,12 +67,37 @@ private function getCommand(array $commandSubject): string ->execute($commandSubject) ->get(); - if ($details['transaction']['transactionStatus'] === 'capturedPendingSettlement') { + if ($this->canVoid($details, $commandSubject)) { return self::VOID; - } elseif ($details['transaction']['transactionStatus'] !== 'settledSuccessfully') { + } + + if ($details['transaction']['transactionStatus'] !== 'settledSuccessfully') { throw new CommandException(__('This transaction cannot be refunded with its current status.')); } return self::REFUND; } + + /** + * Checks if void command can be performed. + * + * @param array $details + * @param array $commandSubject + * @return bool + * @throws CommandException + */ + private function canVoid(array $details, array $commandSubject) :bool + { + if ($details['transaction']['transactionStatus'] === 'capturedPendingSettlement') { + if ((float) $details['transaction']['authAmount'] !== (float) $commandSubject['amount']) { + throw new CommandException( + __('The transaction has not been settled, a partial refund is not yet available.') + ); + } + + return true; + } + + return false; + } } diff --git a/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/ClosePartialTransactionHandler.php b/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/ClosePartialTransactionHandler.php new file mode 100644 index 0000000000000..fd8af3d28c4d4 --- /dev/null +++ b/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/ClosePartialTransactionHandler.php @@ -0,0 +1,27 @@ +getCreditmemo()->getInvoice()->canRefund(); + } +} diff --git a/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/CloseTransactionHandler.php b/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/CloseTransactionHandler.php index acbde62bacd77..fa9bf55462111 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/CloseTransactionHandler.php +++ b/app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/CloseTransactionHandler.php @@ -47,7 +47,19 @@ public function handle(array $handlingSubject, array $response): void if ($payment instanceof Payment) { $payment->setIsTransactionClosed($this->closeTransaction); - $payment->setShouldCloseParentTransaction(true); + $payment->setShouldCloseParentTransaction($this->shouldCloseParentTransaction($payment)); } } + + /** + * Whether parent transaction should be closed. + * + * @param Payment $payment + * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) + */ + public function shouldCloseParentTransaction(Payment $payment) + { + return true; + } } diff --git a/app/code/Magento/AuthorizenetAcceptjs/README.md b/app/code/Magento/AuthorizenetAcceptjs/README.md index b066f8a2d7509..b507f97a5a223 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/README.md +++ b/app/code/Magento/AuthorizenetAcceptjs/README.md @@ -1 +1,29 @@ +# Magento_AuthorizenetAcceptjs module + The Magento_AuthorizenetAcceptjs module implements the integration with the Authorize.Net payment gateway and makes the latter available as a payment method in Magento. + +## Installation details + +Before disabling or uninstalling this module, note that the `Magento_AuthorizenetCardinal` module depends on this module. + +For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html). + +## Structure + +`Gateway/` - the directory that contains payment gateway command interfaces and service classes. + +For information about typical file structure of a module in Magento 2, see [Module file structure](http://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html#module-file-structure). + +## Extensibility + +Extension developers can interact with the Magento_AuthorizenetAcceptjs module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AuthorizenetAcceptjs module. + +### Events + +This module observes the following events: + +- `payment_method_assign_data_authorizenet_acceptjs` event in the `Magento\AuthorizenetAcceptjs\Observer\DataAssignObserver` file. + +For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). diff --git a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Command/RefundTransactionStrategyCommandTest.php b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Command/RefundTransactionStrategyCommandTest.php index df6d89d7bc585..79477b06e0e6c 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Command/RefundTransactionStrategyCommandTest.php +++ b/app/code/Magento/AuthorizenetAcceptjs/Test/Unit/Gateway/Command/RefundTransactionStrategyCommandTest.php @@ -62,20 +62,75 @@ public function testCommandWillVoidWhenTransactionIsPendingSettlement() ->method('execute'); $this->commandPoolMock->method('get') - ->willReturnMap([ - ['get_transaction_details', $this->transactionDetailsCommandMock], - ['void', $this->commandMock] - ]); + ->willReturnMap( + [ + [ + 'get_transaction_details', + $this->transactionDetailsCommandMock + ], + [ + 'void', + $this->commandMock + ] + ] + ); $this->transactionResultMock->method('get') - ->willReturn([ - 'transaction' => [ - 'transactionStatus' => 'capturedPendingSettlement' + ->willReturn( + [ + 'transaction' => [ + 'transactionStatus' => 'capturedPendingSettlement', + 'authAmount' => '20.19', + ] ] - ]); + ); $buildSubject = [ - 'foo' => '123' + 'foo' => '123', + 'amount' => '20.19', + ]; + + $this->transactionDetailsCommandMock->expects($this->once()) + ->method('execute') + ->with($buildSubject) + ->willReturn($this->transactionResultMock); + + $this->command->execute($buildSubject); + } + + /** + * @expectedException \Magento\Payment\Gateway\Command\CommandException + * @expectedExceptionMessage The transaction has not been settled, a partial refund is not yet available. + */ + public function testCommandWillThrowExceptionWhenVoidTransactionIsPartial() + { + // Assert command is executed + $this->commandMock->expects($this->never()) + ->method('execute'); + + $this->commandPoolMock->method('get') + ->willReturnMap( + [ + [ + 'get_transaction_details', + $this->transactionDetailsCommandMock + ], + ] + ); + + $this->transactionResultMock->method('get') + ->willReturn( + [ + 'transaction' => [ + 'transactionStatus' => 'capturedPendingSettlement', + 'authAmount' => '20.19', + ] + ] + ); + + $buildSubject = [ + 'foo' => '123', + 'amount' => '10.19', ]; $this->transactionDetailsCommandMock->expects($this->once()) @@ -93,17 +148,27 @@ public function testCommandWillRefundWhenTransactionIsSettled() ->method('execute'); $this->commandPoolMock->method('get') - ->willReturnMap([ - ['get_transaction_details', $this->transactionDetailsCommandMock], - ['refund_settled', $this->commandMock] - ]); + ->willReturnMap( + [ + [ + 'get_transaction_details', + $this->transactionDetailsCommandMock + ], + [ + 'refund_settled', + $this->commandMock + ] + ] + ); $this->transactionResultMock->method('get') - ->willReturn([ - 'transaction' => [ - 'transactionStatus' => 'settledSuccessfully' + ->willReturn( + [ + 'transaction' => [ + 'transactionStatus' => 'settledSuccessfully' + ] ] - ]); + ); $buildSubject = [ 'foo' => '123' @@ -128,16 +193,23 @@ public function testCommandWillThrowExceptionWhenTransactionIsInInvalidState() ->method('execute'); $this->commandPoolMock->method('get') - ->willReturnMap([ - ['get_transaction_details', $this->transactionDetailsCommandMock], - ]); + ->willReturnMap( + [ + [ + 'get_transaction_details', + $this->transactionDetailsCommandMock + ], + ] + ); $this->transactionResultMock->method('get') - ->willReturn([ - 'transaction' => [ - 'transactionStatus' => 'somethingIsWrong' + ->willReturn( + [ + 'transaction' => [ + 'transactionStatus' => 'somethingIsWrong' + ] ] - ]); + ); $buildSubject = [ 'foo' => '123' diff --git a/app/code/Magento/AuthorizenetAcceptjs/etc/config.xml b/app/code/Magento/AuthorizenetAcceptjs/etc/config.xml index 7324421d3c14b..6fdbb98a78f8b 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/etc/config.xml +++ b/app/code/Magento/AuthorizenetAcceptjs/etc/config.xml @@ -24,6 +24,7 @@ 0 1 1 + 1 1 1 1 diff --git a/app/code/Magento/AuthorizenetAcceptjs/etc/di.xml b/app/code/Magento/AuthorizenetAcceptjs/etc/di.xml index 145bcf22fd912..1bff19e15a65f 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/etc/di.xml +++ b/app/code/Magento/AuthorizenetAcceptjs/etc/di.xml @@ -206,8 +206,7 @@ Magento\AuthorizenetAcceptjs\Gateway\Response\TransactionIdHandler - Magento\AuthorizenetAcceptjs\Gateway\Response\CloseParentTransactionHandler - Magento\AuthorizenetAcceptjs\Gateway\Response\CloseTransactionHandler + Magento\AuthorizenetAcceptjs\Gateway\Response\ClosePartialTransactionHandler diff --git a/app/code/Magento/AuthorizenetAcceptjs/i18n/en_US.csv b/app/code/Magento/AuthorizenetAcceptjs/i18n/en_US.csv index da518301652f4..3c5b677c88cc8 100644 --- a/app/code/Magento/AuthorizenetAcceptjs/i18n/en_US.csv +++ b/app/code/Magento/AuthorizenetAcceptjs/i18n/en_US.csv @@ -19,3 +19,4 @@ Authorize.net,Authorize.net "ccLast4","Last 4 Digits of Card" "There was an error while trying to process the refund.","There was an error while trying to process the refund." "This transaction cannot be refunded with its current status.","This transaction cannot be refunded with its current status." +"The transaction has not been settled, a partial refund is not yet available.","The transaction has not been settled, a partial refund is not yet available." diff --git a/app/code/Magento/AuthorizenetCardinal/README.md b/app/code/Magento/AuthorizenetCardinal/README.md index 2324f680bafc9..0bd63130471bd 100644 --- a/app/code/Magento/AuthorizenetCardinal/README.md +++ b/app/code/Magento/AuthorizenetCardinal/README.md @@ -1 +1,23 @@ -The AuthorizenetCardinal module provides a possibility to enable 3-D Secure 2.0 support for AuthorizenetAcceptjs payment integration. \ No newline at end of file +# Magento_AuthorizenetCardinal module + +Use the Magento_AuthorizenetCardinal module to enable 3D Secure 2.0 support for AuthorizenetAcceptjs payment integrations. + +## Structure + +`Gateway/` - the directory that contains payment gateway command interfaces and service classes. + +For information about typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html#module-file-structure). + +## Extensibility + +Extension developers can interact with the Magento_AuthorizenetCardinal module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AuthorizenetCardinal module. + +### Events + +This module observes the following events: + +- `payment_method_assign_data_authorizenet_acceptjs` event in the `Magento\AuthorizenetCardinal\Observer\DataAssignObserver` file. + +For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). diff --git a/app/code/Magento/AuthorizenetGraphQl/Model/AuthorizenetDataProvider.php b/app/code/Magento/AuthorizenetGraphQl/Model/AuthorizenetDataProvider.php index 207d21994308f..704f0af85da06 100644 --- a/app/code/Magento/AuthorizenetGraphQl/Model/AuthorizenetDataProvider.php +++ b/app/code/Magento/AuthorizenetGraphQl/Model/AuthorizenetDataProvider.php @@ -9,6 +9,7 @@ use Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface; use Magento\Framework\Stdlib\ArrayManager; +use Magento\Framework\GraphQl\Exception\GraphQlInputException; /** * SetPaymentMethod additional data provider model for Authorizenet payment method @@ -36,10 +37,32 @@ public function __construct( * * @param array $data * @return array + * @throws GraphQlInputException */ public function getData(array $data): array { - $additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data) ?? []; + if (!isset($data[self::PATH_ADDITIONAL_DATA])) { + throw new GraphQlInputException( + __('Required parameter "authorizenet_acceptjs" for "payment_method" is missing.') + ); + } + if (!isset($data[self::PATH_ADDITIONAL_DATA]['opaque_data_descriptor'])) { + throw new GraphQlInputException( + __('Required parameter "opaque_data_descriptor" for "authorizenet_acceptjs" is missing.') + ); + } + if (!isset($data[self::PATH_ADDITIONAL_DATA]['opaque_data_value'])) { + throw new GraphQlInputException( + __('Required parameter "opaque_data_value" for "authorizenet_acceptjs" is missing.') + ); + } + if (!isset($data[self::PATH_ADDITIONAL_DATA]['cc_last_4'])) { + throw new GraphQlInputException( + __('Required parameter "cc_last_4" for "authorizenet_acceptjs" is missing.') + ); + } + + $additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $data); foreach ($additionalData as $key => $value) { $additionalData[$this->convertSnakeCaseToCamelCase($key)] = $value; unset($additionalData[$key]); diff --git a/app/code/Magento/AuthorizenetGraphQl/README.md b/app/code/Magento/AuthorizenetGraphQl/README.md index 8b920e569341f..2af2b6a1024af 100644 --- a/app/code/Magento/AuthorizenetGraphQl/README.md +++ b/app/code/Magento/AuthorizenetGraphQl/README.md @@ -1,3 +1,9 @@ -# AuthorizenetGraphQl +# Magento_AuthorizenetGraphQl module - **AuthorizenetGraphQl** defines the data types needed to pass payment information data from the client to Magento. +The Magento_AuthorizenetGraphQl module defines the data types needed to pass payment information data from the client to Magento. + +## Extensibility + +Extension developers can interact with the Magento_AuthorizenetGraphQl module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_AuthorizenetGraphQl module. diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php index dfbf60e1524ff..fee756b5d66be 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Store.php @@ -3,6 +3,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +declare(strict_types=1); + namespace Magento\Backend\Block\System\Store\Edit\Form; /** @@ -129,6 +132,7 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form) 'label' => __('Sort Order'), 'value' => $storeModel->getSortOrder(), 'required' => false, + 'class' => 'validate-number validate-zero-or-greater', 'disabled' => $storeModel->isReadOnly() ] ); diff --git a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php index ec4e2cd8b444c..545620d99c4c5 100644 --- a/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php +++ b/app/code/Magento/Backend/Block/System/Store/Edit/Form/Website.php @@ -3,6 +3,9 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ + +declare(strict_types=1); + namespace Magento\Backend\Block\System\Store\Edit\Form; /** @@ -85,6 +88,7 @@ protected function _prepareStoreFieldset(\Magento\Framework\Data\Form $form) 'label' => __('Sort Order'), 'value' => $websiteModel->getSortOrder(), 'required' => false, + 'class' => 'validate-number validate-zero-or-greater', 'disabled' => $websiteModel->isReadOnly() ] ); 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 8e0fce2b16cc9..28200323a3aec 100644 --- a/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php +++ b/app/code/Magento/Backend/Block/Widget/Grid/Massaction/Extended.php @@ -3,9 +3,11 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - namespace Magento\Backend\Block\Widget\Grid\Massaction; +use Magento\Framework\Data\Collection\AbstractDb; +use Magento\Framework\DB\Select; + /** * Grid widget massaction block * @@ -13,7 +15,7 @@ * @deprecated 100.2.0 in favour of UI component implementation * @method \Magento\Quote\Model\Quote setHideFormElement(boolean $value) Hide Form element to prevent IE errors * @method boolean getHideFormElement() - * @author Magento Core Team + * @author Magento Core Team * @TODO MAGETWO-31510: Remove deprecated class * @since 100.0.2 */ @@ -156,7 +158,7 @@ public function getItemsJson() */ public function getCount() { - return sizeof($this->_items); + return count($this->_items); } /** @@ -248,6 +250,8 @@ public function getApplyButtonHtml() } /** + * Get mass action javascript code + * * @return string */ public function getJavaScript() @@ -264,6 +268,8 @@ public function getJavaScript() } /** + * Get grid ids in JSON format + * * @return string */ public function getGridIdsJson() @@ -281,15 +287,24 @@ public function getGridIdsJson() $massActionIdField = $this->getParentBlock()->getMassactionIdField(); } - $gridIds = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField); - - if (!empty($gridIds)) { - return join(",", $gridIds); + if ($allIdsCollection instanceof AbstractDb) { + $idsSelect = clone $allIdsCollection->getSelect(); + $idsSelect->reset(Select::ORDER); + $idsSelect->reset(Select::LIMIT_COUNT); + $idsSelect->reset(Select::LIMIT_OFFSET); + $idsSelect->reset(Select::COLUMNS); + $idsSelect->columns($massActionIdField); + $idList = $allIdsCollection->getConnection()->fetchCol($idsSelect); + } else { + $idList = $allIdsCollection->setPageSize(0)->getColumnValues($massActionIdField); } - return ''; + + return implode(',', $idList); } /** + * Retrieve massaction block js object name + * * @return string */ public function getHtmlId() diff --git a/app/code/Magento/Backend/README.md b/app/code/Magento/Backend/README.md index 03c7d86516b92..205051809328a 100644 --- a/app/code/Magento/Backend/README.md +++ b/app/code/Magento/Backend/README.md @@ -1,3 +1,112 @@ -The Backend module contains common infrastructure and assets for other modules to be defined and used in their -administration user interface (UI). It does not contain anything specific to other modules. Among many things it -handles the logic of authenticating and authorizing users. +# Magento_Backend module + +The Magento_Backend module contains common infrastructure and assets for other modules to be defined and used in their +administration user interface (UI). + +The Magento_Backend module does not contain anything specific to other modules. Among many things it handles the logic of authenticating and authorizing users. + +## Installation details + +Before disabling or uninstalling this module, note that the following modules depends on this module: + +- Magento_Analytics +- Magento_Authorization +- Magento_NewRelicReporting +- Magento_ProductVideo +- Magento_ReleaseNotification +- Magento_Search +- Magento_Security +- Magento_Signifyd +- Magento_Swatches +- Magento_Ui +- Magento_User +- Magento_Webapi + +For information about module installation in Magento 2, see [Enable or disable modules](https://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html). + +## Structure + +Beyond the [usual module file structure](https://devdocs.magento.com/guides/v2.3/architecture/archi_perspectives/components/modules/mod_intro.html) the module contains a directory `Service/V1`. + +`Service/V1` - contains logic to provide a list of modules installed in Magento. + +For information about typical file structure of a module in Magento 2, see [Module file structure](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/build/module-file-structure.html#module-file-structure). + +## Extensibility + +Extension developers can interact with the Magento_Backend module. For more information about the Magento extension mechanism, see [Magento plug-ins](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/plugins.html). + +[The Magento dependency injection mechanism](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/depend-inj.html) enables you to override the functionality of the Magento_Backend module. + +### Events + +The module dispatches the following events: + + - `adminhtml_block_html_before` event in the `\Magento\Backend\Block\Template::_toHtml()` method. Parameters: + - `block` is the backend block template (this) (`\Magento\Backend\Block\Template` class). + - `adminhtml_store_edit_form_prepare_form` event in the `\Magento\Backend\Block\System\Store\Edit\AbstractForm::_prepareForm()` method. Parameters: + - `block` is the AbstractForm block (this) (`\Magento\Backend\Block\System\Store\Edit\AbstractForm` class). + - `backend_block_widget_grid_prepare_grid_before` event in the `\Magento\Backend\Block\Widget\Grid::_prepareGrid()` method. Parameters: + - `grid` is the widget grid block (this) (`\Magento\Backend\Block\Widget\Grid` class) + - `collection` is the grid collection (`\Magento\Framework\Data\Collection` class). + - `adminhtml_cache_flush_system` event in the `\Magento\Backend\Console\Command\CacheCleanCommand::performAction()` method. + - `adminhtml_cache_flush_all` event in the `\Magento\Backend\Console\Command\CacheFlushCommand::performAction()` method. + - `clean_catalog_images_cache_after` event in the `\Magento\Backend\Controller\Adminhtml\Cache\CleanImages::execute()` method. + - `clean_media_cache_after` event in the `\Magento\Backend\Controller\Adminhtml\Cache\CleanMedia::execute()` method. + - `clean_static_files_cache_after` event in the `\Magento\Backend\Controller\Adminhtml\Cache\CleanStaticFiles::execute()` method. + - `adminhtml_cache_flush_all` event in the `\Magento\Backend\Controller\Adminhtml\Cache\FlushAll::execute()` method. + - `adminhtml_cache_flush_system` event in the `\Magento\Backend\Controller\Adminhtml\Cache\FlushSystem::execute()` method. + - `theme_save_after` event in the `\Magento\Backend\Controller\Adminhtml\System\Design\Save::execute()` method. + - `backend_auth_user_login_success` event in the `\Magento\Backend\Model\Auth::login()` method. Parameters: + - `user` is the credential storage object (`null | \Magento\Backend\Model\Auth\Credential\StorageInterface`) + - `backend_auth_user_login_failed` event in the `\Magento\Backend\Model\Auth::login()` method. Parameters: + - `user_name` is username extracted from the credential storage object (`null | \Magento\Backend\Model\Auth\Credential\StorageInterface`) + - `exception` any exception generated (`\Magento\Framework\Exception\LocalizedException | \Magento\Framework\Exception\Plugin\AuthenticationException`) + +For information about an event in Magento 2, see [Events and observers](https://devdocs.magento.com/guides/v2.3/extension-dev-guide/events-and-observers.html#events). + +### Layouts + +This module introduces the following layouts and layout handles in the `view/adminhtml/layout` directory: + +- `admin_login` +- `adminhtml_auth_login` +- `adminhtml_cache_block` +- `adminhtml_cache_index` +- `adminhtml_dashboard_customersmost` +- `adminhtml_dashboard_customersnewest` +- `adminhtml_dashboard_index` +- `adminhtml_dashboard_productsviewed` +- `adminhtml_denied` +- `adminhtml_noroute` +- `adminhtml_system_account_index` +- `adminhtml_system_design_edit` +- `adminhtml_system_design_grid` +- `adminhtml_system_design_grid_block` +- `adminhtml_system_design_index` +- `adminhtml_system_store_deletestore` +- `adminhtml_system_store_editstore` +- `adminhtml_system_store_grid_block` +- `adminhtml_system_store_index` +- `default` +- `editor` +- `empty` +- `formkey` +- `overlay_popup` +- `popup` + + +For more information about layouts in Magento 2, see the [Layout documentation](https://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). + +### UI components + +You can extend Magento_Backend module using the following configuration files: + +- `view/adminhtml/ui_component/design_config_form.xml` +- `view/adminhtml/ui_component/design_config_listing.xml` + +For information about UI components in Magento 2, see [Overview of UI components](https://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). + +## Additional information + +For information about significant changes in patch releases, see [2.3.x Release information](https://devdocs.magento.com/guides/v2.3/release-notes/bk-release-notes.html). diff --git a/app/code/Magento/Backend/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index e4dfcac46ea67..343ecc0ee3d58 100644 --- a/app/code/Magento/Backend/etc/adminhtml/system.xml +++ b/app/code/Magento/Backend/etc/adminhtml/system.xml @@ -23,7 +23,7 @@
advanced - Magento_Backend::advanced + Magento_Config::advanced Magento\Config\Block\System\Config\Form\Fieldset\Modules\DisableOutput @@ -145,7 +145,9 @@ Magento\Config\Model\Config\Source\Yesno - Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk. + + Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.]]> + @@ -435,7 +437,7 @@ Please enter at least 60 and at most 31536000 (one year). Magento\Backend\Model\Config\SessionLifetime\BackendModel - validate-digits + validate-digits validate-digits-range digits-range-60-31536000 diff --git a/app/code/Magento/Backend/i18n/en_US.csv b/app/code/Magento/Backend/i18n/en_US.csv index bfedd56b14313..51fe8bfe542a2 100644 --- a/app/code/Magento/Backend/i18n/en_US.csv +++ b/app/code/Magento/Backend/i18n/en_US.csv @@ -258,7 +258,7 @@ Minute,Minute "To use this website you must first enable JavaScript in your browser.","To use this website you must first enable JavaScript in your browser." "This is only a demo store. You can browse and place orders, but nothing will be processed.","This is only a demo store. You can browse and place orders, but nothing will be processed." "Report an Issue","Report an Issue" -"Store View:","Store View:" +"Scope:","Scope:" "Stores Configuration","Stores Configuration" "Please confirm scope switching. All data that hasn't been saved will be lost.","Please confirm scope switching. All data that hasn't been saved will be lost." "Additional Cache Management","Additional Cache Management" @@ -333,7 +333,7 @@ Debug,Debug "Add Block Names to Hints","Add Block Names to Hints" "Template Settings","Template Settings" "Allow Symlinks","Allow Symlinks" -"Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.","Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk." +"Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk.","Warning! Enabling this feature is not recommended on production environments because it represents a potential security risk." "Minify Html","Minify Html" "Minification is not applied in developer mode.","Minification is not applied in developer mode." "Translate Inline","Translate Inline" diff --git a/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml index be309423c48d2..3cc2594a75801 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/admin/access_denied.phtml @@ -21,10 +21,10 @@
  • escapeHtml(__('Return to ')) ?> - + escapeHtml(__('previous page')) ?>escapeHtml(__('.')) ?> - + escapeHtml(__('previous page')) ?>escapeHtml(__('.')) ?> diff --git a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml index da18bc183759b..df9323a7276df 100644 --- a/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml +++ b/app/code/Magento/Backend/view/adminhtml/templates/store/switcher.phtml @@ -9,7 +9,7 @@ getWebsites()) : ?>
    - escapeHtml(__('Store View:')) ?> + escapeHtml(__('Scope:')) ?>