Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam AD0-E716 topic 1 question 32 discussion

Actual exam question from Adobe's AD0-E716
Question #: 32
Topic #: 1
[All AD0-E716 Questions]

An Adobe Commerce developer has created a module that adds a product attribute to all product types via a Data Patch.
According to best practices, how would the developer ensure this product attribute is removed in the event that the module is uninstalled at a later date?

  • A. Add an Uninstall.php file extending \Magento\Framework\Setup\UninstallInterface to the module's setup directory and implement the uninstall method.
  • B. Add instructions to the module's README.md file instructing merchants and developers that they must manually remove this attribute if they want to uninstall the module.
  • C. Make the Data Patch implement \Magento\Framework\Setup\Patch\PatchRevertableInterface and implement the revert method to remove the product attribute.
Show Suggested Answer Hide Answer
Suggested Answer: A 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
arierave
1 month ago
Selected Answer: C
C according to claude.ai epos: The correct answer is C. Make the Data Patch implement \Magento\Framework\Setup\Patch\PatchRevertableInterface and implement the revert method to remove the product attribute. Here's the explanation: In Adobe Commerce, when creating a module that adds a product attribute via a Data Patch, it's important to follow best practices and ensure that the attribute is properly removed if the module is uninstalled at a later date. The recommended approach is to make the Data Patch revertable by implementing the PatchRevertableInterface. By implementing the PatchRevertableInterface, you can define the revert method in your Data Patch class. The revert method should contain the logic to remove the product attribute that was added by the Data Patch.
upvoted 1 times
...
den33063
1 month, 1 week ago
Selected Answer: C
Option C is correct. using Data patch
upvoted 1 times
...
den33063
1 month, 1 week ago
Option C is correct. using Data patch
upvoted 1 times
...
JasonZhuo
4 months, 2 weeks ago
I choose C
upvoted 1 times
taynerjhony
4 months, 1 week ago
The correct answer is A, Ref https://experienceleague.adobe.com/docs/commerce-operations/installation-guide/tutorials/uninstall-modules.html?lang=en
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...