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

MC-38993: Magento\Authorization\Model\ResourceModel\Rules missing update method #30947

Merged
merged 3 commits into from
Nov 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions app/code/Magento/Authorization/Model/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,30 @@
class Rules extends \Magento\Framework\Model\AbstractModel
{
/**
* Class constructor
*
* @param \Magento\Framework\Model\Context $context
* @param \Magento\Framework\Registry $registry
* @param \Magento\Authorization\Model\ResourceModel\Rules $resource
* @param \Magento\Authorization\Model\ResourceModel\Rules\Collection $resourceCollection
* @param array $data
*/
public function __construct(
\Magento\Framework\Model\Context $context,
\Magento\Framework\Registry $registry,
\Magento\Authorization\Model\ResourceModel\Rules $resource,
\Magento\Authorization\Model\ResourceModel\Rules\Collection $resourceCollection,
array $data = []
) {
parent::__construct($context, $registry, $resource, $resourceCollection, $data);
}

/**
* Class constructor
*
* @return void
* @inheritdoc
*/
protected function _construct()
{
$this->_init(\Magento\Authorization\Model\ResourceModel\Rules::class);
}

/**
* Obsolete method of update
*
* @return $this
* @deprecated Method was never implemented and used.
*/
public function update()
{
$this->getResource()->update($this);
// phpcs:disable Magento2.Functions.DiscouragedFunction
trigger_error('Method was never implemented and used.', E_USER_DEPRECATED);

return $this;
}

/**
* Save authorization rule relation
*
* @return $this
*/
public function saveRel()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2569,4 +2569,5 @@
'Magento\Framework\MessageQueue\ConsumerInterface'
],
['isOrderIncrementIdUsed', 'Magento\Quote\Model\ResourceModel\Quote', 'Magento\Sales\Model\OrderIncrementIdChecker::isIncrementIdUsed'],
['update', 'Magento\Authorization\Model\Rules', 'Magento\Authorization\Model\Rules::update'],
];