diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000000000..37cfad78c270b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 4 +indent_style = space +insert_final_newline = true +trim_trailing_whitespace = true + +[*.md] +trim_trailing_whitespace = false 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/AdminNotification/README.md b/app/code/Magento/AdminNotification/README.md index a60ae33ff2d86..c22fef1bca97d 100644 --- a/app/code/Magento/AdminNotification/README.md +++ b/app/code/Magento/AdminNotification/README.md @@ -4,15 +4,25 @@ The Magento_AdminNotification module provides the ability to alert administrator ## Installation details +The Magento_AdminNotification module creates the following tables in the database: +- `adminnotification_inbox` +- `admin_system_messages` + Before disabling or uninstalling this module, note that the Magento_Indexer module depends on this module. -For information about module installation in Magento 2, see [Enable or disable modules](http://devdocs.magento.com/guides/v2.3/install-gde/install/cli/install-cli-subcommands-enable.html). +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_AdminNotification 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_AdminNotification module. ### Events This module observes the following events: - - `controller_action_predispatch` event in `Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver` + - `controller_action_predispatch` event in `Magento\AdminNotification\Observer\PredispatchAdminActionControllerObserver` file. ### Layouts @@ -21,10 +31,10 @@ This module introduces the following layouts and layout handles in the `view/adm - `adminhtml_notification_index` - `adminhtml_notification_block` -For more information about layouts in Magento 2, see the [Layout documentation](http://devdocs.magento.com/guides/v2.3/frontend-dev-guide/layouts/layout-overview.html). +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 admin notifications using the `view/adminhtml/ui_component/notification_area.xml` configuration file. -For information about UI components in Magento 2, see [Overview of UI components](http://devdocs.magento.com/guides/v2.3/ui_comp_guide/bk-ui_comps.html). +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/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/README.md b/app/code/Magento/AdvancedPricingImportExport/README.md index 581a3a91c8a1a..8f33781932f9e 100644 --- a/app/code/Magento/AdvancedPricingImportExport/README.md +++ b/app/code/Magento/AdvancedPricingImportExport/README.md @@ -1 +1,9 @@ -The Magento_AdvancedPricingImportExport module handles the import and export of the advanced pricing. \ No newline at end of file +# Magento_AdvancedPricingImportExport module + +The Magento_AdvancedPricingImportExport module handles the import and export of the advanced pricing. + +## Extensibility + +Extension developers can interact with the Magento_AdvancedPricingImportExport 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_AdvancedPricingImportExport module. \ No newline at end of file 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/Amqp/README.md b/app/code/Magento/Amqp/README.md index a21624031d619..3613421aacbdc 100644 --- a/app/code/Magento/Amqp/README.md +++ b/app/code/Magento/Amqp/README.md @@ -1,3 +1,9 @@ -# Amqp +# Magento_Amqp module -**Amqp** provides functionality to publish/consume messages with Amqp. +Magento_Amqp module provides functionality to publish/consume messages with the Advanced Message Queuing Protocol (AMQP). + +## Extensibility + +Extension developers can interact with the Magento_Amqp 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_Amqp module. \ 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/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/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/etc/adminhtml/system.xml b/app/code/Magento/Backend/etc/adminhtml/system.xml index c762dbf58de62..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 @@ -536,7 +538,7 @@ Magento\Config\Model\Config\Source\Yesno Magento\Config\Model\Config\Backend\Secure - HTTP Strict Transport Security page for details.]]> + HTTP Strict Transport Security page for details.]]> 1 1 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:')) ?>