magento-2-blog
magento-2-blog copied to clipboard
class Post does not implement PostInterface
Summary (*)
Class Mageplaza\Blog\Model\Post is the preference for Mageplaza\Blog\Api\Data\PostInterface, but doesn't implement it. It's best practise in Magento to use interfaces in constructors etc.
That does not work with this module.
Examples (*)
Use Mageplaza\Blog\Api\Data\PostInterface in a constructor; this will lead to this error:
Type Error occurred when creating object: Vendor\Module\Model\Export\Blog\Post, Argument 1 passed to Vendor\Module\Model\Export\Blog\Post::__construct() must implement interface Mageplaza\Blog\Api\Data\PostInterface, instance of Mageplaza\Blog\Model\Post given
Proposed solution
Make the class implement the interface and add the missing methods.
Hi @simonrl ,
I'm Onesh from Mageplaza Support Team. Thank you for taking the time here to talk about the Blog module. I will surely note your precious feedback. Support from amazing customers like you helps our business grow and evolve thanks to your helpful feedback. We also enjoy working with you and hope to have many opportunities to do business with you for many years to come.
Looking forward to sharing your success.
Hi Onesh,
thanks for your reply. Will this issue be fixed in a future version?
Thanks Simon
Hi @simonrl ,
We will make our utmost effort to update it as soon as possible.
Thanks very much!
Any plans on implementing this? I would submit a PR, but it seems like PRs that do not originate from MagePlaza are ignored.