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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chris-pook, please check a872f40#diff-fe978939bb978f6074e10338e0b14791
I believe the fix is not correct, helper context is supposed to be injected, not customer model context.
At least parent class expects
Magento\Framework\App\Helper\Context
.Could you please replace import with
Magento\Framework\App\Helper\Context as HelperContext
instead and change other places in class accordingly?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry @orlangur , you've lost me..
Customer\Model\AttributeChecker
(where my change is) has no parent class. This change I have made is inCustomer\Model\AttributeChecker
where there is ause
statement forMagento\Framework\App\Helper\Context
which is never used in the class. I could alias this toHelperContext
but it is not used so better to remove I think? Unless I'm missing something here?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@chris-pook, my bad, I was opening
AttributeChecker.php
in my IDE and didn't notice I'm checking helper and not model with the same name.Looks good to me now after your explanation :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah good stuff! Thanks