laminas-api-tools / api-tools-hal

Laminas Module providing Hypermedia Application Language assets and rendering
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
6 stars 12 forks source link

Rename `hydrators` key to `extractors` #14

Open weierophinney opened 4 years ago

weierophinney commented 4 years ago

Would it not be better to rename the hydrators key to extractors. In the whole zf-hal (or any other related) module the hydrators are never used for hydration but merely for extraction. So the name of this key is only confusing IMO.

I understand this can be a BC issue, but maybe it can be changed in version 2.0?


Originally posted by @Wilt at https://github.com/zfcampus/zf-hal/issues/128

weierophinney commented 4 years ago

Not sure why @boesing closed this issue...

I am talking about the key mentioned here in the docs: https://github.com/zfcampus/zf-hal#key-renderer

'zf-hal' => array(
    'renderer' => arrray(
        'hydrators' => array(
        )
    )
)

It is a map for rendering (so extracting) objects, not hydrating them...


Originally posted by @Wilt at https://github.com/zfcampus/zf-hal/issues/128#issuecomment-322756659

weierophinney commented 4 years ago

I did not close this. As you can see, I've just closed #132 after 2 years. I don't like issues or PR which are open for more than 2 years tho.


Originally posted by @boesing at https://github.com/zfcampus/zf-hal/issues/128#issuecomment-322760006

weierophinney commented 4 years ago

My bad. Sorry for this...

I agree, it is not good to keep thinks pending for so long, but didn't get any feedback on this and still think it would make sense to rename this key. I could make a PR for this myself though, but before I put time in this I would like to know if the contributors think it would make sense to make such a change.


Originally posted by @Wilt at https://github.com/zfcampus/zf-hal/issues/128#issuecomment-323279980

weierophinney commented 4 years ago

Here is a hydrator used to hydrate: https://github.com/zfcampus/zf-apigility-doctrine/blob/master/src/Server/Resource/DoctrineResource.php#L345

I strongly disagree with changing the key


Originally posted by @TomHAnderson at https://github.com/zfcampus/zf-hal/issues/128#issuecomment-323397743