zendframework / zend-view

View component from Zend Framework
BSD 3-Clause "New" or "Revised" License
49 stars 61 forks source link

zend-json required only as dev dependency #163

Closed reinfi closed 5 years ago

reinfi commented 6 years ago

Hey there,

why is zend-json only required as dev dependency, although the JsonModel in this package has a dependency on it?

Could it be moved to normal dependencies?

froschdesign commented 6 years ago

@reinfi It is only a soft dependency and therefore it is included in the suggest section of the composer file.

https://github.com/zendframework/zend-view/blob/651621d82df0c70664e476481d53fe3b98989a78/composer.json#L53

Or with other words: zend-json is not strictly required.

froschdesign commented 6 years ago

I found a problem: the JsonModel may be optional, but zend-json is also used in the Json view helper and in the AbstractHtmlElement:

https://github.com/zendframework/zend-view/blob/master/src/Helper/Json.php https://github.com/zendframework/zend-view/blob/651621d82df0c70664e476481d53fe3b98989a78/src/Helper/AbstractHtmlElement.php#L79

samsonasik commented 6 years ago

I've created PR #169 for it