hyva-themes / magento2-hyva-admin

This module aims to make creating grids and forms in the Magento 2 adminhtml area joyful and fast.
https://hyva-themes.github.io/magento2-hyva-admin/
BSD 3-Clause "New" or "Revised" License
168 stars 39 forks source link

fix: repo item type fqdn if namespace equals #67

Open theuargb opened 2 years ago

theuargb commented 2 years ago

Once SearchResultsInterface and ItemInterface share the same namespace, reflection returns $resultItemsType relative to $resultType, while the module requires FQDN

Current behavior:

$resultType = Vendor\Module\Api\Data\SearchResultsInterface
$resultItemsType = ItemInterface[]

Fixed behavior:

$resultType = Vendor\Module\Api\Data\SearchResultsInterface
$resultItemsType = Vendor\Module\Api\Data\ItemInterface[]
Vinai commented 2 years ago

@theuargb Thank you for the PR! Can you please let me know what is missing in order to move it out of draft status?

Ideally I would also like to add a test to replicate the issue.

theuargb commented 2 years ago

Hi. Everything is fine for me, while I’m using modified version this days, so it could be merged safely (imho). I just wanted to ensure if implemented approach is fine)

Vinai commented 1 year ago

@theuargb I would like to pick this PR up again - would you say it's ready?

theuargb commented 1 year ago

@Vinai hi. It’s great to hear). I thought about this one a couple of times in the past month but I still had no luck writing back. Yes, I think it’s ready, while the used approach could be a topic to discuss.

Nevertheless mentioned bug is still present. I used to use a collection connector as a workaround(