Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove deprecated framework interfaces #32328

Open
wants to merge 9 commits into
base: 2.5-develop
Choose a base branch
from
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @api
* @since 100.0.2
*/
class Frequency implements \Magento\Framework\Option\ArrayInterface
class Frequency implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* @return array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* @api
* @since 100.0.2
*/
class Options implements \Magento\Framework\Option\ArrayInterface
class Options implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* @var \Magento\Framework\App\RequestInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* Prepares and provides options for a selector of verticals which is located
* in the corresponding configuration menu of the Admin area.
*/
class Vertical implements \Magento\Framework\Option\ArrayInterface
class Vertical implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* The list of possible verticals.
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/Block/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class Context extends \Magento\Framework\View\Element\Context
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\SessionManagerInterface $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
Expand All @@ -60,7 +59,6 @@ public function __construct(
\Magento\Framework\App\CacheInterface $cache,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Session\SessionManagerInterface $session,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\View\Asset\Repository $assetRepo,
\Magento\Framework\View\ConfigInterface $viewConfig,
Expand All @@ -82,7 +80,6 @@ public function __construct(
$cache,
$design,
$session,
$sidResolver,
$scopeConfig,
$assetRepo,
$viewConfig,
Expand Down
12 changes: 0 additions & 12 deletions app/code/Magento/Backend/Block/Media/Uploader.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

use Magento\Framework\App\ObjectManager;
use Magento\Framework\Serialize\Serializer\Json;
use Magento\Framework\Image\Adapter\UploadConfigInterface;
use Magento\Backend\Model\Image\UploadResizeConfigInterface;

/**
Expand Down Expand Up @@ -44,33 +43,22 @@ class Uploader extends \Magento\Backend\Block\Widget
*/
private $imageUploadConfig;

/**
* @var UploadConfigInterface
* @deprecated 101.0.1
* @see \Magento\Backend\Model\Image\UploadResizeConfigInterface
*/
private $imageConfig;

/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Framework\File\Size $fileSize
* @param array $data
* @param Json $jsonEncoder
* @param UploadConfigInterface $imageConfig
* @param UploadResizeConfigInterface $imageUploadConfig
*/
public function __construct(
\Magento\Backend\Block\Template\Context $context,
\Magento\Framework\File\Size $fileSize,
array $data = [],
Json $jsonEncoder = null,
UploadConfigInterface $imageConfig = null,
UploadResizeConfigInterface $imageUploadConfig = null
) {
$this->_fileSizeService = $fileSize;
$this->jsonEncoder = $jsonEncoder ?: ObjectManager::getInstance()->get(Json::class);
$this->imageConfig = $imageConfig
?: ObjectManager::getInstance()->get(UploadConfigInterface::class);
$this->imageUploadConfig = $imageUploadConfig
?: ObjectManager::getInstance()->get(UploadResizeConfigInterface::class);
parent::__construct($context, $data);
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/Block/Template/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ class Context extends \Magento\Framework\View\Element\Template\Context
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\Generic $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
Expand Down Expand Up @@ -99,7 +98,6 @@ public function __construct(
\Magento\Framework\App\CacheInterface $cache,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Session\Generic $session,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\View\Asset\Repository $assetRepo,
\Magento\Framework\View\ConfigInterface $viewConfig,
Expand Down Expand Up @@ -137,7 +135,6 @@ public function __construct(
$cache,
$design,
$session,
$sidResolver,
$scopeConfig,
$assetRepo,
$viewConfig,
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/Block/Widget/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ class Context extends \Magento\Backend\Block\Template\Context
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\Generic $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
Expand Down Expand Up @@ -84,7 +83,6 @@ public function __construct(
\Magento\Framework\App\CacheInterface $cache,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Session\Generic $session,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\View\Asset\Repository $assetRepo,
\Magento\Framework\View\ConfigInterface $viewConfig,
Expand Down Expand Up @@ -119,7 +117,6 @@ public function __construct(
$cache,
$design,
$session,
$sidResolver,
$scopeConfig,
$assetRepo,
$viewConfig,
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/Model/Auth/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ class Session extends \Magento\Framework\Session\SessionManager implements \Mage

/**
* @param \Magento\Framework\App\Request\Http $request
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\Session\Config\ConfigInterface $sessionConfig
* @param \Magento\Framework\Session\SaveHandlerInterface $saveHandler
* @param \Magento\Framework\Session\ValidatorInterface $validator
Expand All @@ -84,7 +83,6 @@ class Session extends \Magento\Framework\Session\SessionManager implements \Mage
*/
public function __construct(
\Magento\Framework\App\Request\Http $request,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\Session\Config\ConfigInterface $sessionConfig,
\Magento\Framework\Session\SaveHandlerInterface $saveHandler,
\Magento\Framework\Session\ValidatorInterface $validator,
Expand All @@ -103,7 +101,6 @@ public function __construct(
$this->messageManager = $messageManager ?? ObjectManager::getInstance()->get(ManagerInterface::class);
parent::__construct(
$request,
$sidResolver,
$sessionConfig,
$saveHandler,
$validator,
Expand Down
5 changes: 1 addition & 4 deletions app/code/Magento/Backend/Model/Session/Quote.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ class Quote extends \Magento\Framework\Session\SessionManager

/**
* @param \Magento\Framework\App\Request\Http $request
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\Session\Config\ConfigInterface $sessionConfig
* @param \Magento\Framework\Session\SaveHandlerInterface $saveHandler
* @param \Magento\Framework\Session\ValidatorInterface $validator
Expand All @@ -102,7 +101,6 @@ class Quote extends \Magento\Framework\Session\SessionManager
*/
public function __construct(
\Magento\Framework\App\Request\Http $request,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\Session\Config\ConfigInterface $sessionConfig,
\Magento\Framework\Session\SaveHandlerInterface $saveHandler,
\Magento\Framework\Session\ValidatorInterface $validator,
Expand All @@ -125,7 +123,6 @@ public function __construct(
$this->quoteFactory = $quoteFactory;
parent::__construct(
$request,
$sidResolver,
$sessionConfig,
$saveHandler,
$validator,
Expand Down Expand Up @@ -154,7 +151,7 @@ public function getQuote()
$this->_quote->setCustomerGroupId($customerGroupId);
$this->_quote->setIsActive(false);
$this->_quote->setStoreId($this->getStoreId());

$this->quoteRepository->save($this->_quote);
$this->setQuoteId($this->_quote->getId());
$this->_quote = $this->quoteRepository->get($this->getQuoteId(), [$this->getStoreId()]);
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Backend/Model/Url.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ class Url extends \Magento\Framework\Url implements \Magento\Backend\Model\UrlIn
* @param \Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo
* @param \Magento\Framework\Url\ScopeResolverInterface $scopeResolver
* @param \Magento\Framework\Session\Generic $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\Url\RouteParamsResolverFactory $routeParamsResolverFactory
* @param \Magento\Framework\Url\QueryParamsResolverInterface $queryParamsResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
Expand All @@ -114,7 +113,6 @@ public function __construct(
\Magento\Framework\Url\SecurityInfoInterface $urlSecurityInfo,
\Magento\Framework\Url\ScopeResolverInterface $scopeResolver,
\Magento\Framework\Session\Generic $session,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\Url\RouteParamsResolverFactory $routeParamsResolverFactory,
\Magento\Framework\Url\QueryParamsResolverInterface $queryParamsResolver,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
Expand All @@ -139,7 +137,6 @@ public function __construct(
$urlSecurityInfo,
$scopeResolver,
$session,
$sidResolver,
$routeParamsResolverFactory,
$queryParamsResolver,
$scopeConfig,
Expand Down
13 changes: 0 additions & 13 deletions app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Magento\Framework\App\State;
use Magento\Framework\Session\Config\ConfigInterface;
use Magento\Framework\Session\SaveHandlerInterface;
use Magento\Framework\Session\SidResolverInterface;
use Magento\Framework\Session\Storage;
use Magento\Framework\Session\StorageInterface;
use Magento\Framework\Session\ValidatorInterface;
Expand Down Expand Up @@ -83,11 +82,6 @@ class QuoteTest extends TestCase
*/
protected $sessionConfigMock;

/**
* @var SidResolverInterface|MockObject
*/
protected $sidResolverMock;

/**
* @var Http|MockObject
*/
Expand Down Expand Up @@ -163,12 +157,6 @@ protected function setUp(): void
$this->quoteRepositoryMock = $this->getMockForAbstractClass(CartRepositoryInterface::class);

$this->requestMock = $this->createMock(Http::class);
$this->sidResolverMock = $this->getMockForAbstractClass(
SidResolverInterface::class,
[],
'',
false
);
$this->sessionConfigMock = $this->getMockForAbstractClass(
ConfigInterface::class,
[],
Expand Down Expand Up @@ -208,7 +196,6 @@ protected function setUp(): void
->setConstructorArgs(
[
'request' => $this->requestMock,
'sidResolver' => $this->sidResolverMock,
'sessionConfig' => $this->sessionConfigMock,
'saveHandler' => $this->saveHandlerMock,
'validator' => $this->validatorMock,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backup/Model/Config/Source/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* @api
* @since 100.0.2
*/
class Type implements \Magento\Framework\Option\ArrayInterface
class Type implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* Backup data
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Backup/Model/Grid/Options.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
* @api
* @since 100.0.2
*/
class Options implements \Magento\Framework\Option\ArrayInterface
class Options implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* @var \Magento\Backup\Helper\Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @api
* @since 100.0.2
*/
class Type implements \Magento\Framework\Option\ArrayInterface
class Type implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* @return array
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Bundle/Model/Source/Option/Type.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*
*/
class Type extends \Magento\Framework\Model\AbstractExtensibleModel implements
\Magento\Framework\Option\ArrayInterface,
\Magento\Framework\Data\OptionSourceInterface,
\Magento\Bundle\Api\Data\OptionTypeInterface
{
/**#@+
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Captcha/Model/Config/Font.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
namespace Magento\Captcha\Model\Config;

class Font implements \Magento\Framework\Option\ArrayInterface
class Font implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* Captcha data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

use Magento\Framework\App\Config\Value;

abstract class AbstractForm extends Value implements \Magento\Framework\Option\ArrayInterface
abstract class AbstractForm extends Value implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* @var string
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Captcha/Model/Config/Mode.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
*/
namespace Magento\Captcha\Model\Config;

class Mode implements \Magento\Framework\Option\ArrayInterface
class Mode implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* Get options for captcha mode selection field
Expand Down
4 changes: 0 additions & 4 deletions app/code/Magento/Catalog/Block/Product/Context.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ class Context extends \Magento\Framework\View\Element\Template\Context
* @param \Magento\Framework\UrlInterface $urlBuilder
* @param \Magento\Framework\App\CacheInterface $cache
* @param \Magento\Framework\View\DesignInterface $design
* @param \Magento\Framework\Session\SessionManagerInterface $session
* @param \Magento\Framework\Session\SidResolverInterface $sidResolver
* @param \Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig
* @param \Magento\Framework\View\Asset\Repository $assetRepo
* @param \Magento\Framework\View\ConfigInterface $viewConfig
Expand Down Expand Up @@ -138,7 +136,6 @@ public function __construct(
\Magento\Framework\App\CacheInterface $cache,
\Magento\Framework\View\DesignInterface $design,
\Magento\Framework\Session\SessionManagerInterface $session,
\Magento\Framework\Session\SidResolverInterface $sidResolver,
\Magento\Framework\App\Config\ScopeConfigInterface $scopeConfig,
\Magento\Framework\View\Asset\Repository $assetRepo,
\Magento\Framework\View\ConfigInterface $viewConfig,
Expand Down Expand Up @@ -190,7 +187,6 @@ public function __construct(
$cache,
$design,
$session,
$sidResolver,
$scopeConfig,
$assetRepo,
$viewConfig,
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/Config/Source/Category.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @SuppressWarnings(PHPMD.LongVariable)
*/
class Category implements \Magento\Framework\Option\ArrayInterface
class Category implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* Category collection factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class GridPerPage implements \Magento\Framework\Option\ArrayInterface
class GridPerPage implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* Options
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
/**
* Returns layout list for Web>Default Layouts>Default Product Layout/Default Category Layout
*/
class LayoutList implements \Magento\Framework\Option\ArrayInterface
class LayoutList implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* @var array
Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Catalog/Model/Config/Source/ListMode.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
namespace Magento\Catalog\Model\Config\Source;

class ListMode implements \Magento\Framework\Option\ArrayInterface
class ListMode implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* {@inheritdoc}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*
* @author Magento Core Team <core@magentocommerce.com>
*/
class ListPerPage implements \Magento\Framework\Option\ArrayInterface
class ListPerPage implements \Magento\Framework\Data\OptionSourceInterface
{
/**
* Pager Options
Expand Down
Loading