From 8638da6670bce0722cc43cdc1b5e66e8faaa4883 Mon Sep 17 00:00:00 2001 From: Medvediev Date: Wed, 10 Feb 2021 11:28:42 +0200 Subject: [PATCH 1/5] Mark UrlRewriteGraphQl, User, Vault, Webapi, Widget and Wishlist interfaces as API --- .../Model/Resolver/UrlRewrite/CustomUrlLocatorInterface.php | 2 ++ .../Magento/User/Model/Spi/NotificationExceptionInterface.php | 2 ++ app/code/Magento/User/Model/Spi/NotificatorInterface.php | 2 ++ app/code/Magento/Vault/Block/Customer/IconInterface.php | 2 ++ .../Webapi/Controller/Rest/RequestProcessorInterface.php | 2 ++ app/code/Magento/Widget/Block/BlockInterface.php | 1 + app/code/Magento/Wishlist/Controller/IndexInterface.php | 1 + .../Magento/Wishlist/Controller/WishlistProviderInterface.php | 1 + .../Magento/Wishlist/Model/AuthenticationStateInterface.php | 1 + .../ResourceModel/Item/Product/CollectionBuilderInterface.php | 2 ++ .../Wishlist/BuyRequest/BuyRequestDataProviderInterface.php | 2 ++ 11 files changed, 18 insertions(+) diff --git a/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/UrlRewrite/CustomUrlLocatorInterface.php b/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/UrlRewrite/CustomUrlLocatorInterface.php index df0c0ee96c16c..0a6c02e561670 100644 --- a/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/UrlRewrite/CustomUrlLocatorInterface.php +++ b/app/code/Magento/UrlRewriteGraphQl/Model/Resolver/UrlRewrite/CustomUrlLocatorInterface.php @@ -11,6 +11,8 @@ * Interface for resolution of custom URLs. * * It can be used, for example, to resolve '\' URL path to a 'Home' page. + * + * @api */ interface CustomUrlLocatorInterface { diff --git a/app/code/Magento/User/Model/Spi/NotificationExceptionInterface.php b/app/code/Magento/User/Model/Spi/NotificationExceptionInterface.php index 47af7cbe6dd50..722a9585952c5 100644 --- a/app/code/Magento/User/Model/Spi/NotificationExceptionInterface.php +++ b/app/code/Magento/User/Model/Spi/NotificationExceptionInterface.php @@ -10,6 +10,8 @@ /** * When a notification cannot be sent. + * + * @api */ interface NotificationExceptionInterface extends \Throwable { diff --git a/app/code/Magento/User/Model/Spi/NotificatorInterface.php b/app/code/Magento/User/Model/Spi/NotificatorInterface.php index f5e8ee68e7eed..1277a4ca7084c 100644 --- a/app/code/Magento/User/Model/Spi/NotificatorInterface.php +++ b/app/code/Magento/User/Model/Spi/NotificatorInterface.php @@ -12,6 +12,8 @@ /** * Use to send out notifications about user related events. + * + * @api */ interface NotificatorInterface { diff --git a/app/code/Magento/Vault/Block/Customer/IconInterface.php b/app/code/Magento/Vault/Block/Customer/IconInterface.php index d4bcb4e55f71c..7625995a36601 100644 --- a/app/code/Magento/Vault/Block/Customer/IconInterface.php +++ b/app/code/Magento/Vault/Block/Customer/IconInterface.php @@ -7,6 +7,8 @@ /** * Interface IconInterface + * + * @api */ interface IconInterface { diff --git a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php index f4340c18e2134..5e021ecdc02dd 100644 --- a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php +++ b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php @@ -9,6 +9,8 @@ /** * Request processor interface + * + * @api */ interface RequestProcessorInterface { diff --git a/app/code/Magento/Widget/Block/BlockInterface.php b/app/code/Magento/Widget/Block/BlockInterface.php index 4f795d949b8cd..eff9a0b26b528 100644 --- a/app/code/Magento/Widget/Block/BlockInterface.php +++ b/app/code/Magento/Widget/Block/BlockInterface.php @@ -14,6 +14,7 @@ /** * Interface \Magento\Widget\Block\BlockInterface * + * @api */ interface BlockInterface { diff --git a/app/code/Magento/Wishlist/Controller/IndexInterface.php b/app/code/Magento/Wishlist/Controller/IndexInterface.php index 8954996ab1173..1e2bcb66a7830 100644 --- a/app/code/Magento/Wishlist/Controller/IndexInterface.php +++ b/app/code/Magento/Wishlist/Controller/IndexInterface.php @@ -11,6 +11,7 @@ /** * Interface \Magento\Wishlist\Controller\IndexInterface * + * @api */ interface IndexInterface extends \Magento\Framework\App\ActionInterface, ViewInterface { diff --git a/app/code/Magento/Wishlist/Controller/WishlistProviderInterface.php b/app/code/Magento/Wishlist/Controller/WishlistProviderInterface.php index 0b74c0a01a36d..08f16471a117b 100644 --- a/app/code/Magento/Wishlist/Controller/WishlistProviderInterface.php +++ b/app/code/Magento/Wishlist/Controller/WishlistProviderInterface.php @@ -9,6 +9,7 @@ /** * Interface \Magento\Wishlist\Controller\WishlistProviderInterface * + * @api */ interface WishlistProviderInterface { diff --git a/app/code/Magento/Wishlist/Model/AuthenticationStateInterface.php b/app/code/Magento/Wishlist/Model/AuthenticationStateInterface.php index 2c93097d1c3e1..5c7e9c808ff0f 100644 --- a/app/code/Magento/Wishlist/Model/AuthenticationStateInterface.php +++ b/app/code/Magento/Wishlist/Model/AuthenticationStateInterface.php @@ -9,6 +9,7 @@ /** * Interface \Magento\Wishlist\Model\AuthenticationStateInterface * + * @api */ interface AuthenticationStateInterface { diff --git a/app/code/Magento/Wishlist/Model/ResourceModel/Item/Product/CollectionBuilderInterface.php b/app/code/Magento/Wishlist/Model/ResourceModel/Item/Product/CollectionBuilderInterface.php index 1984d92e08a60..570afaeb6a002 100644 --- a/app/code/Magento/Wishlist/Model/ResourceModel/Item/Product/CollectionBuilderInterface.php +++ b/app/code/Magento/Wishlist/Model/ResourceModel/Item/Product/CollectionBuilderInterface.php @@ -12,6 +12,8 @@ /** * Wishlist items products collection builder + * + * @api */ interface CollectionBuilderInterface { diff --git a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php index fac45d7f86c7c..63c2afc19dd3d 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php +++ b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php @@ -11,6 +11,8 @@ /** * Build buy request for adding products to wishlist + * + * @api */ interface BuyRequestDataProviderInterface { From e23053fab55ef7b8484ba4adcb164df4d5b2fbe0 Mon Sep 17 00:00:00 2001 From: "taras.gamanov" Date: Thu, 18 Feb 2021 16:31:18 +0200 Subject: [PATCH 2/5] Rollback interfaces with non api dependencies (static test fix). --- .../Webapi/Controller/Rest/RequestProcessorInterface.php | 2 -- .../Wishlist/BuyRequest/BuyRequestDataProviderInterface.php | 2 -- 2 files changed, 4 deletions(-) diff --git a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php index 5e021ecdc02dd..f4340c18e2134 100644 --- a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php +++ b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php @@ -9,8 +9,6 @@ /** * Request processor interface - * - * @api */ interface RequestProcessorInterface { diff --git a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php index 63c2afc19dd3d..fac45d7f86c7c 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php +++ b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php @@ -11,8 +11,6 @@ /** * Build buy request for adding products to wishlist - * - * @api */ interface BuyRequestDataProviderInterface { From 960a54e39b265bd0803f08983332d14107cdeee7 Mon Sep 17 00:00:00 2001 From: "taras.gamanov" Date: Mon, 22 Feb 2021 16:17:23 +0200 Subject: [PATCH 3/5] Restore reverted changes --- .../Webapi/Controller/Rest/RequestProcessorInterface.php | 2 ++ .../Wishlist/BuyRequest/BuyRequestDataProviderInterface.php | 2 ++ 2 files changed, 4 insertions(+) diff --git a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php index f4340c18e2134..5bc9fcfad64fe 100644 --- a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php +++ b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php @@ -9,6 +9,8 @@ /** * Request processor interface + * * + * @api */ interface RequestProcessorInterface { diff --git a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php index fac45d7f86c7c..eb4523c6e9fc6 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php +++ b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php @@ -11,6 +11,8 @@ /** * Build buy request for adding products to wishlist + * * + * @api */ interface BuyRequestDataProviderInterface { From 58d2159b4210726fcb2fa545ba06f6ddfebeb70e Mon Sep 17 00:00:00 2001 From: "taras.gamanov" Date: Wed, 24 Feb 2021 11:52:05 +0200 Subject: [PATCH 4/5] Static test has been fixed --- .../Webapi/Controller/Rest/RequestProcessorInterface.php | 2 +- .../BuyRequest/BuyRequestDataProviderInterface.php | 2 +- .../Magento/Wishlist/Model/Wishlist/Data/WishlistItem.php | 2 ++ lib/internal/Magento/Framework/Webapi/Rest/Request.php | 7 +++++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php index 5bc9fcfad64fe..5e021ecdc02dd 100644 --- a/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php +++ b/app/code/Magento/Webapi/Controller/Rest/RequestProcessorInterface.php @@ -9,7 +9,7 @@ /** * Request processor interface - * * + * * @api */ interface RequestProcessorInterface diff --git a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php index eb4523c6e9fc6..63c2afc19dd3d 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php +++ b/app/code/Magento/Wishlist/Model/Wishlist/BuyRequest/BuyRequestDataProviderInterface.php @@ -11,7 +11,7 @@ /** * Build buy request for adding products to wishlist - * * + * * @api */ interface BuyRequestDataProviderInterface diff --git a/app/code/Magento/Wishlist/Model/Wishlist/Data/WishlistItem.php b/app/code/Magento/Wishlist/Model/Wishlist/Data/WishlistItem.php index 236b7f1eee72d..d5c974c733225 100644 --- a/app/code/Magento/Wishlist/Model/Wishlist/Data/WishlistItem.php +++ b/app/code/Magento/Wishlist/Model/Wishlist/Data/WishlistItem.php @@ -9,6 +9,8 @@ /** * DTO represents Wishlist Item data + * + * @api */ class WishlistItem { diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request.php b/lib/internal/Magento/Framework/Webapi/Rest/Request.php index 78ed1b663c7ff..ed3a6ea28c67c 100644 --- a/lib/internal/Magento/Framework/Webapi/Rest/Request.php +++ b/lib/internal/Magento/Framework/Webapi/Rest/Request.php @@ -11,6 +11,13 @@ use Magento\Framework\Api\SimpleDataObjectConverter; use Magento\Framework\Phrase; +/** + * Class Request + * + * @api + * + * @package Magento\Framework\Webapi\Rest + */ class Request extends \Magento\Framework\Webapi\Request { /**#@+ From ed18e1e1fe34e4f57bb7abcf0e09ee7777e8b0ac Mon Sep 17 00:00:00 2001 From: "taras.gamanov" Date: Thu, 25 Feb 2021 09:57:46 +0200 Subject: [PATCH 5/5] refactoring --- lib/internal/Magento/Framework/Webapi/Rest/Request.php | 2 -- 1 file changed, 2 deletions(-) diff --git a/lib/internal/Magento/Framework/Webapi/Rest/Request.php b/lib/internal/Magento/Framework/Webapi/Rest/Request.php index ed3a6ea28c67c..9b2313b593eea 100644 --- a/lib/internal/Magento/Framework/Webapi/Rest/Request.php +++ b/lib/internal/Magento/Framework/Webapi/Rest/Request.php @@ -15,8 +15,6 @@ * Class Request * * @api - * - * @package Magento\Framework\Webapi\Rest */ class Request extends \Magento\Framework\Webapi\Request {