From 0b243b899f2c94a9eab18bf8faeb2b87b120f272 Mon Sep 17 00:00:00 2001 From: Anton Evers Date: Tue, 21 Feb 2017 12:53:24 +0100 Subject: [PATCH 1/2] Make Magento compatible with composer ~1.3.0 --- app/code/Magento/Captcha/etc/di.xml | 2 +- app/code/Magento/Catalog/etc/di.xml | 18 ++++++++--------- app/code/Magento/Catalog/etc/frontend/di.xml | 2 +- .../Magento/CatalogImportExport/etc/di.xml | 12 +++++------ app/code/Magento/CatalogInventory/etc/di.xml | 8 ++++---- .../etc/frontend/di.xml | 2 +- .../CatalogSearch/etc/adminhtml/di.xml | 4 ++-- app/code/Magento/CatalogSearch/etc/di.xml | 12 +++++------ app/code/Magento/Customer/etc/frontend/di.xml | 2 +- app/code/Magento/Developer/etc/di.xml | 2 +- app/code/Magento/Downloadable/etc/di.xml | 16 +++++++-------- .../GoogleOptimizer/etc/adminhtml/di.xml | 2 +- app/code/Magento/GroupedProduct/etc/di.xml | 2 +- app/code/Magento/Paypal/etc/di.xml | 2 +- app/code/Magento/Quote/etc/di.xml | 20 +++++++++---------- app/code/Magento/Sales/etc/di.xml | 20 +++++++++---------- app/code/Magento/Sales/etc/frontend/di.xml | 4 ++-- app/code/Magento/SalesRule/etc/di.xml | 2 +- app/code/Magento/Shipping/etc/di.xml | 2 +- app/code/Magento/Store/etc/adminhtml/di.xml | 2 +- app/code/Magento/Store/etc/di.xml | 2 +- app/code/Magento/Store/etc/frontend/di.xml | 2 +- .../Magento/Swatches/etc/adminhtml/di.xml | 2 +- app/code/Magento/Tax/etc/di.xml | 4 ++-- app/code/Magento/Vault/etc/di.xml | 2 +- app/code/Magento/WebapiSecurity/etc/di.xml | 2 +- app/code/Magento/Wishlist/etc/di.xml | 6 +++--- app/etc/di.xml | 4 ++-- dev/tests/functional/etc/di.xml | 6 +++--- .../app/Magento/Catalog/Test/etc/curl/di.xml | 10 +++++----- .../app/Magento/Catalog/Test/etc/ui/di.xml | 2 +- .../Magento/Catalog/Test/etc/webapi/di.xml | 6 +++--- .../Magento/CatalogRule/Test/etc/curl/di.xml | 2 +- .../Magento/CatalogRule/Test/etc/ui/di.xml | 2 +- .../CatalogSearch/Test/etc/curl/di.xml | 2 +- .../CheckoutAgreements/Test/etc/curl/di.xml | 2 +- .../app/Magento/Cms/Test/etc/curl/di.xml | 4 ++-- .../app/Magento/Config/Test/etc/curl/di.xml | 2 +- .../ConfigurableProduct/Test/etc/curl/di.xml | 2 +- .../Test/etc/webapi/di.xml | 2 +- .../CurrencySymbol/Test/etc/curl/di.xml | 2 +- .../app/Magento/Customer/Test/etc/curl/di.xml | 4 ++-- .../Magento/Customer/Test/etc/webapi/di.xml | 2 +- .../Magento/Directory/Test/etc/curl/di.xml | 2 +- .../Magento/Downloadable/Test/etc/curl/di.xml | 2 +- .../Downloadable/Test/etc/webapi/di.xml | 2 +- .../GroupedProduct/Test/etc/curl/di.xml | 2 +- .../GroupedProduct/Test/etc/webapi/di.xml | 2 +- .../Magento/Integration/Test/etc/curl/di.xml | 2 +- .../Magento/Newsletter/Test/etc/curl/di.xml | 2 +- .../app/Magento/Review/Test/etc/curl/di.xml | 4 ++-- .../app/Magento/Sales/Test/etc/curl/di.xml | 4 ++-- .../app/Magento/Sales/Test/etc/webapi/di.xml | 2 +- .../Magento/SalesRule/Test/etc/curl/di.xml | 2 +- .../Magento/SalesRule/Test/etc/webapi/di.xml | 2 +- .../app/Magento/Search/Test/etc/curl/di.xml | 2 +- .../app/Magento/Sitemap/Test/etc/curl/di.xml | 2 +- .../app/Magento/Store/Test/etc/curl/di.xml | 6 +++--- .../app/Magento/Swatches/Test/etc/curl/di.xml | 2 +- .../app/Magento/Tax/Test/etc/curl/di.xml | 6 +++--- .../app/Magento/Tax/Test/etc/webapi/di.xml | 6 +++--- .../Magento/UrlRewrite/Test/etc/curl/di.xml | 2 +- .../app/Magento/User/Test/etc/curl/di.xml | 4 ++-- .../app/Magento/Variable/Test/etc/curl/di.xml | 2 +- .../app/Magento/Widget/Test/etc/curl/di.xml | 2 +- 65 files changed, 136 insertions(+), 136 deletions(-) diff --git a/app/code/Magento/Captcha/etc/di.xml b/app/code/Magento/Captcha/etc/di.xml index db624420ba647..fcc77615259f8 100644 --- a/app/code/Magento/Captcha/etc/di.xml +++ b/app/code/Magento/Captcha/etc/di.xml @@ -38,6 +38,6 @@ - + diff --git a/app/code/Magento/Catalog/etc/di.xml b/app/code/Magento/Catalog/etc/di.xml index 8ce6b1785171c..ac73dc4a238ec 100644 --- a/app/code/Magento/Catalog/etc/di.xml +++ b/app/code/Magento/Catalog/etc/di.xml @@ -397,7 +397,7 @@ - + @@ -474,23 +474,23 @@ - + - + - + - + - - + + - + @@ -843,7 +843,7 @@ Magento\Catalog\Model\Api\SearchCriteria\ProductCollectionProcessor - + Magento\Eav\Model\Api\SearchCriteria\CollectionProcessor diff --git a/app/code/Magento/Catalog/etc/frontend/di.xml b/app/code/Magento/Catalog/etc/frontend/di.xml index ca1e1e244f49c..cda438d5abaa5 100644 --- a/app/code/Magento/Catalog/etc/frontend/di.xml +++ b/app/code/Magento/Catalog/etc/frontend/di.xml @@ -57,7 +57,7 @@ - + diff --git a/app/code/Magento/CatalogImportExport/etc/di.xml b/app/code/Magento/CatalogImportExport/etc/di.xml index dca2159fbdc66..d50eb018c4441 100644 --- a/app/code/Magento/CatalogImportExport/etc/di.xml +++ b/app/code/Magento/CatalogImportExport/etc/di.xml @@ -8,12 +8,12 @@ - - - - - - + + + + + + diff --git a/app/code/Magento/CatalogInventory/etc/di.xml b/app/code/Magento/CatalogInventory/etc/di.xml index 54f2e4dccf3d4..c207c60afa0bd 100644 --- a/app/code/Magento/CatalogInventory/etc/di.xml +++ b/app/code/Magento/CatalogInventory/etc/di.xml @@ -30,8 +30,8 @@ - - + + @@ -58,7 +58,7 @@ - + @@ -69,7 +69,7 @@ - + diff --git a/app/code/Magento/CatalogInventoryConfigurableProduct/etc/frontend/di.xml b/app/code/Magento/CatalogInventoryConfigurableProduct/etc/frontend/di.xml index 06bbd6671db6c..e80efb0c7550f 100644 --- a/app/code/Magento/CatalogInventoryConfigurableProduct/etc/frontend/di.xml +++ b/app/code/Magento/CatalogInventoryConfigurableProduct/etc/frontend/di.xml @@ -7,6 +7,6 @@ --> - + diff --git a/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml b/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml index 1f87e8de6eb65..16c6ab47396f1 100644 --- a/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml +++ b/app/code/Magento/CatalogSearch/etc/adminhtml/di.xml @@ -16,7 +16,7 @@ Magento\CatalogSearch\Model\Session\Storage - - + + diff --git a/app/code/Magento/CatalogSearch/etc/di.xml b/app/code/Magento/CatalogSearch/etc/di.xml index 47c4152e92a1f..827ea88e941e4 100644 --- a/app/code/Magento/CatalogSearch/etc/di.xml +++ b/app/code/Magento/CatalogSearch/etc/di.xml @@ -12,7 +12,7 @@ - + Magento\CatalogSearch\Model\ResourceModel\EngineInterface::CONFIG_ENGINE_PATH @@ -69,7 +69,7 @@ - + @@ -256,22 +256,22 @@ - + \Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy - + \Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy - + \Magento\CatalogSearch\Model\Indexer\Scope\ScopeProxy - + \Magento\CatalogSearch\Model\Indexer\Scope\TemporaryResolver diff --git a/app/code/Magento/Customer/etc/frontend/di.xml b/app/code/Magento/Customer/etc/frontend/di.xml index 4562acb00fe5b..f01621ffaaa30 100644 --- a/app/code/Magento/Customer/etc/frontend/di.xml +++ b/app/code/Magento/Customer/etc/frontend/di.xml @@ -55,7 +55,7 @@ - + diff --git a/app/code/Magento/Developer/etc/di.xml b/app/code/Magento/Developer/etc/di.xml index c0eaf8cfdd40c..3859358ee84c3 100644 --- a/app/code/Magento/Developer/etc/di.xml +++ b/app/code/Magento/Developer/etc/di.xml @@ -16,7 +16,7 @@ Magento\Developer\Model\View\Page\Config\RendererFactory - + Magento\Developer\Model\XmlCatalog\Format\PhpStorm diff --git a/app/code/Magento/Downloadable/etc/di.xml b/app/code/Magento/Downloadable/etc/di.xml index 6b5627ead2ec8..3f2958b8240b1 100644 --- a/app/code/Magento/Downloadable/etc/di.xml +++ b/app/code/Magento/Downloadable/etc/di.xml @@ -77,14 +77,14 @@ - - - - - - - - + + + + + + + + diff --git a/app/code/Magento/GoogleOptimizer/etc/adminhtml/di.xml b/app/code/Magento/GoogleOptimizer/etc/adminhtml/di.xml index abb3dee422258..6823eedfde5e4 100644 --- a/app/code/Magento/GoogleOptimizer/etc/adminhtml/di.xml +++ b/app/code/Magento/GoogleOptimizer/etc/adminhtml/di.xml @@ -30,7 +30,7 @@ - + diff --git a/app/code/Magento/GroupedProduct/etc/di.xml b/app/code/Magento/GroupedProduct/etc/di.xml index 788052d07fca5..cd21c08dda022 100644 --- a/app/code/Magento/GroupedProduct/etc/di.xml +++ b/app/code/Magento/GroupedProduct/etc/di.xml @@ -77,7 +77,7 @@ - + diff --git a/app/code/Magento/Paypal/etc/di.xml b/app/code/Magento/Paypal/etc/di.xml index 22a6d88f9e52c..c14a6d2ee15c7 100644 --- a/app/code/Magento/Paypal/etc/di.xml +++ b/app/code/Magento/Paypal/etc/di.xml @@ -56,7 +56,7 @@ - + Magento\Paypal\Model\Config::METHOD_WPP_EXPRESS diff --git a/app/code/Magento/Quote/etc/di.xml b/app/code/Magento/Quote/etc/di.xml index 352408c0bb000..19340d4f3e72d 100644 --- a/app/code/Magento/Quote/etc/di.xml +++ b/app/code/Magento/Quote/etc/di.xml @@ -17,16 +17,16 @@ - - + + - - - - - - + + + + + + @@ -37,9 +37,9 @@ - + - + diff --git a/app/code/Magento/Sales/etc/di.xml b/app/code/Magento/Sales/etc/di.xml index 88e72e2b8a374..93d10192f2656 100644 --- a/app/code/Magento/Sales/etc/di.xml +++ b/app/code/Magento/Sales/etc/di.xml @@ -167,34 +167,34 @@ - + - + - + - + - + - + - + - + - + - + diff --git a/app/code/Magento/Sales/etc/frontend/di.xml b/app/code/Magento/Sales/etc/frontend/di.xml index a01b6f759eb6a..c04c2b056995d 100644 --- a/app/code/Magento/Sales/etc/frontend/di.xml +++ b/app/code/Magento/Sales/etc/frontend/di.xml @@ -6,8 +6,8 @@ */ --> - - + + diff --git a/app/code/Magento/SalesRule/etc/di.xml b/app/code/Magento/SalesRule/etc/di.xml index 5a47ea5de8e12..7a03b95ed038b 100644 --- a/app/code/Magento/SalesRule/etc/di.xml +++ b/app/code/Magento/SalesRule/etc/di.xml @@ -147,7 +147,7 @@ - + sales_rule_form diff --git a/app/code/Magento/Shipping/etc/di.xml b/app/code/Magento/Shipping/etc/di.xml index 2e4cccd9edb68..ed532856d3971 100644 --- a/app/code/Magento/Shipping/etc/di.xml +++ b/app/code/Magento/Shipping/etc/di.xml @@ -8,7 +8,7 @@ - + diff --git a/app/code/Magento/Store/etc/adminhtml/di.xml b/app/code/Magento/Store/etc/adminhtml/di.xml index 1ee5db69e2e65..6a5dcdc596ccd 100644 --- a/app/code/Magento/Store/etc/adminhtml/di.xml +++ b/app/code/Magento/Store/etc/adminhtml/di.xml @@ -7,6 +7,6 @@ --> - + diff --git a/app/code/Magento/Store/etc/di.xml b/app/code/Magento/Store/etc/di.xml index 2b59ef8059f48..63dba866c7c60 100644 --- a/app/code/Magento/Store/etc/di.xml +++ b/app/code/Magento/Store/etc/di.xml @@ -55,7 +55,7 @@ - + diff --git a/app/code/Magento/Store/etc/frontend/di.xml b/app/code/Magento/Store/etc/frontend/di.xml index 3e3ee0f1c5cf8..5c73f28003ea4 100644 --- a/app/code/Magento/Store/etc/frontend/di.xml +++ b/app/code/Magento/Store/etc/frontend/di.xml @@ -9,7 +9,7 @@ - + diff --git a/app/code/Magento/Swatches/etc/adminhtml/di.xml b/app/code/Magento/Swatches/etc/adminhtml/di.xml index 052ad187dd197..9f9d5fc639d4a 100644 --- a/app/code/Magento/Swatches/etc/adminhtml/di.xml +++ b/app/code/Magento/Swatches/etc/adminhtml/di.xml @@ -24,7 +24,7 @@ Magento\Swatches\Model\AttributesList - + diff --git a/app/code/Magento/Tax/etc/di.xml b/app/code/Magento/Tax/etc/di.xml index 336ef019f7c8c..79a52d4af8abe 100644 --- a/app/code/Magento/Tax/etc/di.xml +++ b/app/code/Magento/Tax/etc/di.xml @@ -43,7 +43,7 @@ - + @@ -54,7 +54,7 @@ - + diff --git a/app/code/Magento/Vault/etc/di.xml b/app/code/Magento/Vault/etc/di.xml index 55a8913a826f5..843fd1881c31e 100644 --- a/app/code/Magento/Vault/etc/di.xml +++ b/app/code/Magento/Vault/etc/di.xml @@ -16,7 +16,7 @@ - + diff --git a/app/code/Magento/WebapiSecurity/etc/di.xml b/app/code/Magento/WebapiSecurity/etc/di.xml index 22c06dfdf71d8..dac273726ba2b 100644 --- a/app/code/Magento/WebapiSecurity/etc/di.xml +++ b/app/code/Magento/WebapiSecurity/etc/di.xml @@ -9,7 +9,7 @@ - + diff --git a/app/code/Magento/Wishlist/etc/di.xml b/app/code/Magento/Wishlist/etc/di.xml index 9bde30017bff4..18ef17ccfd2f8 100644 --- a/app/code/Magento/Wishlist/etc/di.xml +++ b/app/code/Magento/Wishlist/etc/di.xml @@ -6,8 +6,8 @@ */ --> - - + + Magento\Wishlist\Model\ResourceModel\Item @@ -19,7 +19,7 @@ - + diff --git a/app/etc/di.xml b/app/etc/di.xml index ac08fe64fc34b..135cf79eab1fc 100755 --- a/app/etc/di.xml +++ b/app/etc/di.xml @@ -32,7 +32,7 @@ - + @@ -84,7 +84,7 @@ - + diff --git a/dev/tests/functional/etc/di.xml b/dev/tests/functional/etc/di.xml index 575471d34f5ff..9af1fd3ee8ba6 100644 --- a/dev/tests/functional/etc/di.xml +++ b/dev/tests/functional/etc/di.xml @@ -7,10 +7,10 @@ --> - - + + - + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml index a851fd9ac555d..db075817704b5 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/curl/di.xml @@ -6,9 +6,9 @@ */ --> - - - - - + + + + + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml index fc2422885a5e7..4195bde3e0012 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/ui/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/webapi/di.xml index b813b4609a355..974e16c0f2bb7 100644 --- a/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/Catalog/Test/etc/webapi/di.xml @@ -6,7 +6,7 @@ */ --> - - - + + + diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/curl/di.xml index 58ee003b6ca98..a03a809d64a0c 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/ui/di.xml b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/ui/di.xml index 9005bb379050b..f1768eaca37f6 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/ui/di.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogRule/Test/etc/ui/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/curl/di.xml index 0dd9699f2213f..18d0fb7f51deb 100644 --- a/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/CatalogSearch/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml index ab79933b2ef68..846d2d772ab48 100644 --- a/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/CheckoutAgreements/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Cms/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Cms/Test/etc/curl/di.xml index aaad503c15e35..3bcab876e36ba 100644 --- a/dev/tests/functional/tests/app/Magento/Cms/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Cms/Test/etc/curl/di.xml @@ -6,6 +6,6 @@ */ --> - - + + diff --git a/dev/tests/functional/tests/app/Magento/Config/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Config/Test/etc/curl/di.xml index 7ac2eb9207104..c828976bd3607 100644 --- a/dev/tests/functional/tests/app/Magento/Config/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Config/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/curl/di.xml index 7d9ace9356045..9823c758e50dd 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/webapi/di.xml index ea6f1a1f34267..03985aeb979fe 100644 --- a/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/ConfigurableProduct/Test/etc/webapi/di.xml @@ -7,5 +7,5 @@ --> - + diff --git a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/etc/curl/di.xml index 03a8e7afeacdf..73038da252ce1 100644 --- a/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/CurrencySymbol/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/curl/di.xml index 11a39b1657849..632fd141139cc 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/curl/di.xml @@ -6,6 +6,6 @@ */ --> - - + + diff --git a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/webapi/di.xml index c1fe8ee97d890..54ad78541d632 100644 --- a/dev/tests/functional/tests/app/Magento/Customer/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/Customer/Test/etc/webapi/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Directory/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Directory/Test/etc/curl/di.xml index 8b593fab84fbb..cc029a2f76beb 100644 --- a/dev/tests/functional/tests/app/Magento/Directory/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Directory/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/curl/di.xml index dc2fd01c3abb5..18cd7fbe35e52 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/webapi/di.xml index 71ed14b86809b..449b6fcd42f60 100644 --- a/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/Downloadable/Test/etc/webapi/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/curl/di.xml index b6b694aa0ccc0..cfa654c1141ba 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/webapi/di.xml index 6289fede742a8..3192de5965b32 100644 --- a/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/GroupedProduct/Test/etc/webapi/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Integration/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Integration/Test/etc/curl/di.xml index 74181577caf9c..66dd61428ad58 100644 --- a/dev/tests/functional/tests/app/Magento/Integration/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Integration/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Newsletter/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Newsletter/Test/etc/curl/di.xml index aa7915034d061..f50e59eba3deb 100644 --- a/dev/tests/functional/tests/app/Magento/Newsletter/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Newsletter/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Review/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Review/Test/etc/curl/di.xml index 27054035616ca..cae48135b0135 100644 --- a/dev/tests/functional/tests/app/Magento/Review/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Review/Test/etc/curl/di.xml @@ -6,6 +6,6 @@ */ --> - - + + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/etc/curl/di.xml index 88c6f43157c79..bc279996cbbeb 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/etc/curl/di.xml @@ -6,6 +6,6 @@ */ --> - - + + diff --git a/dev/tests/functional/tests/app/Magento/Sales/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/Sales/Test/etc/webapi/di.xml index a5facebde3626..6aa14eda6b96c 100644 --- a/dev/tests/functional/tests/app/Magento/Sales/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/Sales/Test/etc/webapi/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/curl/di.xml index fbe021bccb0b5..7d3861af922a2 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/webapi/di.xml index 7e6120fff7780..f56ca5776a978 100644 --- a/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/SalesRule/Test/etc/webapi/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Search/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Search/Test/etc/curl/di.xml index 3541f04fcdaf9..2beeaa93cc858 100644 --- a/dev/tests/functional/tests/app/Magento/Search/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Search/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Sitemap/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Sitemap/Test/etc/curl/di.xml index 9492912e957a5..e3641c09e3337 100644 --- a/dev/tests/functional/tests/app/Magento/Sitemap/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Sitemap/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Store/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Store/Test/etc/curl/di.xml index 6e5d977c0b7ab..0046bf0d97ea8 100644 --- a/dev/tests/functional/tests/app/Magento/Store/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Store/Test/etc/curl/di.xml @@ -6,7 +6,7 @@ */ --> - - - + + + diff --git a/dev/tests/functional/tests/app/Magento/Swatches/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Swatches/Test/etc/curl/di.xml index b0d43eb4cce2f..6d1445eea9af5 100644 --- a/dev/tests/functional/tests/app/Magento/Swatches/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Swatches/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/curl/di.xml index 59bea1aa1ae38..9150d5ed507c0 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/curl/di.xml @@ -6,7 +6,7 @@ */ --> - - - + + + diff --git a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/webapi/di.xml b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/webapi/di.xml index 722ef292a555b..6efc856601c54 100644 --- a/dev/tests/functional/tests/app/Magento/Tax/Test/etc/webapi/di.xml +++ b/dev/tests/functional/tests/app/Magento/Tax/Test/etc/webapi/di.xml @@ -6,7 +6,7 @@ */ --> - - - + + + diff --git a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/curl/di.xml index 8bb75fd6f1117..7d32527cd1867 100644 --- a/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/UrlRewrite/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml index af5319e51ff5b..f66cfaca3a138 100644 --- a/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/User/Test/etc/curl/di.xml @@ -6,6 +6,6 @@ */ --> - - + + diff --git a/dev/tests/functional/tests/app/Magento/Variable/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Variable/Test/etc/curl/di.xml index cf32b3a56cd8c..2cdecfbeef2f8 100644 --- a/dev/tests/functional/tests/app/Magento/Variable/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Variable/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + diff --git a/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml b/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml index f894f74043f49..de1d8a0669aa1 100644 --- a/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml +++ b/dev/tests/functional/tests/app/Magento/Widget/Test/etc/curl/di.xml @@ -6,5 +6,5 @@ */ --> - + From a20701207326859828664034caa632f9002d87c6 Mon Sep 17 00:00:00 2001 From: Tom Klingenberg Date: Thu, 2 Mar 2017 08:20:35 +0100 Subject: [PATCH 2/2] Validate PHP class-names in di.xml files via schema The preferenceType @for/@type attributes, the typeType @name attribute, the virtualTypeType @type attribute and the pluginType @type attribute contain class-names (FQCNs) which should not start with a leading backslash (U+005C "\") and should not contain other invalid character sequences that would represent an invalid PHP class-name. Previously this was possible and these errors got unnoticed within di.xml configuration file validation. The ObjectManager - a user of these configurations - handles this common error in user input in part so far by removing any trailing slashes with multiple calls like: $type = ltrim($type, '\\'); This change has been introduced in 33ebc24 and could be classified as a workaround for a quite common mistake when specifying an FQCN that despite the varying notations in the PHP manual due to the contextual resolution rules (and different to a file-systems absolute path in POSIX) must not start with a leading separator as type or class-name. When using a string-value as class-name (e.g. class_exists() calls) the class name is always an FQCN as namespacing in PHP is contextual within source-code for identifiers only and not for strings. So relative class-names (like those with a leading backslash) do not apply for strings. This is the case in configuration files like di.xml files. The di.xml files use the urn:magento:framework:ObjectManager/etc/config.xsd schema location which is resolved by UrnResolver (6379732) to lib/internal/Magento/Framework/ObjectManager/etc/config.xsd That schema did validate class-name attribute values only against the simple type of being strings (xs:string). As a class-name in PHP is a valid string also if starting with the backslash character (and other invalid names, like digits in front), this commit extends the schema to validate against the regular expression provided by the PHP manual [1]: ^[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*$ by adding a new simple-type called "phpClassName" that qualifies the string- base-type with the from PHP manual translated pattern: [a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]* extended for namespaced class-names: ([a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)(\\[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*)* The change ensures that the said attribute values are validated and invalid class-names are recognized during schema based validation. This change verifies that configured PHP-types can be autoloaded when used w/o smudging (see the ltrim() operation). It has been documented [2] that the leading backslash prevents correct file-resolution when auto- loading with the Composer autoloader, a component actively used by the Magento application. This change adheres to existing PR #8638 and relates to issue #8635. Additionally this commit adds tests for the new phpClassName xsd type with config xml material. Refs: - #8635 - #8638 - [1] https://php.net/language.oop5.basic - [2] http://magento.stackexchange.com/a/161010 - 33ebc241ca9ceb5a59f620d79bbae29b2cadb59d - 6379732c0c4181ab8a19ba1ebe5a0a8e87d6335e --- .../Config/_files/invalidConfigXmlArray.php | 65 +++++++++++++++++++ .../Test/Unit/Config/_files/valid_config.xml | 2 +- .../Framework/ObjectManager/etc/config.xsd | 24 +++++-- 3 files changed, 85 insertions(+), 6 deletions(-) diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php index bc92c1826c52b..334effc941775 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/invalidConfigXmlArray.php @@ -172,4 +172,69 @@ "\nLine: 6\n" ], ], + 'virtualtype with empty_name' => [ + ' + + ', + [ + "Element 'virtualType', attribute 'name': [facet 'pattern'] The value '' is not accepted by the pattern '" . + "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" . + ")*'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'name': '' is not a valid value of the atomic type 'phpClassName'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'name': Warning: No precomputed value available, the value was either " . + "invalid or something strange happend." . + "\nLine: 2\n", + ], + ], + 'virtualtype with invalid_name' => [ + ' + + ', + [ + "Element 'virtualType', attribute 'name': [facet 'pattern'] The value '\\BackslashPrefix\\IsNotAllowed' " . + "is not accepted by the pattern '" . + "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" . + ")*'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'name': '\\BackslashPrefix\\IsNotAllowed' " . + "is not a valid value of the atomic type 'phpClassName'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'name': Warning: No precomputed value available, the value was either " . + "invalid or something strange happend." . + "\nLine: 2\n", + ], + ], + 'virtualtype with empty_type' => [ + ' + + ', + [ + "Element 'virtualType', attribute 'type': [facet 'pattern'] The value '' is not accepted by the pattern '" . + "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" . + ")*'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'type': '' is not a valid value of the atomic type 'phpClassName'." . + "\nLine: 2\n", + ], + ], + 'virtualtype with invalid_type' => [ + ' + + ', + [ + "Element 'virtualType', attribute 'name': [facet 'pattern'] The value '777Digits\\IsNotAllowed' " . + "is not accepted by the pattern '" . + "([a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*)(\\\\[a-zA-Z_\x7f-\xc3\xbf][a-zA-Z0-9_\x7f-\xc3\xbf]*" . + ")*'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'name': '777Digits\\IsNotAllowed' " . + "is not a valid value of the atomic type 'phpClassName'." . + "\nLine: 2\n", + "Element 'virtualType', attribute 'name': Warning: No precomputed value available, the value was either " . + "invalid or something strange happend." . + "\nLine: 2\n", + ], + ], ]; diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml index 852a3b3163339..5a4e67226e864 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Config/_files/valid_config.xml @@ -7,7 +7,7 @@ --> - + Object INIT_PARAMETER diff --git a/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd b/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd index c21070ed84d24..4754ae40c85f2 100644 --- a/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd +++ b/lib/internal/Magento/Framework/ObjectManager/etc/config.xsd @@ -26,6 +26,20 @@ + + + + A string that matches a Fully Qualified Class Name from PHP, especially not starting + with a backslash as this is an invalid character to start a class name with but a + somewhat common mistake so this simple type can be used to validate against it + already + + + + + + + @@ -102,8 +116,8 @@ Preference help Object Manager to choose class for corresponding interface - - + + @@ -121,7 +135,7 @@ - + @@ -133,14 +147,14 @@ With 'virtualType' tag you can point parameters and plugins for autogenerated class - + - +