From 0db9f8c77a2a0432ff908f6189096a43d189e398 Mon Sep 17 00:00:00 2001 From: KinLok Date: Mon, 20 Mar 2017 19:51:57 +0100 Subject: [PATCH 1/4] Remove dependencies --- app/code/Magento/Catalog/Model/Product.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Catalog/Model/Product.php b/app/code/Magento/Catalog/Model/Product.php index ab2f666d30f4c..683ea9b42a101 100644 --- a/app/code/Magento/Catalog/Model/Product.php +++ b/app/code/Magento/Catalog/Model/Product.php @@ -14,7 +14,6 @@ use Magento\Framework\Pricing\SaleableInterface; use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryInterface; use Magento\Catalog\Model\Product\Attribute\Backend\Media\EntryConverterPool; -use Magento\Catalog\Api\Data\ProductAttributeMediaGalleryEntryExtensionFactory; /** * Catalog product model From a7bf9ca6dc43a45df9e1d14ab8009ae8d5ad13e5 Mon Sep 17 00:00:00 2001 From: KinLok Date: Mon, 20 Mar 2017 19:54:05 +0100 Subject: [PATCH 2/4] Remove dependency --- app/code/Magento/Quote/Model/Quote.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/code/Magento/Quote/Model/Quote.php b/app/code/Magento/Quote/Model/Quote.php index c467309a2d2c9..e2041752f956f 100644 --- a/app/code/Magento/Quote/Model/Quote.php +++ b/app/code/Magento/Quote/Model/Quote.php @@ -10,7 +10,6 @@ use Magento\Framework\Model\AbstractExtensibleModel; use Magento\Quote\Api\Data\PaymentInterface; use Magento\Quote\Model\Quote\Address; -use Magento\Sales\Model\ResourceModel; use Magento\Sales\Model\Status; use Magento\Framework\Api\AttributeValueFactory; use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface; From 7df4d17dae028fa1d44d43780ebae7aa2c35d766 Mon Sep 17 00:00:00 2001 From: KinLok Date: Mon, 20 Mar 2017 21:57:23 +0100 Subject: [PATCH 3/4] Remove more unused dependencies --- .../Magento/Braintree/Gateway/Response/CardDetailsHandler.php | 1 - .../Ui/DataProvider/Product/Form/Modifier/BundlePanel.php | 1 - app/code/Magento/Checkout/Model/Type/Onepage.php | 1 - .../Controller/Adminhtml/Product/Attribute/CreateOptions.php | 1 - app/code/Magento/Payment/Model/Method/AbstractMethod.php | 1 - app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php | 1 - app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php | 1 - app/code/Magento/Ui/Component/Control/SplitButton.php | 2 -- app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php | 1 - lib/internal/Magento/Framework/Config/Theme.php | 2 -- 10 files changed, 12 deletions(-) diff --git a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php index c7c8e408a9384..326568fce35b8 100644 --- a/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php +++ b/app/code/Magento/Braintree/Gateway/Response/CardDetailsHandler.php @@ -5,7 +5,6 @@ */ namespace Magento\Braintree\Gateway\Response; -use \Braintree\Transaction; use Magento\Braintree\Gateway\Config\Config; use Magento\Payment\Gateway\Helper\ContextHelper; use Magento\Sales\Api\Data\OrderPaymentInterface; diff --git a/app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php b/app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php index 95534bd114b49..49931150441ec 100644 --- a/app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php +++ b/app/code/Magento/Bundle/Ui/DataProvider/Product/Form/Modifier/BundlePanel.php @@ -11,7 +11,6 @@ use Magento\Bundle\Model\Product\Attribute\Source\Shipment\Type as ShipmentType; use Magento\Framework\Stdlib\ArrayManager; use Magento\Ui\Component\Container; -use Magento\Ui\Component\DynamicRows; use Magento\Ui\Component\Form; use Magento\Ui\Component\Modal; use Magento\Catalog\Api\Data\ProductAttributeInterface; diff --git a/app/code/Magento/Checkout/Model/Type/Onepage.php b/app/code/Magento/Checkout/Model/Type/Onepage.php index e07a16f8c1ba0..416e3a9997ade 100644 --- a/app/code/Magento/Checkout/Model/Type/Onepage.php +++ b/app/code/Magento/Checkout/Model/Type/Onepage.php @@ -6,7 +6,6 @@ namespace Magento\Checkout\Model\Type; use Magento\Customer\Api\AccountManagementInterface; -use Magento\Customer\Api\AddressMetadataInterface as AddressMetadata; use Magento\Customer\Api\AddressRepositoryInterface; use Magento\Customer\Api\CustomerRepositoryInterface; use Magento\Customer\Api\Data\CustomerInterfaceFactory as CustomerDataFactory; diff --git a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Attribute/CreateOptions.php b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Attribute/CreateOptions.php index 1fbb262f3f645..d94369429452b 100644 --- a/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Attribute/CreateOptions.php +++ b/app/code/Magento/ConfigurableProduct/Controller/Adminhtml/Product/Attribute/CreateOptions.php @@ -7,7 +7,6 @@ namespace Magento\ConfigurableProduct\Controller\Adminhtml\Product\Attribute; use Magento\Backend\App\Action; -use Magento\Catalog\Controller\Adminhtml\Product; use Magento\Catalog\Model\ResourceModel\Eav\AttributeFactory; class CreateOptions extends Action diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 5a879c868b69b..36fea0d0ee4ac 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -13,7 +13,6 @@ use Magento\Payment\Model\MethodInterface; use Magento\Payment\Observer\AbstractDataAssignObserver; use Magento\Sales\Model\Order\Invoice; -use Magento\Sales\Model\Order\Payment; use Magento\Quote\Api\Data\PaymentMethodInterface; /** diff --git a/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php b/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php index 9da95269ca418..7d88385cfc605 100644 --- a/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php +++ b/app/code/Magento/Sales/Model/ResourceModel/AbstractGrid.php @@ -5,7 +5,6 @@ */ namespace Magento\Sales\Model\ResourceModel; -use Magento\Framework\App\ResourceConnection as AppResource; use Magento\Framework\DB\Adapter\AdapterInterface; use Magento\Framework\Model\ResourceModel\Db\AbstractDb; diff --git a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php index fe82efe889515..4732cca64eec7 100644 --- a/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php +++ b/app/code/Magento/Sales/Test/Unit/Model/OrderRepositoryTest.php @@ -10,7 +10,6 @@ use Magento\Sales\Model\OrderRepository; use Magento\Sales\Model\ResourceModel\Metadata; use Magento\Sales\Api\Data\OrderSearchResultInterfaceFactory as SearchResultFactory; -use Magento\Framework\Api\SortOrder; /** * Class OrderRepositoryTest diff --git a/app/code/Magento/Ui/Component/Control/SplitButton.php b/app/code/Magento/Ui/Component/Control/SplitButton.php index e07eb6a5f4fff..82b46eee9c59a 100644 --- a/app/code/Magento/Ui/Component/Control/SplitButton.php +++ b/app/code/Magento/Ui/Component/Control/SplitButton.php @@ -5,8 +5,6 @@ */ namespace Magento\Ui\Component\Control; -use Magento\Framework\View\Element\Template; - /** * Class SplitButton * diff --git a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php index 037055e4bf24f..9f56185005b8f 100644 --- a/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php +++ b/app/code/Magento/Webapi/Model/Rest/Swagger/Generator.php @@ -17,7 +17,6 @@ use Magento\Framework\Exception\AuthorizationException; use Magento\Framework\Exception\LocalizedException; use Magento\Framework\Exception\NoSuchEntityException; -use Magento\Framework\Phrase; use Magento\Framework\App\ProductMetadataInterface; use \Magento\Framework\Api\SimpleDataObjectConverter; diff --git a/lib/internal/Magento/Framework/Config/Theme.php b/lib/internal/Magento/Framework/Config/Theme.php index 1ab2271735e42..96b3f1b2f47a3 100644 --- a/lib/internal/Magento/Framework/Config/Theme.php +++ b/lib/internal/Magento/Framework/Config/Theme.php @@ -9,8 +9,6 @@ */ namespace Magento\Framework\Config; -use Magento\Framework\Config\Composer\Package; - class Theme { /** From 3fc476be306d8d2b1ff0ec379dcd33b708946180 Mon Sep 17 00:00:00 2001 From: Kin Lok Date: Tue, 21 Mar 2017 01:01:32 +0100 Subject: [PATCH 4/4] Return dependency. --- app/code/Magento/Payment/Model/Method/AbstractMethod.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/code/Magento/Payment/Model/Method/AbstractMethod.php b/app/code/Magento/Payment/Model/Method/AbstractMethod.php index 36fea0d0ee4ac..5a879c868b69b 100644 --- a/app/code/Magento/Payment/Model/Method/AbstractMethod.php +++ b/app/code/Magento/Payment/Model/Method/AbstractMethod.php @@ -13,6 +13,7 @@ use Magento\Payment\Model\MethodInterface; use Magento\Payment\Observer\AbstractDataAssignObserver; use Magento\Sales\Model\Order\Invoice; +use Magento\Sales\Model\Order\Payment; use Magento\Quote\Api\Data\PaymentMethodInterface; /**