Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,20 @@ public function getSearchableAttributes($backendType = null)
/** @var \Magento\Eav\Model\Entity\Attribute[] $attributes */
$attributes = $productAttributes->getItems();

/**
* @deprecated Event argument catelogsearch_searchable_attributes_load_after.
* @see catalogsearch_searchable_attributes_load_after instead.
*/
$this->eventManager->dispatch(
'catelogsearch_searchable_attributes_load_after',
['engine' => $this->engine, 'attributes' => $attributes]
);

$this->eventManager->dispatch(
'catalogsearch_searchable_attributes_load_after',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As event cannot be removed, add a comment near old one that it is deprecated and add one more event dispatching, with corrected name.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@orlangur Thankyou for review. I have added add a comment near old one that it is deprecated and add one more event dispatching, with corrected name.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the change, old event must still be dispatched.

Also, do not specify version near deprecation tag, it is done automatically when needed.

['engine' => $this->engine, 'attributes' => $attributes]
);

$entity = $this->eavConfig->getEntityType(\Magento\Catalog\Model\Product::ENTITY)->getEntity();

foreach ($attributes as $attribute) {
Expand Down