[COLLAB-DRAFT] ACP2E-4803: Review Customer Custom Attribute Documentation draft#440
Draft
thiaramus wants to merge 4 commits intoAdobeDocs:mainfrom
Draft
[COLLAB-DRAFT] ACP2E-4803: Review Customer Custom Attribute Documentation draft#440thiaramus wants to merge 4 commits intoAdobeDocs:mainfrom
thiaramus wants to merge 4 commits intoAdobeDocs:mainfrom
Conversation
- custom-text-field-attribute: fix non-PSR-3 logger->err() call to logger->error() in both the step snippet and code reference (latent bug flagged in review) - custom-boolean-attribute: normalize integer attribute settings (0/1) to PHP booleans (false/true) across step snippet, settings table, and code reference for consistency with the dropdown and multiselect tutorials; move Boolean source model FQCN to a use statement in the code reference per Magento CS standards - custom-dropdown-attribute: replace Customer::ENTITY with CustomerMetadataInterface::ENTITY_TYPE_CUSTOMER in revert() for consistency; remove unused Magento\Customer\Model\Customer import; add Table source model use statement and replace inline FQCN in code reference - custom-multiselect-attribute: same revert() constant fix, import cleanup, and FQCN replacement as dropdown Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- MD047: add missing trailing newline to boolean, dropdown, and multiselect tutorial files - MD046: remove 4-space indent from constructor code blocks in dropdown and multiselect tutorials; the explanatory paragraph before the block broke list context, causing the linter to classify the fenced block as an indented code block Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Align the boolean tutorial with the dropdown and multiselect tutorials so all three follow a consistent pattern. Changes: - Implement PatchRevertableInterface alongside DataPatchInterface - Add revert() method that calls removeAttribute() on rollback - Store CustomerSetupFactory in constructor instead of a pre-created CustomerSetup instance, so both apply() and revert() can create their own instance independently - Update apply() to use a local $customerSetup variable (created from the factory) instead of $this->customerSetup - Add CustomerSetup and PatchRevertableInterface use statements to the code reference imports - Update "Execute the data patch" section to mention setup:rollback Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of this pull request
This pull request (PR) will add tutorials for 3 additional custom customer attribute types.
Affected pages
Links to Magento Open Source code