Skip to content

Add Event Prefix And Object To The Catalog Product Option Value Collection #26401

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

Merged
merged 1 commit into from
Nov 9, 2020
Merged

Add Event Prefix And Object To The Catalog Product Option Value Collection #26401

merged 1 commit into from
Nov 9, 2020

Conversation

sprankhub
Copy link
Member

@sprankhub sprankhub commented Jan 15, 2020

Description (*)

This pull request adds an event prefix and event object to the catalog product option value collection, so that it can be customized in a better way.

Fixed Issues (if relevant)

n/a

Manual testing scenarios (*)

  1. Try to customize the collection loading of \Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection.
  2. Currently, one can only use the generic events like core_collection_abstract_load_before.
  3. With this pull request, one can also use specific events like catalog_product_option_value_collection_load_before.

Questions or comments

Would it make sense to check more relevant Magento core models / collections and add event prefixes / objects there as well?

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

Resolved issues:

  1. resolves [Issue] Add Event Prefix And Object To The Catalog Product Option Value Collection #29621: Add Event Prefix And Object To The Catalog Product Option Value Collection

@sprankhub sprankhub requested a review from akaplya as a code owner January 15, 2020 13:57
@m2-assistant
Copy link

m2-assistant bot commented Jan 15, 2020

Hi @sprankhub. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@sprankhub
Copy link
Member Author

@akaplya could you have a look here? Thanks :-)

@sidolov
Copy link
Contributor

sidolov commented Aug 17, 2020

@magento create issue

@sidolov sidolov added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Aug 17, 2020
@sidolov
Copy link
Contributor

sidolov commented Sep 14, 2020

Risk: high since someone can observe core_collection_abstract_load_before event and expect app/code/Magento/Catalog/Model/ResourceModel/Product/Option/Value/Collection but after the fix the event mmname will be changed.

@sidolov sidolov added this to the 2.5 milestone Sep 14, 2020
@sprankhub
Copy link
Member Author

I do not see high risk here, @sidolov. After the change, two events will be dispatched: core_collection_abstract_load_before (same as currently!) plus the new catalog_product_option_value_collection_load_before. So we solely add a new event here.

@sidolov sidolov removed this from the 2.5 milestone Sep 15, 2020
@sidolov
Copy link
Contributor

sidolov commented Sep 15, 2020

@sprankhub thank you for the clarification! I have changed the risk label!

@magento-engcom-team
Copy link
Contributor

Hi @sidolov, thank you for the review.
ENGCOM-8295 has been created to process this Pull Request
✳️ @sidolov, could you please add one of the following labels to the Pull Request?

Label Description
Auto-Tests: Covered All changes in Pull Request is covered by auto-tests
Auto-Tests: Not Covered Changes in Pull Request requires coverage by auto-tests
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests

@engcom-Bravo engcom-Bravo self-assigned this Oct 2, 2020
@engcom-Bravo engcom-Bravo added the Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it label Oct 2, 2020
@engcom-Bravo
Copy link
Contributor

Dev experience is required for testing this PR. Please note that Manual testing has not been performed.

@engcom-Bravo engcom-Bravo removed their assignment Oct 2, 2020
@engcom-Charlie engcom-Charlie self-assigned this Oct 5, 2020
@engcom-Charlie
Copy link
Contributor

✔️ QA Passed
Before:
here is no dispatch specially event for loading Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection.
Only general core_collection_abstract_load_before was dispatched.

After
here is dispatch general core_collection_abstract_load_before and catalog_product_option_value_collection event for load before(+ _load_before) and after (+ _load_after) for Magento\Catalog\Model\ResourceModel\Product\Option\Value\Collection.

@engcom-Charlie engcom-Charlie added the QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) label Oct 6, 2020
@engcom-Alfa engcom-Alfa self-assigned this Oct 6, 2020
@engcom-Alfa
Copy link
Contributor

Hi @sidolov .

Could you put an appropriate label for test coverage?
Thanks!

@sidolov sidolov added the Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests label Oct 6, 2020
@engcom-Alfa engcom-Alfa added QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope and removed QA: Ready to add to Regression Scope Should be analyzed and added to Regression Testing Scope(if applicable) labels Oct 20, 2020
@gabrieldagama
Copy link
Contributor

@magento run Semantic Version Checker

@gabrieldagama
Copy link
Contributor

magento-engcom-team pushed a commit that referenced this pull request Nov 9, 2020
@magento-engcom-team magento-engcom-team merged commit 678eb64 into magento:2.4-develop Nov 9, 2020
@m2-assistant
Copy link

m2-assistant bot commented Nov 9, 2020

Hi @sprankhub, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@sprankhub sprankhub deleted the add-event-prefix-object branch June 18, 2022 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Auto-Tests: Not Required Changes in Pull Request does not require coverage by auto-tests Component: Catalog Priority: P3 May be fixed according to the position in the backlog. Progress: accept QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Risk: low Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Issue] Add Event Prefix And Object To The Catalog Product Option Value Collection
7 participants